From d7266b25ba5f2f21a5bd19d0fb88aca530e4d265 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 24 Jul 2020 15:54:49 +0200 Subject: [PATCH 1/4] Replace "gint" with "int" --- .../constraint-editor-application.c | 4 +- .../constraint-editor-window.c | 4 +- demos/gtk-demo/application.c | 6 +- demos/gtk-demo/assistant.c | 4 +- demos/gtk-demo/combobox.c | 6 +- demos/gtk-demo/css_blendmodes.c | 2 +- demos/gtk-demo/dialog.c | 2 +- demos/gtk-demo/editable_cells.c | 18 +- demos/gtk-demo/expander.c | 2 +- demos/gtk-demo/filtermodel.c | 8 +- demos/gtk-demo/flowbox.c | 2 +- demos/gtk-demo/font_features.c | 6 +- demos/gtk-demo/fontplane.c | 14 +- demos/gtk-demo/gtkfishbowl.c | 2 +- demos/gtk-demo/hypertext.c | 16 +- demos/gtk-demo/iconview.c | 2 +- demos/gtk-demo/iconview_edit.c | 10 +- demos/gtk-demo/images.c | 10 +- demos/gtk-demo/infobar.c | 2 +- demos/gtk-demo/links.c | 2 +- demos/gtk-demo/list_store.c | 2 +- demos/gtk-demo/main.c | 15 +- demos/gtk-demo/overlay2.c | 4 +- demos/gtk-demo/pagesetup.c | 2 +- demos/gtk-demo/paint.c | 6 +- demos/gtk-demo/pixbufs.c | 4 +- demos/gtk-demo/printing.c | 12 +- demos/gtk-demo/revealer.c | 2 +- demos/gtk-demo/search_entry.c | 2 +- demos/gtk-demo/spinbutton.c | 22 +- demos/gtk-demo/tree_store.c | 14 +- demos/icon-browser/iconbrowserwin.c | 2 +- demos/node-editor/node-editor-application.c | 4 +- demos/node-editor/node-editor-window.c | 10 +- demos/print-editor/print-editor.c | 2 +- demos/widget-factory/widget-factory.c | 28 +- docs/CODING-STYLE.md | 2 +- docs/reference/gtk/getting_started.md | 2 +- docs/tools/shooter.c | 4 +- examples/application1/exampleapp.c | 2 +- examples/application2/exampleapp.c | 2 +- examples/application3/exampleapp.c | 2 +- examples/application4/exampleapp.c | 2 +- examples/application5/exampleapp.c | 2 +- examples/application6/exampleapp.c | 2 +- examples/application7/exampleapp.c | 2 +- examples/application8/exampleapp.c | 2 +- examples/application9/exampleapp.c | 2 +- examples/bp/bloatpad.c | 12 +- examples/plugman.c | 6 +- examples/search-bar.c | 4 +- examples/sunny.c | 4 +- gdk/broadway/broadway-output.c | 2 +- gdk/broadway/broadway-server.c | 28 +- gdk/broadway/broadway-server.h | 32 +- gdk/broadway/gdkbroadway-server.c | 14 +- gdk/broadway/gdkbroadway-server.h | 22 +- gdk/broadway/gdkeventsource.c | 4 +- gdk/broadway/gdkkeys-broadway.c | 8 +- gdk/broadway/gdkprivate-broadway.h | 14 +- gdk/broadway/gdksurface-broadway.c | 68 +-- gdk/gdk.c | 2 +- gdk/gdkapplaunchcontext.c | 2 +- gdk/gdkapplaunchcontext.h | 2 +- gdk/gdkapplaunchcontextprivate.h | 2 +- gdk/gdkcairo.c | 8 +- gdk/gdkdevice.c | 10 +- gdk/gdkdevice.h | 2 +- gdk/gdkdevicepad.c | 12 +- gdk/gdkdevicepad.h | 12 +- gdk/gdkdevicepadprivate.h | 12 +- gdk/gdkdeviceprivate.h | 2 +- gdk/gdkdisplaymanager.c | 2 +- gdk/gdkdrag.c | 6 +- gdk/gdkdrag.h | 4 +- gdk/gdkdragprivate.h | 4 +- gdk/gdkevents.c | 2 +- gdk/gdkframeclock.c | 8 +- gdk/gdkframeclockidle.c | 2 +- gdk/gdkinternals.h | 56 +- gdk/gdkkeys.c | 10 +- gdk/gdkkeysprivate.h | 18 +- gdk/gdkpango.c | 36 +- gdk/gdkpango.h | 16 +- gdk/gdkpipeiostream.c | 2 +- gdk/gdkpixbuf-drawable.c | 8 +- gdk/gdkpixbuf.h | 8 +- gdk/gdkrectangle.c | 8 +- gdk/gdksurface.c | 92 +-- gdk/gdksurface.h | 10 +- gdk/gdksurfaceprivate.h | 40 +- gdk/gdktypes.h | 8 +- gdk/macos/GdkMacosWindow.c | 2 +- gdk/macos/gdkdisplaylinksource.c | 2 +- gdk/macos/gdkmacosdevice.c | 4 +- gdk/macos/gdkmacosdisplay-settings.c | 2 +- gdk/macos/gdkmacosdrag.c | 4 +- gdk/macos/gdkmacoseventsource.c | 44 +- gdk/macos/gdkmacoskeymap.c | 16 +- gdk/macos/gdkmacossurface-private.h | 8 +- gdk/macos/gdkmacossurface.c | 10 +- gdk/wayland/gdkcursor-wayland.c | 2 +- gdk/wayland/gdkdevice-wayland.c | 36 +- gdk/wayland/gdkdisplay-wayland.c | 6 +- gdk/wayland/gdkdisplay-wayland.h | 2 +- gdk/wayland/gdkdrag-wayland.c | 12 +- gdk/wayland/gdkeventsource.c | 2 +- gdk/wayland/gdkkeys-wayland.c | 38 +- gdk/wayland/gdksurface-wayland.c | 44 +- gdk/wayland/gdkwaylanddisplay.h | 2 +- gdk/win32/bdfcursor.c | 40 +- gdk/win32/gdkcairocontext-win32.c | 12 +- gdk/win32/gdkcairocontext-win32.h | 4 +- gdk/win32/gdkclipdrop-win32.c | 56 +- gdk/win32/gdkclipdrop-win32.h | 8 +- gdk/win32/gdkcursor-win32.c | 64 +- gdk/win32/gdkdevice-win32.c | 2 +- gdk/win32/gdkdevice-wintab.c | 4 +- gdk/win32/gdkdevice-wintab.h | 4 +- gdk/win32/gdkdevicemanager-win32.c | 8 +- gdk/win32/gdkdevicemanager-win32.h | 2 +- gdk/win32/gdkdisplay-win32.c | 10 +- gdk/win32/gdkdisplay-win32.h | 2 +- gdk/win32/gdkdrag-win32.c | 28 +- gdk/win32/gdkdrop-win32.c | 34 +- gdk/win32/gdkevents-win32.c | 42 +- gdk/win32/gdkglcontext-win32.c | 30 +- gdk/win32/gdkglobals-win32.c | 10 +- gdk/win32/gdkkeys-win32.c | 42 +- gdk/win32/gdkmain-win32.c | 4 +- gdk/win32/gdkmonitor-win32.c | 8 +- gdk/win32/gdkprivate-win32.h | 42 +- gdk/win32/gdkproperty-win32.c | 8 +- gdk/win32/gdksurface-win32.c | 184 +++--- gdk/win32/gdksurface-win32.h | 50 +- gdk/win32/gdkwin32display.h | 4 +- gdk/win32/gdkwin32dnd-private.h | 24 +- gdk/win32/gdkwin32glcontext.h | 4 +- gdk/win32/gdkwin32id.c | 2 +- gdk/win32/gdkwin32langnotification.c | 2 +- gdk/win32/xcursors.h | 2 +- gdk/x11/gdkasync.c | 2 +- gdk/x11/gdkasync.h | 8 +- gdk/x11/gdkclipboard-x11.c | 2 +- gdk/x11/gdkcursor-x11.c | 14 +- gdk/x11/gdkdevice-xi2.c | 22 +- gdk/x11/gdkdevicemanager-x11.c | 4 +- gdk/x11/gdkdevicemanager-xi2.c | 24 +- gdk/x11/gdkdisplay-x11.c | 40 +- gdk/x11/gdkdisplay-x11.h | 22 +- gdk/x11/gdkdrag-x11.c | 90 +-- gdk/x11/gdkdrop-x11.c | 12 +- gdk/x11/gdkeventsource.c | 6 +- gdk/x11/gdkglcontext-x11.c | 6 +- gdk/x11/gdkkeys-x11.c | 102 ++-- gdk/x11/gdkkeys-x11.h | 2 +- gdk/x11/gdkmain-x11.c | 14 +- gdk/x11/gdkprivate-x11.h | 58 +- gdk/x11/gdkproperty-x11.c | 6 +- gdk/x11/gdkscreen-x11.c | 36 +- gdk/x11/gdkscreen-x11.h | 24 +- gdk/x11/gdkselection-x11.c | 42 +- gdk/x11/gdkselectioninputstream-x11.c | 6 +- gdk/x11/gdkselectionoutputstream-x11.c | 4 +- gdk/x11/gdksurface-x11.c | 166 +++--- gdk/x11/gdksurface-x11.h | 10 +- gdk/x11/gdktextlistconverter-x11.c | 12 +- gdk/x11/gdkvisual-x11.c | 2 +- gdk/x11/gdkvisual-x11.h | 6 +- gdk/x11/gdkx11device.h | 2 +- gdk/x11/gdkx11devicemanager.h | 2 +- gdk/x11/gdkx11display.h | 6 +- gdk/x11/gdkx11glcontext.h | 4 +- gdk/x11/gdkx11screen.h | 2 +- gdk/x11/gdkx11selection.h | 16 +- gdk/x11/gdkxftdefaults.c | 6 +- gsk/gskrendernodeimpl.c | 4 +- gsk/vulkan/gskvulkanrenderer.c | 2 +- gsk/vulkan/gskvulkanrenderpass.c | 2 +- gtk/a11y/gtkbooleancellaccessible.c | 10 +- gtk/a11y/gtkbuttonaccessible.c | 24 +- gtk/a11y/gtkcellaccessible.c | 26 +- gtk/a11y/gtkcellaccessibleparent.c | 12 +- gtk/a11y/gtkcellaccessibleparent.h | 24 +- gtk/a11y/gtkcolorswatchaccessible.c | 12 +- gtk/a11y/gtkcomboboxaccessible.c | 40 +- gtk/a11y/gtkcontainercellaccessible.c | 6 +- gtk/a11y/gtkentryaccessible.c | 168 +++--- gtk/a11y/gtkexpanderaccessible.c | 16 +- gtk/a11y/gtkflowboxaccessible.c | 16 +- gtk/a11y/gtkiconviewaccessible.c | 110 ++-- gtk/a11y/gtkimageaccessible.c | 10 +- gtk/a11y/gtkimagecellaccessible.c | 8 +- gtk/a11y/gtklabelaccessible.c | 134 ++--- gtk/a11y/gtklinkbuttonaccessible.c | 12 +- gtk/a11y/gtklistboxaccessible.c | 16 +- gtk/a11y/gtkmenubuttonaccessible.c | 6 +- gtk/a11y/gtknotebookaccessible.c | 20 +- gtk/a11y/gtknotebookpageaccessible.c | 18 +- gtk/a11y/gtkpanedaccessible.c | 14 +- gtk/a11y/gtkpasswordentryaccessible.c | 46 +- gtk/a11y/gtkpictureaccessible.c | 8 +- gtk/a11y/gtkradiobuttonaccessible.c | 2 +- gtk/a11y/gtkscalebuttonaccessible.c | 10 +- gtk/a11y/gtkscrolledwindowaccessible.c | 8 +- gtk/a11y/gtksearchentryaccessible.c | 120 ++-- gtk/a11y/gtkspinneraccessible.c | 4 +- gtk/a11y/gtkstatusbaraccessible.c | 4 +- gtk/a11y/gtkswitchaccessible.c | 10 +- gtk/a11y/gtktextaccessible.c | 148 ++--- gtk/a11y/gtktextcellaccessible.c | 122 ++-- gtk/a11y/gtktextviewaccessible.c | 136 ++--- gtk/a11y/gtktoplevelaccessible.c | 6 +- gtk/a11y/gtktreeviewaccessible.c | 126 ++-- gtk/a11y/gtkwidgetaccessible.c | 32 +- gtk/a11y/gtkwindowaccessible.c | 36 +- gtk/css/gtkcsssection.c | 2 +- gtk/css/gtkcsstokenizer.c | 2 +- gtk/gen-paper-names.c | 18 +- gtk/gsettings-mapping.c | 6 +- gtk/gtkaboutdialog.c | 20 +- gtk/gtkaccelgroup.c | 6 +- gtk/gtkactionhelper.c | 2 +- gtk/gtkactionmuxer.c | 6 +- gtk/gtkadjustment.c | 2 +- gtk/gtkappchooserbutton.c | 6 +- gtk/gtkappchooserdialog.c | 2 +- gtk/gtkappchooserwidget.c | 8 +- gtk/gtkapplication-dbus.c | 2 +- gtk/gtkapplication-quartz-menu.c | 8 +- gtk/gtkapplication-quartz.c | 4 +- gtk/gtkapplication.c | 2 +- gtk/gtkapplicationwindow.c | 2 +- gtk/gtkassistant.c | 56 +- gtk/gtkassistant.h | 20 +- gtk/gtkbookmarksmanager.c | 6 +- gtk/gtkbookmarksmanagerprivate.h | 4 +- gtk/gtkbox.c | 6 +- gtk/gtkbox.h | 6 +- gtk/gtkboxlayout.c | 32 +- gtk/gtkbuildable.h | 4 +- gtk/gtkbuilder-menus.c | 2 +- gtk/gtkbuilder.c | 26 +- gtk/gtkbuilderparser.c | 20 +- gtk/gtkbuilderprecompile.c | 2 +- gtk/gtkbuilderprivate.h | 32 +- gtk/gtkbuilderscope.c | 2 +- gtk/gtkcalendar.c | 44 +- gtk/gtkcellarea.c | 124 ++-- gtk/gtkcellarea.h | 58 +- gtk/gtkcellareabox.c | 192 +++--- gtk/gtkcellareabox.h | 6 +- gtk/gtkcellareaboxcontext.c | 152 ++--- gtk/gtkcellareaboxcontextprivate.h | 68 +-- gtk/gtkcellareacontext.c | 56 +- gtk/gtkcellareacontext.h | 52 +- gtk/gtkcelllayout.c | 16 +- gtk/gtkcelllayout.h | 8 +- gtk/gtkcellrenderer.c | 110 ++-- gtk/gtkcellrenderer.h | 72 +-- gtk/gtkcellrendereraccel.c | 8 +- gtk/gtkcellrenderercombo.c | 2 +- gtk/gtkcellrendererpixbuf.c | 32 +- gtk/gtkcellrendererprogress.c | 74 +-- gtk/gtkcellrendererspinner.c | 36 +- gtk/gtkcellrenderertext.c | 78 +-- gtk/gtkcellrenderertext.h | 2 +- gtk/gtkcellrenderertoggle.c | 30 +- gtk/gtkcellview.c | 18 +- gtk/gtkcolorbutton.c | 6 +- gtk/gtkcolorchooser.c | 4 +- gtk/gtkcolorchooser.h | 8 +- gtk/gtkcolorchooserdialog.c | 6 +- gtk/gtkcolorchooserwidget.c | 18 +- gtk/gtkcoloreditor.c | 8 +- gtk/gtkcolorplane.c | 18 +- gtk/gtkcolorscale.c | 2 +- gtk/gtkcolorswatch.c | 4 +- gtk/gtkcombobox.c | 38 +- gtk/gtkcombobox.h | 12 +- gtk/gtkcomboboxtext.c | 14 +- gtk/gtkcomboboxtext.h | 6 +- gtk/gtkcomposetable.c | 8 +- gtk/gtkcomposetable.h | 14 +- gtk/gtkcssanimation.c | 2 +- gtk/gtkcssimageicontheme.c | 2 +- gtk/gtkcssimagerecolor.c | 2 +- gtk/gtkcssnodedeclaration.c | 2 +- gtk/gtkcssnumbervalue.c | 2 +- gtk/gtkcssprovider.c | 2 +- gtk/gtkcssselector.c | 20 +- gtk/gtkcssstyle.c | 2 +- gtk/gtkcssvalueprivate.h | 2 +- gtk/gtkcustompaperunixdialog.c | 4 +- gtk/gtkdialog.c | 48 +- gtk/gtkdialog.h | 16 +- gtk/gtkdragsource.c | 2 +- gtk/gtkentry.c | 32 +- gtk/gtkentry.h | 12 +- gtk/gtkentrybuffer.c | 14 +- gtk/gtkentrybuffer.h | 12 +- gtk/gtkentrycompletion.c | 26 +- gtk/gtkentrycompletion.h | 8 +- gtk/gtkentryprivate.h | 8 +- gtk/gtkeventcontrollerscroll.c | 2 +- gtk/gtkexpander.c | 4 +- gtk/gtkexpression.c | 2 +- gtk/gtkfilechooserbutton.c | 48 +- gtk/gtkfilechooserbutton.h | 4 +- gtk/gtkfilechooserdialog.c | 16 +- gtk/gtkfilechooserentry.c | 28 +- gtk/gtkfilechoosernative.c | 2 +- gtk/gtkfilechoosernativequartz.c | 2 +- gtk/gtkfilechoosernativewin32.c | 8 +- gtk/gtkfilechooserwidget.c | 82 +-- gtk/gtkfilesystemmodel.c | 18 +- gtk/gtkflowbox.c | 236 ++++---- gtk/gtkflowbox.h | 16 +- gtk/gtkfontbutton.c | 8 +- gtk/gtkfontchooser.c | 2 +- gtk/gtkfontchooser.h | 4 +- gtk/gtkfontchooserwidget.c | 10 +- gtk/gtkframe.c | 24 +- gtk/gtkgestureclickprivate.h | 4 +- gtk/gtkgesturelongpress.c | 4 +- gtk/gtkgesturestylus.c | 2 +- gtk/gtkgestureswipe.c | 4 +- gtk/gtkglarea.c | 12 +- gtk/gtkglarea.h | 8 +- gtk/gtkgrid.c | 58 +- gtk/gtkgrid.h | 40 +- gtk/gtkgridlayout.c | 10 +- gtk/gtkiconcache.c | 10 +- gtk/gtkiconcachevalidatorprivate.h | 2 +- gtk/gtkiconhelper.c | 10 +- gtk/gtkiconhelperprivate.h | 4 +- gtk/gtkicontheme.c | 114 ++-- gtk/gtkicontheme.h | 14 +- gtk/gtkiconview.c | 224 +++---- gtk/gtkiconview.h | 64 +- gtk/gtkiconviewprivate.h | 48 +- gtk/gtkimage.c | 18 +- gtk/gtkimage.h | 4 +- gtk/gtkimagedefinition.c | 10 +- gtk/gtkimagedefinitionprivate.h | 2 +- gtk/gtkimcontext.c | 32 +- gtk/gtkimcontext.h | 24 +- gtk/gtkimcontextime.c | 24 +- gtk/gtkimcontextquartz.c | 4 +- gtk/gtkimcontextsimple.c | 44 +- gtk/gtkimcontextsimple.h | 4 +- gtk/gtkimcontextsimpleprivate.h | 4 +- gtk/gtkimcontextwayland.c | 26 +- gtk/gtkimmulticontext.c | 26 +- gtk/gtkinfobar.c | 34 +- gtk/gtkinfobar.h | 10 +- gtk/gtklabel.c | 268 ++++----- gtk/gtklabel.h | 20 +- gtk/gtklabelprivate.h | 24 +- gtk/gtklevelbar.c | 40 +- gtk/gtklinkbutton.c | 8 +- gtk/gtklistbox.c | 42 +- gtk/gtklistbox.h | 14 +- gtk/gtkliststore.c | 160 ++--- gtk/gtkliststore.h | 24 +- gtk/gtkmagnifier.c | 6 +- gtk/gtkmain.c | 16 +- gtk/gtkmarshalers.list | 4 +- gtk/gtkmediastream.c | 4 +- gtk/gtkmediastream.h | 4 +- gtk/gtkmenusectionbox.c | 10 +- gtk/gtkmenutracker.c | 46 +- gtk/gtkmenutrackeritem.c | 2 +- gtk/gtkmenutrackeritemprivate.h | 2 +- gtk/gtkmenutrackerprivate.h | 4 +- gtk/gtkmodules.c | 4 +- gtk/gtkmountoperation-stub.c | 2 +- gtk/gtkmountoperation-x11.c | 18 +- gtk/gtkmountoperation.c | 18 +- gtk/gtkmountoperationprivate.h | 2 +- gtk/gtknativedialog.c | 2 +- gtk/gtknativedialog.h | 2 +- gtk/gtknotebook.c | 252 ++++---- gtk/gtknotebook.h | 30 +- gtk/gtkpadcontroller.c | 12 +- gtk/gtkpadcontroller.h | 6 +- gtk/gtkpagesetupunixdialog.c | 6 +- gtk/gtkpaned.c | 90 +-- gtk/gtkpaned.h | 4 +- gtk/gtkpango.c | 96 +-- gtk/gtkpango.h | 24 +- gtk/gtkpapersize.c | 2 +- gtk/gtkpathbar.c | 12 +- gtk/gtkpicture.c | 8 +- gtk/gtkplacessidebar.c | 46 +- gtk/gtkplacessidebarprivate.h | 2 +- gtk/gtkplacesview.c | 6 +- gtk/gtkplacesviewrow.c | 2 +- gtk/gtkpointerfocusprivate.h | 2 +- gtk/gtkpopover.c | 32 +- gtk/gtkpopovermenubar.c | 4 +- gtk/gtkprintbackend.c | 10 +- gtk/gtkprintbackendprivate.h | 2 +- gtk/gtkprinter.c | 8 +- gtk/gtkprinter.h | 4 +- gtk/gtkprinteroptionwidget.c | 4 +- gtk/gtkprintjob.c | 12 +- gtk/gtkprintjob.h | 8 +- gtk/gtkprintoperation-private.h | 12 +- gtk/gtkprintoperation-unix.c | 12 +- gtk/gtkprintoperation.c | 52 +- gtk/gtkprintoperation.h | 10 +- gtk/gtkprintoperationpreview.c | 4 +- gtk/gtkprintoperationpreview.h | 8 +- gtk/gtkprintsettings.c | 42 +- gtk/gtkprintsettings.h | 36 +- gtk/gtkprintunixdialog.c | 74 +-- gtk/gtkprintunixdialog.h | 4 +- gtk/gtkquartz.c | 2 +- gtk/gtkquery.c | 2 +- gtk/gtkrange.c | 72 +-- gtk/gtkrange.h | 8 +- gtk/gtkrangeprivate.h | 6 +- gtk/gtkrecentmanager.c | 34 +- gtk/gtkrecentmanager.h | 4 +- gtk/gtkrendericonprivate.h | 8 +- gtk/gtkroundedbox.c | 2 +- gtk/gtkscale.c | 56 +- gtk/gtkscale.h | 12 +- gtk/gtkscrolledwindow.c | 62 +- gtk/gtkscrolledwindow.h | 16 +- gtk/gtksettings.c | 24 +- gtk/gtksettingsprivate.h | 6 +- gtk/gtkshortcutlabel.c | 10 +- gtk/gtkshortcutssection.c | 6 +- gtk/gtkshortcuttrigger.c | 2 +- gtk/gtkshortcuttrigger.h | 2 +- gtk/gtksidebarrow.c | 4 +- gtk/gtksizegroup.c | 6 +- gtk/gtksizerequest.c | 40 +- gtk/gtksizerequest.h | 6 +- gtk/gtksizerequestcache.c | 4 +- gtk/gtksizerequestcacheprivate.h | 20 +- gtk/gtksortkeysprivate.h | 2 +- gtk/gtkspinbutton.c | 46 +- gtk/gtkspinbutton.h | 2 +- gtk/gtkstack.c | 12 +- gtk/gtkstylecontext.c | 16 +- gtk/gtkstylecontext.h | 4 +- gtk/gtkswitch.c | 6 +- gtk/gtktext.h | 2 +- gtk/gtktextattributes.h | 18 +- gtk/gtktextbtree.c | 238 ++++---- gtk/gtktextbtree.h | 120 ++-- gtk/gtktextbuffer.c | 74 +-- gtk/gtktextbuffer.h | 34 +- gtk/gtktextbufferprivate.h | 2 +- gtk/gtktexthandle.c | 6 +- gtk/gtktextiter.c | 336 +++++------ gtk/gtktextiter.h | 80 +-- gtk/gtktextiterprivate.h | 4 +- gtk/gtktextlayout.c | 260 ++++----- gtk/gtktextlayoutprivate.h | 102 ++-- gtk/gtktextlinedisplaycache.c | 30 +- gtk/gtktextlinedisplaycacheprivate.h | 4 +- gtk/gtktextprivate.h | 4 +- gtk/gtktextsegment.h | 4 +- gtk/gtktexttag.c | 12 +- gtk/gtktexttag.h | 4 +- gtk/gtktexttagtable.c | 4 +- gtk/gtktexttagtable.h | 2 +- gtk/gtktextutil.c | 24 +- gtk/gtktextutil.h | 2 +- gtk/gtktextview.c | 320 +++++----- gtk/gtktextview.h | 80 +-- gtk/gtktooltip.c | 18 +- gtk/gtktooltipprivate.h | 8 +- gtk/gtktrashmonitor.c | 2 +- gtk/gtktreedatalist.c | 20 +- gtk/gtktreedatalist.h | 12 +- gtk/gtktreednd.c | 4 +- gtk/gtktreemodel.c | 114 ++-- gtk/gtktreemodel.h | 50 +- gtk/gtktreemodelfilter.c | 150 ++--- gtk/gtktreemodelfilter.h | 8 +- gtk/gtktreemodelsort.c | 118 ++-- gtk/gtktreepopover.c | 6 +- gtk/gtktreeprivate.h | 16 +- gtk/gtktreerbtree.c | 58 +- gtk/gtktreerbtreeprivate.h | 26 +- gtk/gtktreeselection.c | 28 +- gtk/gtktreeselection.h | 2 +- gtk/gtktreesortable.c | 6 +- gtk/gtktreesortable.h | 20 +- gtk/gtktreestore.c | 154 ++--- gtk/gtktreestore.h | 26 +- gtk/gtktreeview.c | 548 +++++++++--------- gtk/gtktreeview.h | 110 ++-- gtk/gtktreeviewcolumn.c | 88 +-- gtk/gtktreeviewcolumn.h | 30 +- gtk/gtkvolumebutton.c | 8 +- gtk/gtkwidget.c | 92 +-- gtk/gtkwidget.h | 34 +- gtk/gtkwidgetprivate.h | 14 +- gtk/gtkwindow.c | 110 ++-- gtk/gtkwindow.h | 16 +- gtk/gtkwindowhandle.c | 2 +- gtk/inspector/actions.c | 4 +- gtk/inspector/cellrenderergraph.c | 8 +- gtk/inspector/css-editor.c | 10 +- gtk/inspector/css-node-tree.c | 6 +- gtk/inspector/general.c | 6 +- gtk/inspector/gtktreemodelcssnode.c | 20 +- gtk/inspector/gtktreemodelcssnode.h | 4 +- gtk/inspector/layoutoverlay.c | 2 +- gtk/inspector/menu.c | 6 +- gtk/inspector/misc-info.c | 2 +- gtk/inspector/prop-editor.c | 20 +- gtk/inspector/resource-list.c | 8 +- gtk/inspector/statistics.c | 20 +- gtk/inspector/strv-editor.c | 2 +- gtk/inspector/tree-data.c | 6 +- gtk/inspector/type-info.c | 2 +- gtk/inspector/visual.c | 8 +- gtk/inspector/window.h | 6 +- gtk/tools/gdkpixbufutils.c | 8 +- gtk/tools/gtk-builder-tool-enumerate.c | 2 +- gtk/tools/gtk-builder-tool-simplify.c | 8 +- gtk/tools/gtk-builder-tool-validate.c | 4 +- gtk/tools/gtkiconcachevalidator.c | 12 +- gtk/tools/updateiconcache.c | 26 +- modules/printbackends/gtkcloudprintaccount.c | 4 +- modules/printbackends/gtkcupssecretsutils.c | 4 +- modules/printbackends/gtkcupsutils.c | 14 +- modules/printbackends/gtkcupsutils.h | 20 +- .../printbackends/gtkprintbackendcloudprint.c | 8 +- modules/printbackends/gtkprintbackendcups.c | 94 +-- modules/printbackends/gtkprintbackendfile.c | 12 +- modules/printbackends/gtkprintbackendlpr.c | 6 +- modules/printbackends/gtkprintercups.h | 16 +- tests/listmodel.c | 12 +- tests/overlayscroll.c | 4 +- tests/syncscroll.c | 2 +- tests/testaccel.c | 8 +- tests/testappchooser.c | 2 +- tests/testassistant.c | 12 +- tests/testbaseline.c | 6 +- tests/testcalendar.c | 2 +- tests/testcellarea.c | 12 +- tests/testcombo.c | 8 +- tests/testcombochange.c | 10 +- tests/testellipsise.c | 2 +- tests/testentrycompletion.c | 8 +- tests/testentryicons.c | 2 +- tests/testerrors.c | 4 +- tests/testfilechooser.c | 2 +- tests/testflowbox.c | 22 +- tests/testfontchooserdialog.c | 2 +- tests/testgmenu.c | 2 +- tests/testgrid.c | 2 +- tests/testgtk.c | 82 +-- tests/testheightforwidth.c | 2 +- tests/testiconview-keynav.c | 2 +- tests/testiconview.c | 10 +- tests/testkineticscrolling.c | 2 +- tests/testlist.c | 4 +- tests/testlist2.c | 4 +- tests/testlist3.c | 2 +- tests/testlist4.c | 2 +- tests/testmountoperation.c | 2 +- tests/testnotebookdnd.c | 10 +- tests/testrc.c | 2 +- tests/testrevealer.c | 4 +- tests/testscrolledge.c | 4 +- tests/testscrolledwindow.c | 4 +- tests/testselectionmode.c | 4 +- tests/testspinbutton.c | 2 +- tests/teststack.c | 8 +- tests/testtexthistory.c | 4 +- tests/testtooltips.c | 32 +- tests/testtreecolumns.c | 36 +- tests/testtreeedit.c | 10 +- tests/testtreeflow.c | 6 +- tests/testtreefocus.c | 4 +- tests/testtreemodel.c | 50 +- tests/testtreepos.c | 18 +- tests/testtreesort.c | 8 +- tests/testtreeview.c | 54 +- tests/testverticalcells.c | 10 +- tests/testvolumebutton.c | 2 +- tests/testwindowsize.c | 2 +- tests/treestoretest.c | 6 +- tests/video-timer.c | 2 +- testsuite/a11y/accessibility-dump.c | 28 +- testsuite/a11y/children.c | 14 +- testsuite/a11y/state/state-record.c | 8 +- testsuite/a11y/text.c | 48 +- testsuite/a11y/tree-performance.c | 16 +- testsuite/a11y/tree-relationships.c | 2 +- testsuite/a11y/value.c | 4 +- testsuite/gdk/encoding.c | 6 +- testsuite/gdk/keysyms.c | 2 +- testsuite/gdk/memorytexture.c | 4 +- testsuite/gtk/adjustment.c | 4 +- testsuite/gtk/builder.c | 2 +- testsuite/gtk/entry.c | 26 +- testsuite/gtk/filtermodel.c | 4 +- testsuite/gtk/gestures.c | 6 +- testsuite/gtk/grid.c | 2 +- testsuite/gtk/gtktreemodelrefcount.c | 6 +- testsuite/gtk/gtktreemodelrefcount.h | 14 +- testsuite/gtk/icontheme.c | 12 +- testsuite/gtk/listbox.c | 44 +- testsuite/gtk/liststore.c | 4 +- testsuite/gtk/notify.c | 28 +- testsuite/gtk/objects-finalize.c | 2 +- testsuite/gtk/rbtree.c | 22 +- testsuite/gtk/recentmanager.c | 4 +- testsuite/gtk/spinbutton.c | 4 +- testsuite/gtk/textbuffer.c | 32 +- testsuite/gtk/textiter.c | 46 +- testsuite/gtk/treemodel.c | 2 +- testsuite/gtk/treepath.c | 22 +- testsuite/gtk/treestore.c | 6 +- testsuite/gtk/typename.c | 2 +- testsuite/gtk/window.c | 12 +- testsuite/reftests/reftest-snapshot.c | 2 +- testsuite/reftests/textview-border-windows.c | 2 +- 628 files changed, 7361 insertions(+), 7362 deletions(-) diff --git a/demos/constraint-editor/constraint-editor-application.c b/demos/constraint-editor/constraint-editor-application.c index aa130d9c13..ca65cb695d 100644 --- a/demos/constraint-editor/constraint-editor-application.c +++ b/demos/constraint-editor/constraint-editor-application.c @@ -81,11 +81,11 @@ constraint_editor_application_activate (GApplication *app) static void constraint_editor_application_open (GApplication *app, GFile **files, - gint n_files, + int n_files, const gchar *hint) { ConstraintEditorWindow *win; - gint i; + int i; for (i = 0; i < n_files; i++) { diff --git a/demos/constraint-editor/constraint-editor-window.c b/demos/constraint-editor/constraint-editor-window.c index ac724993e4..ba25a806ec 100644 --- a/demos/constraint-editor/constraint-editor-window.c +++ b/demos/constraint-editor/constraint-editor-window.c @@ -193,7 +193,7 @@ constraint_editor_window_load (ConstraintEditorWindow *self, static void open_response_cb (GtkNativeDialog *dialog, - gint response, + int response, ConstraintEditorWindow *self) { gtk_native_dialog_hide (dialog); @@ -285,7 +285,7 @@ serialize_model (GListModel *list) static void save_response_cb (GtkNativeDialog *dialog, - gint response, + int response, ConstraintEditorWindow *self) { gtk_native_dialog_hide (dialog); diff --git a/demos/gtk-demo/application.c b/demos/gtk-demo/application.c index cef94fca28..2b5e8e094a 100644 --- a/demos/gtk-demo/application.c +++ b/demos/gtk-demo/application.c @@ -92,7 +92,7 @@ activate_new (GSimpleAction *action, static void open_response_cb (GtkNativeDialog *dialog, - gint response_id, + int response_id, gpointer user_data) { GtkFileChooserNative *native = user_data; @@ -245,8 +245,8 @@ update_statusbar (GtkTextBuffer *buffer, DemoApplicationWindow *window) { gchar *msg; - gint row, col; - gint count; + int row, col; + int count; GtkTextIter iter; /* clear any previous message, underflow is allowed */ diff --git a/demos/gtk-demo/assistant.c b/demos/gtk-demo/assistant.c index 53bc8db5a4..b90e42ab55 100644 --- a/demos/gtk-demo/assistant.c +++ b/demos/gtk-demo/assistant.c @@ -47,7 +47,7 @@ on_assistant_close_cancel (GtkWidget *widget, gpointer data) static void on_assistant_prepare (GtkWidget *widget, GtkWidget *page, gpointer data) { - gint current_page, n_pages; + int current_page, n_pages; gchar *title; current_page = gtk_assistant_get_current_page (GTK_ASSISTANT (widget)); @@ -70,7 +70,7 @@ on_entry_changed (GtkWidget *widget, gpointer data) { GtkAssistant *assistant = GTK_ASSISTANT (data); GtkWidget *current_page; - gint page_number; + int page_number; const gchar *text; page_number = gtk_assistant_get_current_page (assistant); diff --git a/demos/gtk-demo/combobox.c b/demos/gtk-demo/combobox.c index 3ed180a9b5..0686eaf59b 100644 --- a/demos/gtk-demo/combobox.c +++ b/demos/gtk-demo/combobox.c @@ -38,7 +38,7 @@ create_icon_store (void) GtkTreeIter iter; GtkListStore *store; - gint i; + int i; store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); @@ -77,7 +77,7 @@ set_sensitive (GtkCellLayout *cell_layout, gpointer data) { GtkTreePath *path; - gint *indices; + int *indices; gboolean sensitive; path = gtk_tree_model_get_path (tree_model, iter); @@ -175,7 +175,7 @@ create_capital_store (void) GtkTreeIter iter, iter2; GtkTreeStore *store; - gint i; + int i; store = gtk_tree_store_new (1, G_TYPE_STRING); diff --git a/demos/gtk-demo/css_blendmodes.c b/demos/gtk-demo/css_blendmodes.c index df791aad31..5efd3cf32b 100644 --- a/demos/gtk-demo/css_blendmodes.c +++ b/demos/gtk-demo/css_blendmodes.c @@ -75,7 +75,7 @@ setup_listbox (GtkBuilder *builder, { GtkWidget *normal_row; GtkWidget *listbox; - gint i; + int i; normal_row = NULL; listbox = gtk_list_box_new (); diff --git a/demos/gtk-demo/dialog.c b/demos/gtk-demo/dialog.c index ed5e6b072e..91b1bfa8bb 100644 --- a/demos/gtk-demo/dialog.c +++ b/demos/gtk-demo/dialog.c @@ -16,7 +16,7 @@ message_dialog_clicked (GtkButton *button, gpointer user_data) { GtkWidget *dialog; - static gint i = 1; + static int i = 1; dialog = gtk_message_dialog_new (GTK_WINDOW (window), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, diff --git a/demos/gtk-demo/editable_cells.c b/demos/gtk-demo/editable_cells.c index 993daff491..0cc307b160 100644 --- a/demos/gtk-demo/editable_cells.c +++ b/demos/gtk-demo/editable_cells.c @@ -16,9 +16,9 @@ typedef struct { - gint number; + int number; gchar *product; - gint yummy; + int yummy; } Item; @@ -74,7 +74,7 @@ add_items (void) static GtkTreeModel * create_items_model (void) { - gint i = 0; + int i = 0; GtkListStore *model; GtkTreeIter iter; @@ -109,7 +109,7 @@ static GtkTreeModel * create_numbers_model (void) { #define N_NUMBERS 10 - gint i = 0; + int i = 0; GtkListStore *model; GtkTreeIter iter; @@ -192,7 +192,7 @@ remove_item (GtkWidget *widget, gpointer data) if (gtk_tree_selection_get_selected (selection, NULL, &iter)) { - gint i; + int i; GtkTreePath *path; path = gtk_tree_model_get_path (model, &iter); @@ -211,7 +211,7 @@ separator_row (GtkTreeModel *model, gpointer data) { GtkTreePath *path; - gint idx; + int idx; path = gtk_tree_model_get_path (model, iter); idx = gtk_tree_path_get_indices (path)[0]; @@ -241,7 +241,7 @@ cell_edited (GtkCellRendererText *cell, GtkTreePath *path = gtk_tree_path_new_from_string (path_string); GtkTreeIter iter; - gint column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column")); + int column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column")); gtk_tree_model_get_iter (model, &iter, path); @@ -249,7 +249,7 @@ cell_edited (GtkCellRendererText *cell, { case COLUMN_ITEM_NUMBER: { - gint i; + int i; i = gtk_tree_path_get_indices (path)[0]; g_array_index (articles, Item, i).number = atoi (new_text); @@ -261,7 +261,7 @@ cell_edited (GtkCellRendererText *cell, case COLUMN_ITEM_PRODUCT: { - gint i; + int i; gchar *old_text; gtk_tree_model_get (model, &iter, column, &old_text, -1); diff --git a/demos/gtk-demo/expander.c b/demos/gtk-demo/expander.c index 51142b1b4d..d5dcd12cc6 100644 --- a/demos/gtk-demo/expander.c +++ b/demos/gtk-demo/expander.c @@ -13,7 +13,7 @@ static GtkWidget *window = NULL; static void -response_cb (GtkDialog *dialog, gint response_id) +response_cb (GtkDialog *dialog, int response_id) { gtk_window_destroy (GTK_WINDOW (window)); window = NULL; diff --git a/demos/gtk-demo/filtermodel.c b/demos/gtk-demo/filtermodel.c index e3a55c4f99..b1492c71ca 100644 --- a/demos/gtk-demo/filtermodel.c +++ b/demos/gtk-demo/filtermodel.c @@ -22,7 +22,7 @@ format_number (GtkTreeViewColumn *col, GtkTreeIter *iter, gpointer data) { - gint num; + int num; gchar *text; gtk_tree_model_get (model, iter, GPOINTER_TO_INT (data), &num, -1); @@ -35,11 +35,11 @@ static void filter_modify_func (GtkTreeModel *model, GtkTreeIter *iter, GValue *value, - gint column, + int column, gpointer data) { GtkTreeModelFilter *filter_model = GTK_TREE_MODEL_FILTER (model); - gint width, height; + int width, height; GtkTreeModel *child_model; GtkTreeIter child_iter; @@ -75,7 +75,7 @@ visible_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { - gint width; + int width; gtk_tree_model_get (model, iter, WIDTH_COLUMN, &width, diff --git a/demos/gtk-demo/flowbox.c b/demos/gtk-demo/flowbox.c index 99f9db5175..2673e35d08 100644 --- a/demos/gtk-demo/flowbox.c +++ b/demos/gtk-demo/flowbox.c @@ -716,7 +716,7 @@ do_flowbox (GtkWidget *do_widget) "YellowGreen", NULL }; - gint i; + int i; if (!window) { diff --git a/demos/gtk-demo/font_features.c b/demos/gtk-demo/font_features.c index 98370776ea..09ca986764 100644 --- a/demos/gtk-demo/font_features.c +++ b/demos/gtk-demo/font_features.c @@ -295,7 +295,7 @@ update_display (void) GList *l; PangoAttrList *attrs; PangoAttribute *attr; - gint ins, bound; + int ins, bound; guint start, end; PangoLanguage *lang; char *font_desc; @@ -479,7 +479,7 @@ update_script_combo (void) { GtkListStore *store; hb_font_t *hb_font; - gint i, j, k; + int i, j, k; PangoFont *pango_font; GHashTable *tags; GHashTableIter iter; @@ -593,7 +593,7 @@ update_script_combo (void) static void update_features (void) { - gint i, j; + int i, j; GtkTreeModel *model; GtkTreeIter iter; guint script_index, lang_index; diff --git a/demos/gtk-demo/fontplane.c b/demos/gtk-demo/fontplane.c index 0a7aae6339..3836799293 100644 --- a/demos/gtk-demo/fontplane.c +++ b/demos/gtk-demo/fontplane.c @@ -36,11 +36,11 @@ adjustment_get_normalized_value (GtkAdjustment *adj) static void val_to_xy (GtkFontPlane *plane, - gint *x, - gint *y) + int *x, + int *y) { gdouble u, v; - gint width, height; + int width, height; width = gtk_widget_get_allocated_width (GTK_WIDGET (plane)); height = gtk_widget_get_allocated_height (GTK_WIDGET (plane)); @@ -57,8 +57,8 @@ plane_snapshot (GtkWidget *widget, GtkSnapshot *snapshot) { GtkFontPlane *plane = GTK_FONT_PLANE (widget); - gint x, y; - gint width, height; + int x, y; + int width, height; cairo_t *cr; val_to_xy (plane, &x, &y); @@ -125,8 +125,8 @@ adjustment_set_normalized_value (GtkAdjustment *adj, static void update_value (GtkFontPlane *plane, - gint x, - gint y) + int x, + int y) { GtkWidget *widget = GTK_WIDGET (plane); gdouble u, v; diff --git a/demos/gtk-demo/gtkfishbowl.c b/demos/gtk-demo/gtkfishbowl.c index ff30f1d873..dd33486e15 100644 --- a/demos/gtk-demo/gtkfishbowl.c +++ b/demos/gtk-demo/gtkfishbowl.c @@ -98,7 +98,7 @@ gtk_fishbowl_measure (GtkWidget *widget, GHashTableIter iter; gpointer key, value; GtkFishbowlChild *child; - gint child_min, child_nat; + int child_min, child_nat; *minimum = 0; *natural = 0; diff --git a/demos/gtk-demo/hypertext.c b/demos/gtk-demo/hypertext.c index 7aea955920..ad753c1756 100644 --- a/demos/gtk-demo/hypertext.c +++ b/demos/gtk-demo/hypertext.c @@ -18,7 +18,7 @@ static void insert_link (GtkTextBuffer *buffer, GtkTextIter *iter, const char *text, - gint page) + int page) { GtkTextTag *tag; @@ -35,7 +35,7 @@ insert_link (GtkTextBuffer *buffer, */ static void show_page (GtkTextBuffer *buffer, - gint page) + int page) { GtkTextIter iter; @@ -91,7 +91,7 @@ follow_if_link (GtkWidget *text_view, for (tagp = tags; tagp != NULL; tagp = tagp->next) { GtkTextTag *tag = tagp->data; - gint page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page")); + int page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page")); if (page != 0) { @@ -134,8 +134,8 @@ key_pressed (GtkEventController *controller, } static void set_cursor_if_appropriate (GtkTextView *text_view, - gint x, - gint y); + int x, + int y); static void released_cb (GtkGestureClick *gesture, @@ -183,8 +183,8 @@ static gboolean hovering_over_link = FALSE; */ static void set_cursor_if_appropriate (GtkTextView *text_view, - gint x, - gint y) + int x, + int y) { GSList *tags = NULL, *tagp = NULL; GtkTextIter iter; @@ -196,7 +196,7 @@ set_cursor_if_appropriate (GtkTextView *text_view, for (tagp = tags; tagp != NULL; tagp = tagp->next) { GtkTextTag *tag = tagp->data; - gint page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page")); + int page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page")); if (page != 0) { diff --git a/demos/gtk-demo/iconview.c b/demos/gtk-demo/iconview.c index e13ee749f6..cd462de844 100644 --- a/demos/gtk-demo/iconview.c +++ b/demos/gtk-demo/iconview.c @@ -90,7 +90,7 @@ fill_store (GtkListStore *store) g_dir_close (dir); } -static gint +static int sort_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, diff --git a/demos/gtk-demo/iconview_edit.c b/demos/gtk-demo/iconview_edit.c index f04a6361e8..6225230a64 100644 --- a/demos/gtk-demo/iconview_edit.c +++ b/demos/gtk-demo/iconview_edit.c @@ -20,7 +20,7 @@ fill_store (GtkListStore *store) { GtkTreeIter iter; const gchar *text[] = { "Red", "Green", "Blue", "Yellow" }; - gint i; + int i; /* First clear the store */ gtk_list_store_clear (store); @@ -60,10 +60,10 @@ set_cell_color (GtkCellLayout *cell_layout, if (gdk_rgba_parse (&color, text)) pixel = - ((gint)(color.red * 255)) << 24 | - ((gint)(color.green * 255)) << 16 | - ((gint)(color.blue * 255)) << 8 | - ((gint)(color.alpha * 255)); + ((int)(color.red * 255)) << 24 | + ((int)(color.green * 255)) << 16 | + ((int)(color.blue * 255)) << 8 | + ((int)(color.alpha * 255)); g_free (text); diff --git a/demos/gtk-demo/images.c b/demos/gtk-demo/images.c index 90684bc0ed..c034c34920 100644 --- a/demos/gtk-demo/images.c +++ b/demos/gtk-demo/images.c @@ -43,10 +43,10 @@ progressive_prepared_callback (GdkPixbufLoader *loader, static void progressive_updated_callback (GdkPixbufLoader *loader, - gint x, - gint y, - gint width, - gint height, + int x, + int y, + int width, + int height, gpointer data) { GtkWidget *picture; @@ -58,7 +58,7 @@ progressive_updated_callback (GdkPixbufLoader *loader, gtk_picture_set_pixbuf (GTK_PICTURE (picture), pixbuf); } -static gint +static int progressive_timeout (gpointer data) { GtkWidget *picture; diff --git a/demos/gtk-demo/infobar.c b/demos/gtk-demo/infobar.c index 3d12b26141..32f88c8eb8 100644 --- a/demos/gtk-demo/infobar.c +++ b/demos/gtk-demo/infobar.c @@ -8,7 +8,7 @@ static void on_bar_response (GtkInfoBar *info_bar, - gint response_id, + int response_id, gpointer user_data) { GtkWidget *dialog; diff --git a/demos/gtk-demo/links.c b/demos/gtk-demo/links.c index 72cab2c22e..b8afd56638 100644 --- a/demos/gtk-demo/links.c +++ b/demos/gtk-demo/links.c @@ -9,7 +9,7 @@ static void response_cb (GtkWidget *dialog, - gint response_id, + int response_id, gpointer data) { gtk_window_destroy (GTK_WINDOW (dialog)); diff --git a/demos/gtk-demo/list_store.c b/demos/gtk-demo/list_store.c index fb31fc5457..42f88bd9e8 100644 --- a/demos/gtk-demo/list_store.c +++ b/demos/gtk-demo/list_store.c @@ -81,7 +81,7 @@ spinner_timeout (gpointer data) static GtkTreeModel * create_model (void) { - gint i = 0; + int i = 0; GtkListStore *store; GtkTreeIter iter; diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c index 0e3283aaa8..aea46e21ea 100644 --- a/demos/gtk-demo/main.c +++ b/demos/gtk-demo/main.c @@ -252,7 +252,6 @@ static const char *types[] = "static", "const ", "void", - "gint", " int ", " char ", "gchar ", @@ -387,11 +386,11 @@ static const char *control[] = void parse_chars (gchar *text, gchar **end_ptr, - gint *state, + int *state, const char **tag, gboolean start) { - gint i; + int i; gchar *next_token; /* Handle comments first */ @@ -462,7 +461,7 @@ parse_chars (gchar *text, /* check for string */ if (text[0] == '"') { - gint maybe_escape = FALSE; + int maybe_escape = FALSE; *end_ptr = text + 1; *tag = "string"; @@ -525,7 +524,7 @@ void fontify (GtkTextBuffer *source_buffer) { GtkTextIter start_iter, next_iter, tmp_iter; - gint state; + int state; gchar *text; gchar *start_ptr, *end_ptr; const char *tag; @@ -742,7 +741,7 @@ add_data_tab (const gchar *demoname) static void remove_data_tabs (void) { - gint i; + int i; for (i = gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook)) - 1; i > 1; i--) gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), i); @@ -760,7 +759,7 @@ load_file (const gchar *demoname, gboolean in_para = 0; gchar **lines; GBytes *bytes; - gint i; + int i; if (!g_strcmp0 (current_file, filename)) return; @@ -1190,7 +1189,7 @@ list_demos (void) } } -static gint +static int command_line (GApplication *app, GApplicationCommandLine *cmdline) { diff --git a/demos/gtk-demo/overlay2.c b/demos/gtk-demo/overlay2.c index 9eec7beebf..10b4476fb2 100644 --- a/demos/gtk-demo/overlay2.c +++ b/demos/gtk-demo/overlay2.c @@ -12,9 +12,9 @@ static void margin_changed (GtkAdjustment *adjustment, GtkTextView *text) { - gint value; + int value; - value = (gint)gtk_adjustment_get_value (adjustment); + value = (int)gtk_adjustment_get_value (adjustment); gtk_text_view_set_left_margin (GTK_TEXT_VIEW (text), value); g_object_set (tag, "pixels-above-lines", value, NULL); } diff --git a/demos/gtk-demo/pagesetup.c b/demos/gtk-demo/pagesetup.c index 45f6982f6a..09150a9eb7 100644 --- a/demos/gtk-demo/pagesetup.c +++ b/demos/gtk-demo/pagesetup.c @@ -9,7 +9,7 @@ #include static void -done_cb (GtkDialog *dialog, gint response, gpointer data) +done_cb (GtkDialog *dialog, int response, gpointer data) { gtk_window_destroy (GTK_WINDOW (dialog)); } diff --git a/demos/gtk-demo/paint.c b/demos/gtk-demo/paint.c index f3ba91d244..8717330276 100644 --- a/demos/gtk-demo/paint.c +++ b/demos/gtk-demo/paint.c @@ -55,8 +55,8 @@ static void drawing_area_set_color (DrawingArea *area, static void drawing_area_ensure_surface (DrawingArea *area, - gint width, - gint height) + int width, + int height) { if (!area->surface || cairo_image_surface_get_width (area->surface) != width || @@ -195,7 +195,7 @@ drawing_area_root (GtkWidget *widget) GSimpleActionGroup *action_group; GSimpleAction *action; GtkWidget *toplevel; - gint i; + int i; GTK_WIDGET_CLASS (drawing_area_parent_class)->root (widget); diff --git a/demos/gtk-demo/pixbufs.c b/demos/gtk-demo/pixbufs.c index 1c67404e0d..c2de1bb343 100644 --- a/demos/gtk-demo/pixbufs.c +++ b/demos/gtk-demo/pixbufs.c @@ -39,7 +39,7 @@ static GdkPixbuf *frame; /* Background image */ static GdkPixbuf *background; -static gint back_width, back_height; +static int back_width, back_height; /* Images */ static GdkPixbuf *images[N_IMAGES]; @@ -51,7 +51,7 @@ static GtkWidget *da; static gboolean load_pixbufs (GError **error) { - gint i; + int i; if (background) return TRUE; /* already loaded earlier */ diff --git a/demos/gtk-demo/printing.c b/demos/gtk-demo/printing.c index bca12a0572..96232db40f 100644 --- a/demos/gtk-demo/printing.c +++ b/demos/gtk-demo/printing.c @@ -17,10 +17,10 @@ typedef struct gchar *resourcename; gdouble font_size; - gint lines_per_page; + int lines_per_page; gchar **lines; - gint num_lines; - gint num_pages; + int num_lines; + int num_pages; } PrintData; static void @@ -55,15 +55,15 @@ begin_print (GtkPrintOperation *operation, static void draw_page (GtkPrintOperation *operation, GtkPrintContext *context, - gint page_nr, + int page_nr, gpointer user_data) { PrintData *data = (PrintData *)user_data; cairo_t *cr; PangoLayout *layout; - gint text_width, text_height; + int text_width, text_height; gdouble width; - gint line, i; + int line, i; PangoFontDescription *desc; gchar *page_str; diff --git a/demos/gtk-demo/revealer.c b/demos/gtk-demo/revealer.c index 0f7d097952..c3ed6b4cdd 100644 --- a/demos/gtk-demo/revealer.c +++ b/demos/gtk-demo/revealer.c @@ -6,7 +6,7 @@ #include -static gint count = 0; +static int count = 0; static guint timeout = 0; static void diff --git a/demos/gtk-demo/search_entry.c b/demos/gtk-demo/search_entry.c index aa3872b858..8905e4359b 100644 --- a/demos/gtk-demo/search_entry.c +++ b/demos/gtk-demo/search_entry.c @@ -123,7 +123,7 @@ set_search_by (GSimpleAction *action, static void icon_press_cb (GtkEntry *entry, - gint position, + int position, gpointer data) { if (position == GTK_ENTRY_ICON_PRIMARY) diff --git a/demos/gtk-demo/spinbutton.c b/demos/gtk-demo/spinbutton.c index 307bb52dc1..e00dfb87de 100644 --- a/demos/gtk-demo/spinbutton.c +++ b/demos/gtk-demo/spinbutton.c @@ -11,7 +11,7 @@ #include #include -gint +int spinbutton_hex_spin_input (GtkSpinButton *spin_button, gdouble *new_val) { @@ -28,7 +28,7 @@ spinbutton_hex_spin_input (GtkSpinButton *spin_button, return TRUE; } -gint +int spinbutton_hex_spin_output (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; @@ -40,7 +40,7 @@ spinbutton_hex_spin_output (GtkSpinButton *spin_button) if (fabs (val) < 1e-5) buf = g_strdup ("0x00"); else - buf = g_strdup_printf ("0x%.2X", (gint) val); + buf = g_strdup_printf ("0x%.2X", (int) val); if (strcmp (buf, gtk_editable_get_text (GTK_EDITABLE (spin_button)))) gtk_editable_set_text (GTK_EDITABLE (spin_button), buf); g_free (buf); @@ -48,15 +48,15 @@ spinbutton_hex_spin_output (GtkSpinButton *spin_button) return TRUE; } -gint +int spinbutton_time_spin_input (GtkSpinButton *spin_button, gdouble *new_val) { const gchar *text; gchar **str; gboolean found = FALSE; - gint hours; - gint minutes; + int hours; + int minutes; gchar *endh; gchar *endm; @@ -87,7 +87,7 @@ spinbutton_time_spin_input (GtkSpinButton *spin_button, return TRUE; } -gint +int spinbutton_time_spin_output (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; @@ -121,11 +121,11 @@ static const char *month[12] = { "December" }; -gint +int spinbutton_month_spin_input (GtkSpinButton *spin_button, gdouble *new_val) { - gint i; + int i; gchar *tmp1, *tmp2; gboolean found = FALSE; @@ -150,12 +150,12 @@ spinbutton_month_spin_input (GtkSpinButton *spin_button, return TRUE; } -gint +int spinbutton_month_spin_output (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; gdouble value; - gint i; + int i; adjustment = gtk_spin_button_get_adjustment (spin_button); value = gtk_adjustment_get_value (adjustment); diff --git a/demos/gtk-demo/tree_store.c b/demos/gtk-demo/tree_store.c index 37fcc001af..a15dbab32a 100644 --- a/demos/gtk-demo/tree_store.c +++ b/demos/gtk-demo/tree_store.c @@ -230,7 +230,7 @@ item_toggled (GtkCellRendererToggle *cell, GtkTreeIter iter; gboolean toggle_item; - gint *column; + int *column; column = g_object_get_data (G_OBJECT (cell), "column"); @@ -252,7 +252,7 @@ item_toggled (GtkCellRendererToggle *cell, static void add_columns (GtkTreeView *treeview) { - gint col_offset; + int col_offset; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeModel *model = gtk_tree_view_get_model (treeview); @@ -272,7 +272,7 @@ add_columns (GtkTreeView *treeview) /* alex column */ renderer = gtk_cell_renderer_toggle_new (); g_object_set (renderer, "xalign", 0.0, NULL); - g_object_set_data (G_OBJECT (renderer), "column", (gint *)ALEX_COLUMN); + g_object_set_data (G_OBJECT (renderer), "column", (int *)ALEX_COLUMN); g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model); @@ -294,7 +294,7 @@ add_columns (GtkTreeView *treeview) /* havoc column */ renderer = gtk_cell_renderer_toggle_new (); g_object_set (renderer, "xalign", 0.0, NULL); - g_object_set_data (G_OBJECT (renderer), "column", (gint *)HAVOC_COLUMN); + g_object_set_data (G_OBJECT (renderer), "column", (int *)HAVOC_COLUMN); g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model); @@ -315,7 +315,7 @@ add_columns (GtkTreeView *treeview) /* tim column */ renderer = gtk_cell_renderer_toggle_new (); g_object_set (renderer, "xalign", 0.0, NULL); - g_object_set_data (G_OBJECT (renderer), "column", (gint *)TIM_COLUMN); + g_object_set_data (G_OBJECT (renderer), "column", (int *)TIM_COLUMN); g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model); @@ -337,7 +337,7 @@ add_columns (GtkTreeView *treeview) /* owen column */ renderer = gtk_cell_renderer_toggle_new (); g_object_set (renderer, "xalign", 0.0, NULL); - g_object_set_data (G_OBJECT (renderer), "column", (gint *)OWEN_COLUMN); + g_object_set_data (G_OBJECT (renderer), "column", (int *)OWEN_COLUMN); g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model); @@ -358,7 +358,7 @@ add_columns (GtkTreeView *treeview) /* dave column */ renderer = gtk_cell_renderer_toggle_new (); g_object_set (renderer, "xalign", 0.0, NULL); - g_object_set_data (G_OBJECT (renderer), "column", (gint *)DAVE_COLUMN); + g_object_set_data (G_OBJECT (renderer), "column", (int *)DAVE_COLUMN); g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model); diff --git a/demos/icon-browser/iconbrowserwin.c b/demos/icon-browser/iconbrowserwin.c index cfd91b2f0f..b276fdd142 100644 --- a/demos/icon-browser/iconbrowserwin.c +++ b/demos/icon-browser/iconbrowserwin.c @@ -161,7 +161,7 @@ copy_to_clipboard (GtkButton *button, } static void -set_image (GtkWidget *image, const gchar *name, gint size) +set_image (GtkWidget *image, const gchar *name, int size) { gtk_image_set_from_icon_name (GTK_IMAGE (image), name); gtk_image_set_pixel_size (GTK_IMAGE (image), size); diff --git a/demos/node-editor/node-editor-application.c b/demos/node-editor/node-editor-application.c index abc8dea47b..6fefa60b7a 100644 --- a/demos/node-editor/node-editor-application.c +++ b/demos/node-editor/node-editor-application.c @@ -199,11 +199,11 @@ node_editor_application_activate (GApplication *app) static void node_editor_application_open (GApplication *app, GFile **files, - gint n_files, + int n_files, const gchar *hint) { NodeEditorWindow *win; - gint i; + int i; for (i = 0; i < n_files; i++) { diff --git a/demos/node-editor/node-editor-window.c b/demos/node-editor/node-editor-window.c index 293a558622..7b20364496 100644 --- a/demos/node-editor/node-editor-window.c +++ b/demos/node-editor/node-editor-window.c @@ -288,14 +288,14 @@ text_view_query_tooltip_cb (GtkWidget *widget, if (keyboard_tip) { - gint offset; + int offset; g_object_get (self->text_buffer, "cursor-position", &offset, NULL); gtk_text_buffer_get_iter_at_offset (self->text_buffer, &iter, offset); } else { - gint bx, by, trailing; + int bx, by, trailing; gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (self->text_view), GTK_TEXT_WINDOW_TEXT, x, y, &bx, &by); @@ -399,7 +399,7 @@ node_editor_window_load (NodeEditorWindow *self, static void open_response_cb (GtkWidget *dialog, - gint response, + int response, NodeEditorWindow *self) { gtk_widget_hide (dialog); @@ -448,7 +448,7 @@ open_cb (GtkWidget *button, static void save_response_cb (GtkWidget *dialog, - gint response, + int response, NodeEditorWindow *self) { gtk_widget_hide (dialog); @@ -577,7 +577,7 @@ create_cairo_texture (NodeEditorWindow *self) static void export_image_response_cb (GtkWidget *dialog, - gint response, + int response, GdkTexture *texture) { gtk_widget_hide (dialog); diff --git a/demos/print-editor/print-editor.c b/demos/print-editor/print-editor.c index eda61a061d..69a5819ae3 100644 --- a/demos/print-editor/print-editor.c +++ b/demos/print-editor/print-editor.c @@ -34,7 +34,7 @@ static void update_statusbar (void) { gchar *msg; - gint row, col; + int row, col; GtkTextIter iter; const char *print_str; diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c index abc5fd12ba..f48a906e1b 100644 --- a/demos/widget-factory/widget-factory.c +++ b/demos/widget-factory/widget-factory.c @@ -139,9 +139,9 @@ get_busy (GSimpleAction *action, gtk_widget_set_sensitive (window, FALSE); } -static gint current_page = 0; +static int current_page = 0; static gboolean -on_page (gint i) +on_page (int i) { return current_page == i; } @@ -422,7 +422,7 @@ static void spin_value_changed (GtkAdjustment *adjustment, GtkWidget *label) { GtkWidget *w; - gint v; + int v; gchar *text; v = (int)gtk_adjustment_get_value (adjustment); @@ -454,8 +454,8 @@ spin_value_reset (GtkWidget *button, GtkAdjustment *adjustment) dismiss (button); } -static gint pulse_time = 250; -static gint pulse_entry_mode = 0; +static int pulse_time = 250; +static int pulse_entry_mode = 0; static void remove_pulse (gpointer pulse_id) @@ -557,9 +557,9 @@ on_scale_button_value_changed (GtkScaleButton *button, } else { - gint percent; + int percent; - percent = (gint) (100. * val / (gtk_adjustment_get_upper (adjustment) - gtk_adjustment_get_lower (adjustment)) + .5); + percent = (int) (100. * val / (gtk_adjustment_get_upper (adjustment) - gtk_adjustment_get_lower (adjustment)) + .5); str = g_strdup_printf (C_("volume percentage", "%d %%"), percent); } @@ -627,7 +627,7 @@ static void on_range_from_changed (GtkSpinButton *from) { GtkSpinButton *to; - gint v1, v2; + int v1, v2; to = GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (from), "range_to_spin")); @@ -642,7 +642,7 @@ static void on_range_to_changed (GtkSpinButton *to) { GtkSpinButton *from; - gint v1, v2; + int v1, v2; from = GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (to), "range_from_spin")); @@ -654,7 +654,7 @@ on_range_to_changed (GtkSpinButton *to) } static void -info_bar_response (GtkWidget *infobar, gint response_id) +info_bar_response (GtkWidget *infobar, int response_id) { if (response_id == GTK_RESPONSE_CLOSE) gtk_widget_hide (infobar); @@ -1025,7 +1025,7 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser) { "7.5", "#C48299", NULL }, { "10", "#C68292", NULL } }; - gint i; + int i; GtkWidget *row, *box, *label, *swatch; GtkWidget *sw; GdkRGBA rgba; @@ -1331,7 +1331,7 @@ my_text_view_set_adjustment (MyTextView *tv, GtkAdjustment *adjustment) } static void -close_selection_dialog (GtkWidget *dialog, gint response, GtkWidget *tv) +close_selection_dialog (GtkWidget *dialog, int response, GtkWidget *tv) { GtkWidget *box; GtkWidget *child; @@ -1886,7 +1886,7 @@ activate (GApplication *app) { "app.paste", { "v", NULL } }, { "win.delete", { "Delete", NULL } }, }; - gint i; + int i; GPermission *permission; GAction *action; GError *error = NULL; @@ -2282,7 +2282,7 @@ main (int argc, char *argv[]) { "check-off-disabled", NULL, NULL, "false", NULL }, { "radio-x-disabled", NULL, "s", "'x'", NULL }, }; - gint status; + int status; app = gtk_application_new ("org.gtk.WidgetFactory4", G_APPLICATION_NON_UNIQUE); diff --git a/docs/CODING-STYLE.md b/docs/CODING-STYLE.md index 1867bf3fc1..3fc2e0c101 100644 --- a/docs/CODING-STYLE.md +++ b/docs/CODING-STYLE.md @@ -486,7 +486,7 @@ It is also possible to align the columns to the next tab: void gtk_type_set_prop (GtkType *type, gfloat value); gfloat gtk_type_get_prop (GtkType *type); - gint gtk_type_update_foobar (GtkType *type); + int gtk_type_update_foobar (GtkType *type); ``` Public headers should never be included directly: diff --git a/docs/reference/gtk/getting_started.md b/docs/reference/gtk/getting_started.md index 42db8ce36e..6252defd18 100644 --- a/docs/reference/gtk/getting_started.md +++ b/docs/reference/gtk/getting_started.md @@ -797,7 +797,7 @@ example_app_activate (GApplication *app) static void example_app_open (GApplication *app, GFile **files, - gint n_files, + int n_files, const gchar *hint) { GList *windows; diff --git a/docs/tools/shooter.c b/docs/tools/shooter.c index ae2dc14f92..09dea4a26b 100644 --- a/docs/tools/shooter.c +++ b/docs/tools/shooter.c @@ -141,8 +141,8 @@ take_window_shot (Window child, XWindowAttributes attrs; Window xid; Display *dpy; - gint x = 0, y = 0; - gint width, height; + int x = 0, y = 0; + int width, height; GdkPixbuf *tmp, *tmp2; GdkPixbuf *retval = NULL; diff --git a/examples/application1/exampleapp.c b/examples/application1/exampleapp.c index 565bc35c75..a730c1f555 100644 --- a/examples/application1/exampleapp.c +++ b/examples/application1/exampleapp.c @@ -27,7 +27,7 @@ example_app_activate (GApplication *app) static void example_app_open (GApplication *app, GFile **files, - gint n_files, + int n_files, const gchar *hint) { GList *windows; diff --git a/examples/application2/exampleapp.c b/examples/application2/exampleapp.c index 565bc35c75..a730c1f555 100644 --- a/examples/application2/exampleapp.c +++ b/examples/application2/exampleapp.c @@ -27,7 +27,7 @@ example_app_activate (GApplication *app) static void example_app_open (GApplication *app, GFile **files, - gint n_files, + int n_files, const gchar *hint) { GList *windows; diff --git a/examples/application3/exampleapp.c b/examples/application3/exampleapp.c index 565bc35c75..a730c1f555 100644 --- a/examples/application3/exampleapp.c +++ b/examples/application3/exampleapp.c @@ -27,7 +27,7 @@ example_app_activate (GApplication *app) static void example_app_open (GApplication *app, GFile **files, - gint n_files, + int n_files, const gchar *hint) { GList *windows; diff --git a/examples/application4/exampleapp.c b/examples/application4/exampleapp.c index 6ab68aebc3..1376001f2c 100644 --- a/examples/application4/exampleapp.c +++ b/examples/application4/exampleapp.c @@ -63,7 +63,7 @@ example_app_activate (GApplication *app) static void example_app_open (GApplication *app, GFile **files, - gint n_files, + int n_files, const gchar *hint) { GList *windows; diff --git a/examples/application5/exampleapp.c b/examples/application5/exampleapp.c index 6ab68aebc3..1376001f2c 100644 --- a/examples/application5/exampleapp.c +++ b/examples/application5/exampleapp.c @@ -63,7 +63,7 @@ example_app_activate (GApplication *app) static void example_app_open (GApplication *app, GFile **files, - gint n_files, + int n_files, const gchar *hint) { GList *windows; diff --git a/examples/application6/exampleapp.c b/examples/application6/exampleapp.c index 8ac0ebd529..89389fb52d 100644 --- a/examples/application6/exampleapp.c +++ b/examples/application6/exampleapp.c @@ -70,7 +70,7 @@ example_app_activate (GApplication *app) static void example_app_open (GApplication *app, GFile **files, - gint n_files, + int n_files, const gchar *hint) { GList *windows; diff --git a/examples/application7/exampleapp.c b/examples/application7/exampleapp.c index 8ac0ebd529..89389fb52d 100644 --- a/examples/application7/exampleapp.c +++ b/examples/application7/exampleapp.c @@ -70,7 +70,7 @@ example_app_activate (GApplication *app) static void example_app_open (GApplication *app, GFile **files, - gint n_files, + int n_files, const gchar *hint) { GList *windows; diff --git a/examples/application8/exampleapp.c b/examples/application8/exampleapp.c index 8ac0ebd529..89389fb52d 100644 --- a/examples/application8/exampleapp.c +++ b/examples/application8/exampleapp.c @@ -70,7 +70,7 @@ example_app_activate (GApplication *app) static void example_app_open (GApplication *app, GFile **files, - gint n_files, + int n_files, const gchar *hint) { GList *windows; diff --git a/examples/application9/exampleapp.c b/examples/application9/exampleapp.c index 8ac0ebd529..89389fb52d 100644 --- a/examples/application9/exampleapp.c +++ b/examples/application9/exampleapp.c @@ -70,7 +70,7 @@ example_app_activate (GApplication *app) static void example_app_open (GApplication *app, GFile **files, - gint n_files, + int n_files, const gchar *hint) { GList *windows; diff --git a/examples/bp/bloatpad.c b/examples/bp/bloatpad.c index ecaa9bc125..18fc9ae1ef 100644 --- a/examples/bp/bloatpad.c +++ b/examples/bp/bloatpad.c @@ -150,7 +150,7 @@ text_buffer_changed_cb (GtkTextBuffer *buffer, { GtkWindow *window = user_data; BloatPad *app; - gint old_n, n; + int old_n, n; app = (BloatPad *) gtk_window_get_application (window); @@ -293,10 +293,10 @@ bloat_pad_activate (GApplication *application) static void bloat_pad_open (GApplication *application, GFile **files, - gint n_files, + int n_files, const gchar *hint) { - gint i; + int i; for (i = 0; i < n_files; i++) new_window (application, files[i]); @@ -400,7 +400,7 @@ edit_accels (GSimpleAction *action, GtkWidget *entry; gchar **actions; GtkWidget *dialog; - gint i; + int i; dialog = gtk_dialog_new (); gtk_window_set_application (GTK_WINDOW (dialog), app); @@ -482,7 +482,7 @@ static void dump_accels (GtkApplication *app) { gchar **actions; - gint i; + int i; actions = gtk_application_list_action_descriptions (app); for (i = 0; actions[i]; i++) @@ -512,7 +512,7 @@ bloat_pad_startup (GApplication *application) GIcon *icon2; GEmblem *emblem; GFile *file; - gint i; + int i; struct { const gchar *action_and_target; const gchar *accelerators[2]; diff --git a/examples/plugman.c b/examples/plugman.c index fa7359ab26..d6add253f7 100644 --- a/examples/plugman.c +++ b/examples/plugman.c @@ -124,10 +124,10 @@ plug_man_activate (GApplication *application) static void plug_man_open (GApplication *application, GFile **files, - gint n_files, + int n_files, const gchar *hint) { - gint i; + int i; for (i = 0; i < n_files; i++) new_window (application, files[i]); @@ -281,7 +281,7 @@ disable_plugin (const gchar *name) plugin_menu = find_plugin_menu (); if (plugin_menu) { - gint i; + int i; for (i = 0; i < g_menu_model_get_n_items (plugin_menu); i++) { diff --git a/examples/search-bar.c b/examples/search-bar.c index 5790852957..d554529413 100644 --- a/examples/search-bar.c +++ b/examples/search-bar.c @@ -32,8 +32,8 @@ activate_cb (GtkApplication *app, gtk_search_bar_set_key_capture_widget (GTK_SEARCH_BAR (search_bar), window); } -gint -main (gint argc, +int +main (int argc, gchar *argv[]) { GtkApplication *app; diff --git a/examples/sunny.c b/examples/sunny.c index 2a22757e89..9cfd8bcbc0 100644 --- a/examples/sunny.c +++ b/examples/sunny.c @@ -55,10 +55,10 @@ activate (GApplication *application) static void open (GApplication *application, GFile **files, - gint n_files, + int n_files, const gchar *hint) { - gint i; + int i; for (i = 0; i < n_files; i++) new_window (application, files[i]); diff --git a/gdk/broadway/broadway-output.c b/gdk/broadway/broadway-output.c index 15d76cda75..896b25f590 100644 --- a/gdk/broadway/broadway-output.c +++ b/gdk/broadway/broadway-output.c @@ -310,7 +310,7 @@ broadway_output_set_transient_for (BroadwayOutput *output, append_uint16 (output, parent_id); } -static gint append_node_depth = -1; +static int append_node_depth = -1; static void append_type (BroadwayOutput *output, guint32 type, BroadwayNode *node) diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c index c444e4f14e..df6d25c066 100644 --- a/gdk/broadway/broadway-server.c +++ b/gdk/broadway/broadway-server.c @@ -63,7 +63,7 @@ struct _BroadwayServer { GList *surfaces; BroadwaySurface *root; gint32 focused_surface_id; /* -1 => none */ - gint show_keyboard; + int show_keyboard; guint32 next_texture_id; GHashTable *textures; @@ -970,7 +970,7 @@ broadway_server_get_screen_size (BroadwayServer *server, static void broadway_server_fake_roundtrip_reply (BroadwayServer *server, - gint id, + int id, guint32 tag) { BroadwayInputMsg msg; @@ -1001,7 +1001,7 @@ broadway_server_flush (BroadwayServer *server) void broadway_server_roundtrip (BroadwayServer *server, - gint id, + int id, guint32 tag) { if (server->output) @@ -1565,7 +1565,7 @@ broadway_server_query_mouse (BroadwayServer *server, void broadway_server_destroy_surface (BroadwayServer *server, - gint id) + int id) { BroadwaySurface *surface; @@ -1594,7 +1594,7 @@ broadway_server_destroy_surface (BroadwayServer *server, gboolean broadway_server_surface_show (BroadwayServer *server, - gint id) + int id) { BroadwaySurface *surface; gboolean sent = FALSE; @@ -1616,7 +1616,7 @@ broadway_server_surface_show (BroadwayServer *server, gboolean broadway_server_surface_hide (BroadwayServer *server, - gint id) + int id) { BroadwaySurface *surface; gboolean sent = FALSE; @@ -1646,7 +1646,7 @@ broadway_server_surface_hide (BroadwayServer *server, void broadway_server_surface_raise (BroadwayServer *server, - gint id) + int id) { BroadwaySurface *surface; @@ -1676,7 +1676,7 @@ broadway_server_set_show_keyboard (BroadwayServer *server, void broadway_server_surface_lower (BroadwayServer *server, - gint id) + int id) { BroadwaySurface *surface; @@ -1693,7 +1693,7 @@ broadway_server_surface_lower (BroadwayServer *server, void broadway_server_surface_set_transient_for (BroadwayServer *server, - gint id, gint parent) + int id, int parent) { BroadwaySurface *surface; @@ -1865,7 +1865,7 @@ decode_nodes (BroadwayServer *server, /* passes ownership of nodes */ void broadway_server_surface_update_nodes (BroadwayServer *server, - gint id, + int id, guint32 data[], int len, GHashTable *client_texture_map) @@ -1946,7 +1946,7 @@ broadway_server_release_texture (BroadwayServer *server, gboolean broadway_server_surface_move_resize (BroadwayServer *server, - gint id, + int id, gboolean with_move, int x, int y, @@ -1989,7 +1989,7 @@ broadway_server_surface_move_resize (BroadwayServer *server, void broadway_server_focus_surface (BroadwayServer *server, - gint new_focused_surface) + int new_focused_surface) { BroadwayInputMsg focus_msg; @@ -2010,8 +2010,8 @@ broadway_server_focus_surface (BroadwayServer *server, guint32 broadway_server_grab_pointer (BroadwayServer *server, - gint client_id, - gint id, + int client_id, + int id, gboolean owner_events, guint32 event_mask, guint32 time_) diff --git a/gdk/broadway/broadway-server.h b/gdk/broadway/broadway-server.h index 7c5d97e4aa..fd027a664e 100644 --- a/gdk/broadway/broadway-server.h +++ b/gdk/broadway/broadway-server.h @@ -60,7 +60,7 @@ gboolean broadway_server_has_client (BroadwayServer * void broadway_server_flush (BroadwayServer *server); void broadway_server_sync (BroadwayServer *server); void broadway_server_roundtrip (BroadwayServer *server, - gint id, + int id, guint32 tag); void broadway_server_get_screen_size (BroadwayServer *server, guint32 *width, @@ -76,8 +76,8 @@ void broadway_server_query_mouse (BroadwayServer * gint32 *root_y, guint32 *mask); guint32 broadway_server_grab_pointer (BroadwayServer *server, - gint client_id, - gint id, + int client_id, + int id, gboolean owner_events, guint32 event_mask, guint32 time_); @@ -93,23 +93,23 @@ guint32 broadway_server_new_surface (BroadwayServer * int width, int height); void broadway_server_destroy_surface (BroadwayServer *server, - gint id); + int id); gboolean broadway_server_surface_show (BroadwayServer *server, - gint id); + int id); gboolean broadway_server_surface_hide (BroadwayServer *server, - gint id); + int id); void broadway_server_surface_raise (BroadwayServer *server, - gint id); + int id); void broadway_server_surface_lower (BroadwayServer *server, - gint id); + int id); void broadway_server_surface_set_transient_for (BroadwayServer *server, - gint id, - gint parent); + int id, + int parent); gboolean broadway_server_surface_translate (BroadwayServer *server, - gint id, + int id, cairo_region_t *area, - gint dx, - gint dy); + int dx, + int dy); guint32 broadway_server_upload_texture (BroadwayServer *server, GBytes *texture); void broadway_server_release_texture (BroadwayServer *server, @@ -117,19 +117,19 @@ void broadway_server_release_texture (BroadwayServer * cairo_surface_t * broadway_server_create_surface (int width, int height); void broadway_server_surface_update_nodes (BroadwayServer *server, - gint id, + int id, guint32 data[], int len, GHashTable *client_texture_map); gboolean broadway_server_surface_move_resize (BroadwayServer *server, - gint id, + int id, gboolean with_move, int x, int y, int width, int height); void broadway_server_focus_surface (BroadwayServer *server, - gint new_focused_surface); + int new_focused_surface); #endif /* __BROADWAY_SERVER__ */ diff --git a/gdk/broadway/gdkbroadway-server.c b/gdk/broadway/gdkbroadway-server.c index 6e235e1b52..2807e6d46a 100644 --- a/gdk/broadway/gdkbroadway-server.c +++ b/gdk/broadway/gdkbroadway-server.c @@ -501,7 +501,7 @@ _gdk_broadway_server_new_surface (GdkBroadwayServer *server, void _gdk_broadway_server_destroy_surface (GdkBroadwayServer *server, - gint id) + int id) { BroadwayRequestDestroySurface msg; @@ -512,7 +512,7 @@ _gdk_broadway_server_destroy_surface (GdkBroadwayServer *server, gboolean _gdk_broadway_server_surface_show (GdkBroadwayServer *server, - gint id) + int id) { BroadwayRequestShowSurface msg; @@ -525,7 +525,7 @@ _gdk_broadway_server_surface_show (GdkBroadwayServer *server, gboolean _gdk_broadway_server_surface_hide (GdkBroadwayServer *server, - gint id) + int id) { BroadwayRequestHideSurface msg; @@ -538,7 +538,7 @@ _gdk_broadway_server_surface_hide (GdkBroadwayServer *server, void _gdk_broadway_server_surface_focus (GdkBroadwayServer *server, - gint id) + int id) { BroadwayRequestFocusSurface msg; @@ -549,7 +549,7 @@ _gdk_broadway_server_surface_focus (GdkBroadwayServer *server, void _gdk_broadway_server_surface_set_transient_for (GdkBroadwayServer *server, - gint id, gint parent) + int id, int parent) { BroadwayRequestSetTransientFor msg; @@ -692,7 +692,7 @@ gdk_broadway_server_surface_set_nodes (GdkBroadwayServer *server, gboolean _gdk_broadway_server_surface_move_resize (GdkBroadwayServer *server, - gint id, + int id, gboolean with_move, int x, int y, @@ -716,7 +716,7 @@ _gdk_broadway_server_surface_move_resize (GdkBroadwayServer *server, GdkGrabStatus _gdk_broadway_server_grab_pointer (GdkBroadwayServer *server, - gint id, + int id, gboolean owner_events, guint32 event_mask, guint32 time_) diff --git a/gdk/broadway/gdkbroadway-server.h b/gdk/broadway/gdkbroadway-server.h index 8bdcbb45c1..0dd021103a 100644 --- a/gdk/broadway/gdkbroadway-server.h +++ b/gdk/broadway/gdkbroadway-server.h @@ -32,7 +32,7 @@ void _gdk_broadway_server_query_mouse (GdkBroadwaySer gint32 *root_y, guint32 *mask); GdkGrabStatus _gdk_broadway_server_grab_pointer (GdkBroadwayServer *server, - gint id, + int id, gboolean owner_events, guint32 event_mask, guint32 time_); @@ -45,23 +45,23 @@ guint32 _gdk_broadway_server_new_surface (GdkBroadwaySe int width, int height); void _gdk_broadway_server_destroy_surface (GdkBroadwayServer *server, - gint id); + int id); gboolean _gdk_broadway_server_surface_show (GdkBroadwayServer *server, - gint id); + int id); gboolean _gdk_broadway_server_surface_hide (GdkBroadwayServer *server, - gint id); + int id); void _gdk_broadway_server_surface_focus (GdkBroadwayServer *server, - gint id); + int id); void _gdk_broadway_server_surface_set_transient_for (GdkBroadwayServer *server, - gint id, - gint parent); + int id, + int parent); void _gdk_broadway_server_set_show_keyboard (GdkBroadwayServer *server, gboolean show_keyboard); gboolean _gdk_broadway_server_surface_translate (GdkBroadwayServer *server, - gint id, + int id, cairo_region_t *area, - gint dx, - gint dy); + int dx, + int dy); guint32 gdk_broadway_server_upload_texture (GdkBroadwayServer *server, GdkTexture *texture); void gdk_broadway_server_release_texture (GdkBroadwayServer *server, @@ -70,7 +70,7 @@ void gdk_broadway_server_surface_set_nodes (GdkBroadwaySe guint32 id, GArray *nodes); gboolean _gdk_broadway_server_surface_move_resize (GdkBroadwayServer *server, - gint id, + int id, gboolean with_move, int x, int y, diff --git a/gdk/broadway/gdkeventsource.c b/gdk/broadway/gdkeventsource.c index 3c2e98dbcc..ae3b38fab5 100644 --- a/gdk/broadway/gdkeventsource.c +++ b/gdk/broadway/gdkeventsource.c @@ -25,7 +25,7 @@ #include static gboolean gdk_event_source_prepare (GSource *source, - gint *timeout); + int *timeout); static gboolean gdk_event_source_check (GSource *source); static gboolean gdk_event_source_dispatch (GSource *source, GSourceFunc callback, @@ -54,7 +54,7 @@ static GList *event_sources = NULL; static gboolean gdk_event_source_prepare (GSource *source, - gint *timeout) + int *timeout) { GdkDisplay *display = ((GdkEventSource*) source)->display; gboolean retval; diff --git a/gdk/broadway/gdkkeys-broadway.c b/gdk/broadway/gdkkeys-broadway.c index 60d8715663..5fe3719ac7 100644 --- a/gdk/broadway/gdkkeys-broadway.c +++ b/gdk/broadway/gdkkeys-broadway.c @@ -142,7 +142,7 @@ gdk_broadway_keymap_get_entries_for_keycode (GdkKeymap *keymap, guint hardware_keycode, GdkKeymapKey **keys, guint **keyvals, - gint *n_entries) + int *n_entries) { if (n_entries) *n_entries = 1; @@ -171,10 +171,10 @@ static gboolean gdk_broadway_keymap_translate_keyboard_state (GdkKeymap *keymap, guint hardware_keycode, GdkModifierType state, - gint group, + int group, guint *keyval, - gint *effective_group, - gint *level, + int *effective_group, + int *level, GdkModifierType *consumed_modifiers) { if (keyval) diff --git a/gdk/broadway/gdkprivate-broadway.h b/gdk/broadway/gdkprivate-broadway.h index 0a3b6d8b9d..98d02958c8 100644 --- a/gdk/broadway/gdkprivate-broadway.h +++ b/gdk/broadway/gdkprivate-broadway.h @@ -55,8 +55,8 @@ GdkDrag * _gdk_broadway_surface_drag_begin (GdkSurface *surface, double dy); void _gdk_broadway_surface_translate (GdkSurface *surface, cairo_region_t *area, - gint dx, - gint dy); + int dx, + int dy); gboolean _gdk_broadway_moveresize_handle_event (GdkDisplay *display, BroadwayInputMsg *msg); gboolean _gdk_broadway_moveresize_configure_done (GdkDisplay *display, @@ -69,13 +69,13 @@ void _gdk_broadway_surface_grab_check_unmap (GdkSurface *surface, gulong serial); void gdk_broadway_surface_move_resize (GdkSurface *surface, - gint x, - gint y, - gint width, - gint height); + int x, + int y, + int width, + int height); void _gdk_keymap_keys_changed (GdkDisplay *display); -gint _gdk_broadway_get_group_for_state (GdkDisplay *display, +int _gdk_broadway_get_group_for_state (GdkDisplay *display, GdkModifierType state); void _gdk_keymap_add_virtual_modifiers_compat (GdkKeymap *keymap, GdkModifierType *modifiers); diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c index 5b278ce7c3..8d7fb8d954 100644 --- a/gdk/broadway/gdksurface-broadway.c +++ b/gdk/broadway/gdksurface-broadway.c @@ -405,7 +405,7 @@ gdk_broadway_surface_hide (GdkSurface *surface) _gdk_surface_clear_update_area (surface); } -static gint +static int gdk_broadway_surface_get_scale_factor (GdkSurface *surface) { GdkBroadwayDisplay *broadway_display; @@ -456,10 +456,10 @@ sync_child_root_pos (GdkSurface *parent) static void gdk_broadway_surface_move_resize_internal (GdkSurface *surface, gboolean with_move, - gint x, - gint y, - gint width, - gint height) + int x, + int y, + int width, + int height) { GdkBroadwaySurface *impl = GDK_BROADWAY_SURFACE (surface); GdkBroadwayDisplay *broadway_display; @@ -522,10 +522,10 @@ gdk_broadway_surface_move_resize_internal (GdkSurface *surface, void gdk_broadway_surface_move_resize (GdkSurface *surface, - gint x, - gint y, - gint width, - gint height) + int x, + int y, + int width, + int height) { gdk_broadway_surface_move_resize_internal (surface, TRUE, x, y, @@ -534,8 +534,8 @@ gdk_broadway_surface_move_resize (GdkSurface *surface, static void gdk_broadway_surface_toplevel_resize (GdkSurface *surface, - gint width, - gint height) + int width, + int height) { gdk_broadway_surface_move_resize_internal (surface, FALSE, 0, 0, @@ -544,8 +544,8 @@ gdk_broadway_surface_toplevel_resize (GdkSurface *surface, static void gdk_broadway_surface_move (GdkSurface *surface, - gint x, - gint y) + int x, + int y) { gdk_broadway_surface_move_resize_internal (surface, TRUE, x, y, -1, -1); } @@ -696,10 +696,10 @@ gdk_broadway_surface_set_transient_for (GdkSurface *surface, static void gdk_broadway_surface_get_geometry (GdkSurface *surface, - gint *x, - gint *y, - gint *width, - gint *height) + int *x, + int *y, + int *width, + int *height) { g_return_if_fail (GDK_IS_SURFACE (surface)); @@ -718,10 +718,10 @@ gdk_broadway_surface_get_geometry (GdkSurface *surface, static void gdk_broadway_surface_get_root_coords (GdkSurface *surface, - gint x, - gint y, - gint *root_x, - gint *root_y) + int x, + int y, + int *root_x, + int *root_y) { GdkBroadwaySurface *impl; @@ -839,13 +839,13 @@ struct _MoveResizeData GdkSurface *moveresize_emulation_surface; gboolean is_resize; GdkSurfaceEdge resize_edge; - gint moveresize_button; - gint moveresize_x; - gint moveresize_y; - gint moveresize_orig_x; - gint moveresize_orig_y; - gint moveresize_orig_width; - gint moveresize_orig_height; + int moveresize_button; + int moveresize_x; + int moveresize_y; + int moveresize_orig_x; + int moveresize_orig_y; + int moveresize_orig_width; + int moveresize_orig_height; long moveresize_process_time; GdkSurfaceHints moveresize_geom_mask; GdkGeometry moveresize_geometry; @@ -876,17 +876,17 @@ get_move_resize_data (GdkDisplay *display, static void update_pos (MoveResizeData *mv_resize, - gint new_root_x, - gint new_root_y) + int new_root_x, + int new_root_y) { - gint dx, dy; + int dx, dy; dx = new_root_x - mv_resize->moveresize_x; dy = new_root_y - mv_resize->moveresize_y; if (mv_resize->is_resize) { - gint x, y, w, h; + int x, y, w, h; x = mv_resize->moveresize_orig_x; y = mv_resize->moveresize_orig_y; @@ -951,7 +951,7 @@ update_pos (MoveResizeData *mv_resize, } else { - gint x, y; + int x, y; x = mv_resize->moveresize_orig_x + dx; y = mv_resize->moveresize_orig_y + dy; @@ -1129,7 +1129,7 @@ create_moveresize_surface (MoveResizeData *mv_resize, static void calculate_unmoving_origin (MoveResizeData *mv_resize) { - gint x, y, width, height; + int x, y, width, height; if (mv_resize->moveresize_geom_mask & GDK_HINT_WIN_GRAVITY && mv_resize->moveresize_geometry.win_gravity == GDK_GRAVITY_STATIC) diff --git a/gdk/gdk.c b/gdk/gdk.c index e32e60ec31..bb6c1fc457 100644 --- a/gdk/gdk.c +++ b/gdk/gdk.c @@ -403,7 +403,7 @@ gdk_unichar_direction (gunichar ch) PangoDirection gdk_find_base_dir (const gchar *text, - gint length) + int length) { PangoDirection dir = PANGO_DIRECTION_NEUTRAL; const gchar *p; diff --git a/gdk/gdkapplaunchcontext.c b/gdk/gdkapplaunchcontext.c index a3410f6cd8..a466209939 100644 --- a/gdk/gdkapplaunchcontext.c +++ b/gdk/gdkapplaunchcontext.c @@ -205,7 +205,7 @@ gdk_app_launch_context_get_display (GdkAppLaunchContext *context) */ void gdk_app_launch_context_set_desktop (GdkAppLaunchContext *context, - gint desktop) + int desktop) { g_return_if_fail (GDK_IS_APP_LAUNCH_CONTEXT (context)); diff --git a/gdk/gdkapplaunchcontext.h b/gdk/gdkapplaunchcontext.h index 575a867501..73296592f4 100644 --- a/gdk/gdkapplaunchcontext.h +++ b/gdk/gdkapplaunchcontext.h @@ -43,7 +43,7 @@ GdkDisplay * gdk_app_launch_context_get_display (GdkAppLaunchContext * GDK_AVAILABLE_IN_ALL void gdk_app_launch_context_set_desktop (GdkAppLaunchContext *context, - gint desktop); + int desktop); GDK_AVAILABLE_IN_ALL void gdk_app_launch_context_set_timestamp (GdkAppLaunchContext *context, guint32 timestamp); diff --git a/gdk/gdkapplaunchcontextprivate.h b/gdk/gdkapplaunchcontextprivate.h index 9a2bb7199b..e4262f1b5f 100644 --- a/gdk/gdkapplaunchcontextprivate.h +++ b/gdk/gdkapplaunchcontextprivate.h @@ -35,7 +35,7 @@ struct _GdkAppLaunchContext GAppLaunchContext parent_instance; GdkDisplay *display; - gint workspace; + int workspace; guint32 timestamp; GIcon *icon; char *icon_name; diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c index e9fcdff086..908fc75af8 100644 --- a/gdk/gdkcairo.c +++ b/gdk/gdkcairo.c @@ -91,7 +91,7 @@ gdk_cairo_region (cairo_t *cr, const cairo_region_t *region) { cairo_rectangle_int_t box; - gint n_boxes, i; + int n_boxes, i; g_return_if_fail (cr != NULL); g_return_if_fail (region != NULL); @@ -109,7 +109,7 @@ void gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface, const GdkPixbuf *pixbuf) { - gint width, height; + int width, height; guchar *gdk_pixels, *cairo_pixels; int gdk_rowstride, cairo_stride; int n_channels; @@ -312,7 +312,7 @@ gdk_cairo_region_create_from_surface (cairo_surface_t *surface) GdkRectangle extents, rect; cairo_surface_t *image; cairo_t *cr; - gint x, y, stride; + int x, y, stride; guchar *data; _gdk_cairo_surface_extents (surface, &extents); @@ -347,7 +347,7 @@ gdk_cairo_region_create_from_surface (cairo_surface_t *surface) for (x = 0; x < extents.width; x++) { /* Search for a continuous range of "non transparent pixels"*/ - gint x0 = x; + int x0 = x; while (x < extents.width) { #if G_BYTE_ORDER == G_LITTLE_ENDIAN diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c index 4889d7b232..5cddd20c78 100644 --- a/gdk/gdkdevice.c +++ b/gdk/gdkdevice.c @@ -850,7 +850,7 @@ gdk_device_get_device_type (GdkDevice *device) * * Returns: the number of axes. **/ -gint +int gdk_device_get_n_axes (GdkDevice *device) { g_return_val_if_fail (GDK_IS_DEVICE (device), 0); @@ -877,7 +877,7 @@ gdk_device_get_axis (GdkDevice *device, GdkAxisUse use, gdouble *value) { - gint i; + int i; g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE); g_return_val_if_fail (device->source != GDK_SOURCE_KEYBOARD, FALSE); @@ -980,7 +980,7 @@ gdk_device_ungrab (GdkDevice *device, void _gdk_device_reset_axes (GdkDevice *device) { - gint i; + int i; for (i = device->axes->len - 1; i >= 0; i--) g_array_remove_index (device->axes, i); @@ -1061,7 +1061,7 @@ find_axis_info (GArray *array, GdkAxisUse use) { GdkAxisInfo *info; - gint i; + int i; for (i = 0; i < GDK_AXIS_LAST; i++) { @@ -1089,7 +1089,7 @@ _gdk_device_translate_surface_coord (GdkDevice *device, gdouble x_min, y_min; gdouble x_resolution, y_resolution; gdouble device_aspect; - gint surface_width, surface_height; + int surface_width, surface_height; if (index_ >= device->axes->len) return FALSE; diff --git a/gdk/gdkdevice.h b/gdk/gdkdevice.h index b9206fcbab..caa557c266 100644 --- a/gdk/gdkdevice.h +++ b/gdk/gdkdevice.h @@ -124,7 +124,7 @@ GdkSurface * gdk_device_get_surface_at_position (GdkDevice *device, double *win_y); GDK_AVAILABLE_IN_ALL -gint gdk_device_get_n_axes (GdkDevice *device); +int gdk_device_get_n_axes (GdkDevice *device); GDK_AVAILABLE_IN_ALL gboolean gdk_device_get_axis (GdkDevice *device, gdouble *axes, diff --git a/gdk/gdkdevicepad.c b/gdk/gdkdevicepad.c index aa0642e292..05b620a52b 100644 --- a/gdk/gdkdevicepad.c +++ b/gdk/gdkdevicepad.c @@ -73,7 +73,7 @@ gdk_device_pad_default_init (GdkDevicePadInterface *pad) * * Returns: The number of button/ring/strip groups in the pad. **/ -gint +int gdk_device_pad_get_n_groups (GdkDevicePad *pad) { GdkDevicePadInterface *iface = GDK_DEVICE_PAD_GET_IFACE (pad); @@ -92,9 +92,9 @@ gdk_device_pad_get_n_groups (GdkDevicePad *pad) * * Returns: The number of modes available in @group. **/ -gint +int gdk_device_pad_get_group_n_modes (GdkDevicePad *pad, - gint group_idx) + int group_idx) { GdkDevicePadInterface *iface = GDK_DEVICE_PAD_GET_IFACE (pad); @@ -113,7 +113,7 @@ gdk_device_pad_get_group_n_modes (GdkDevicePad *pad, * * Returns: The amount of elements of type @feature that this pad has. **/ -gint +int gdk_device_pad_get_n_features (GdkDevicePad *pad, GdkDevicePadFeature feature) { @@ -135,10 +135,10 @@ gdk_device_pad_get_n_features (GdkDevicePad *pad, * * Returns: The group number of the queried pad feature. **/ -gint +int gdk_device_pad_get_feature_group (GdkDevicePad *pad, GdkDevicePadFeature feature, - gint idx) + int idx) { GdkDevicePadInterface *iface = GDK_DEVICE_PAD_GET_IFACE (pad); diff --git a/gdk/gdkdevicepad.h b/gdk/gdkdevicepad.h index 475e51a45a..f8d6da1a76 100644 --- a/gdk/gdkdevicepad.h +++ b/gdk/gdkdevicepad.h @@ -54,20 +54,20 @@ GDK_AVAILABLE_IN_ALL GType gdk_device_pad_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -gint gdk_device_pad_get_n_groups (GdkDevicePad *pad); +int gdk_device_pad_get_n_groups (GdkDevicePad *pad); GDK_AVAILABLE_IN_ALL -gint gdk_device_pad_get_group_n_modes (GdkDevicePad *pad, - gint group_idx); +int gdk_device_pad_get_group_n_modes (GdkDevicePad *pad, + int group_idx); GDK_AVAILABLE_IN_ALL -gint gdk_device_pad_get_n_features (GdkDevicePad *pad, +int gdk_device_pad_get_n_features (GdkDevicePad *pad, GdkDevicePadFeature feature); GDK_AVAILABLE_IN_ALL -gint gdk_device_pad_get_feature_group (GdkDevicePad *pad, +int gdk_device_pad_get_feature_group (GdkDevicePad *pad, GdkDevicePadFeature feature, - gint feature_idx); + int feature_idx); G_END_DECLS diff --git a/gdk/gdkdevicepadprivate.h b/gdk/gdkdevicepadprivate.h index a4f190066b..7a4371f9bd 100644 --- a/gdk/gdkdevicepadprivate.h +++ b/gdk/gdkdevicepadprivate.h @@ -29,15 +29,15 @@ G_BEGIN_DECLS struct _GdkDevicePadInterface { GTypeInterface parent_interface; - gint (* get_n_groups) (GdkDevicePad *pad); + int (* get_n_groups) (GdkDevicePad *pad); - gint (* get_group_n_modes) (GdkDevicePad *pad, - gint group); - gint (* get_n_features) (GdkDevicePad *pad, + int (* get_group_n_modes) (GdkDevicePad *pad, + int group); + int (* get_n_features) (GdkDevicePad *pad, GdkDevicePadFeature feature); - gint (* get_feature_group) (GdkDevicePad *pad, + int (* get_feature_group) (GdkDevicePad *pad, GdkDevicePadFeature feature, - gint idx); + int idx); }; G_END_DECLS diff --git a/gdk/gdkdeviceprivate.h b/gdk/gdkdeviceprivate.h index 712ab70581..3c3140691a 100644 --- a/gdk/gdkdeviceprivate.h +++ b/gdk/gdkdeviceprivate.h @@ -130,7 +130,7 @@ gboolean _gdk_device_translate_axis (GdkDevice *device, gdouble *axis_value); GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device, - gint n_events); + int n_events); void _gdk_device_add_physical_device (GdkDevice *device, GdkDevice *physical); diff --git a/gdk/gdkdisplaymanager.c b/gdk/gdkdisplaymanager.c index a17305fcbe..db7dfa19ea 100644 --- a/gdk/gdkdisplaymanager.c +++ b/gdk/gdkdisplaymanager.c @@ -394,7 +394,7 @@ gdk_display_manager_open_display (GdkDisplayManager *manager, const gchar *backend_list; GdkDisplay *display; gchar **backends; - gint i, j; + int i, j; gboolean allow_any; if (allowed_backends == NULL) diff --git a/gdk/gdkdrag.c b/gdk/gdkdrag.c index 31f947d8b1..c1eac41ac4 100644 --- a/gdk/gdkdrag.c +++ b/gdk/gdkdrag.c @@ -722,8 +722,8 @@ gdk_drag_get_drag_surface (GdkDrag *drag) */ void gdk_drag_set_hotspot (GdkDrag *drag, - gint hot_x, - gint hot_y) + int hot_x, + int hot_y) { g_return_if_fail (GDK_IS_DRAG (drag)); @@ -807,7 +807,7 @@ GdkCursor * gdk_drag_get_cursor (GdkDrag *drag, GdkDragAction action) { - gint i; + int i; for (i = 0 ; i < G_N_ELEMENTS (drag_cursors) - 1; i++) if (drag_cursors[i].action == action) diff --git a/gdk/gdkdrag.h b/gdk/gdkdrag.h index a3aea2ad7e..070b0f812d 100644 --- a/gdk/gdkdrag.h +++ b/gdk/gdkdrag.h @@ -88,8 +88,8 @@ GdkSurface *gdk_drag_get_drag_surface (GdkDrag *drag); GDK_AVAILABLE_IN_ALL void gdk_drag_set_hotspot (GdkDrag *drag, - gint hot_x, - gint hot_y); + int hot_x, + int hot_y); GDK_AVAILABLE_IN_ALL GdkContentProvider * diff --git a/gdk/gdkdragprivate.h b/gdk/gdkdragprivate.h index ec781204d5..2532caad8b 100644 --- a/gdk/gdkdragprivate.h +++ b/gdk/gdkdragprivate.h @@ -35,8 +35,8 @@ struct _GdkDragClass { GdkSurface* (*get_drag_surface) (GdkDrag *drag); void (*set_hotspot) (GdkDrag *drag, - gint hot_x, - gint hot_y); + int hot_x, + int hot_y); void (*drop_done) (GdkDrag *drag, gboolean success); diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index b6d952264d..264c62f06c 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -734,7 +734,7 @@ gdk_motion_event_push_history (GdkEvent *event, GdkMotionEvent *self = (GdkMotionEvent *) event; GdkTimeCoord hist; GdkDevice *device; - gint i, n_axes; + int i, n_axes; g_assert (GDK_IS_EVENT_TYPE (event, GDK_MOTION_NOTIFY)); g_assert (GDK_IS_EVENT_TYPE (history_event, GDK_MOTION_NOTIFY)); diff --git a/gdk/gdkframeclock.c b/gdk/gdkframeclock.c index 9a48df379e..cd10511545 100644 --- a/gdk/gdkframeclock.c +++ b/gdk/gdkframeclock.c @@ -94,10 +94,10 @@ static guint fps_counter; struct _GdkFrameClockPrivate { gint64 frame_counter; - gint n_timings; - gint current; + int n_timings; + int current; GdkFrameTimings *timings[FRAME_HISTORY_MAX_LENGTH]; - gint n_freeze_inhibitors; + int n_freeze_inhibitors; }; G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GdkFrameClock, gdk_frame_clock, G_TYPE_OBJECT) @@ -489,7 +489,7 @@ gdk_frame_clock_get_timings (GdkFrameClock *frame_clock, gint64 frame_counter) { GdkFrameClockPrivate *priv; - gint pos; + int pos; g_return_val_if_fail (GDK_IS_FRAME_CLOCK (frame_clock), NULL); diff --git a/gdk/gdkframeclockidle.c b/gdk/gdkframeclockidle.c index ec66950b70..fe2de4667e 100644 --- a/gdk/gdkframeclockidle.c +++ b/gdk/gdkframeclockidle.c @@ -85,7 +85,7 @@ static GSource *sleep_source; static gboolean sleep_source_prepare (GSource *source, - gint *timeout) + int *timeout) { sleep_source_prepare_time = g_source_get_time (source); *timeout = -1; diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index c42728573e..a4d85365fd 100644 --- a/gdk/gdkinternals.h +++ b/gdk/gdkinternals.h @@ -271,20 +271,20 @@ void gdk_device_get_position (GdkDevice *device, void gdk_surface_get_root_coords (GdkSurface *surface, - gint x, - gint y, - gint *root_x, - gint *root_y); + int x, + int y, + int *root_x, + int *root_y); void gdk_surface_get_origin (GdkSurface *surface, - gint *x, - gint *y); + int *x, + int *y); void gdk_surface_get_geometry (GdkSurface *surface, - gint *x, - gint *y, - gint *width, - gint *height); + int *x, + int *y, + int *width, + int *height); GdkGLContext *gdk_surface_get_shared_data_gl_context (GdkSurface *surface); @@ -323,14 +323,14 @@ typedef struct _GdkGeometry GdkGeometry; struct _GdkGeometry { - gint min_width; - gint min_height; - gint max_width; - gint max_height; - gint base_width; - gint base_height; - gint width_inc; - gint height_inc; + int min_width; + int min_height; + int max_width; + int max_height; + int base_width; + int base_height; + int width_inc; + int height_inc; gdouble min_aspect; gdouble max_aspect; GdkGravity win_gravity; @@ -339,10 +339,10 @@ struct _GdkGeometry GDK_AVAILABLE_IN_ALL void gdk_surface_constrain_size (GdkGeometry *geometry, GdkSurfaceHints flags, - gint width, - gint height, - gint *new_width, - gint *new_height); + int width, + int height, + int *new_width, + int *new_height); /* * GdkSeatGrabPrepareFunc: @@ -376,16 +376,16 @@ GdkKeymap * gdk_display_get_keymap (GdkDisplay *display); void gdk_surface_begin_resize_drag (GdkSurface *surface, GdkSurfaceEdge edge, GdkDevice *device, - gint button, - gint x, - gint y, + int button, + int x, + int y, guint32 timestamp); void gdk_surface_begin_move_drag (GdkSurface *surface, GdkDevice *device, - gint button, - gint x, - gint y, + int button, + int x, + int y, guint32 timestamp); G_END_DECLS diff --git a/gdk/gdkkeys.c b/gdk/gdkkeys.c index 52bba82bb2..ac85d1da74 100644 --- a/gdk/gdkkeys.c +++ b/gdk/gdkkeys.c @@ -541,7 +541,7 @@ gboolean gdk_keymap_get_entries_for_keyval (GdkKeymap *keymap, guint keyval, GdkKeymapKey **keys, - gint *n_keys) + int *n_keys) { GArray *array; @@ -621,7 +621,7 @@ gdk_keymap_get_entries_for_keycode (GdkKeymap *keymap, guint hardware_keycode, GdkKeymapKey **keys, guint **keyvals, - gint *n_entries) + int *n_entries) { g_return_val_if_fail (GDK_IS_KEYMAP (keymap), FALSE); g_return_val_if_fail (n_entries != NULL, FALSE); @@ -723,10 +723,10 @@ gboolean gdk_keymap_translate_keyboard_state (GdkKeymap *keymap, guint hardware_keycode, GdkModifierType state, - gint group, + int group, guint *keyval, - gint *effective_group, - gint *level, + int *effective_group, + int *level, GdkModifierType *consumed_modifiers) { g_return_val_if_fail (GDK_IS_KEYMAP (keymap), FALSE); diff --git a/gdk/gdkkeysprivate.h b/gdk/gdkkeysprivate.h index 79ad146b14..db05785678 100644 --- a/gdk/gdkkeysprivate.h +++ b/gdk/gdkkeysprivate.h @@ -48,16 +48,16 @@ struct _GdkKeymapClass guint hardware_keycode, GdkKeymapKey **keys, guint **keyvals, - gint *n_entries); + int *n_entries); guint (* lookup_key) (GdkKeymap *keymap, const GdkKeymapKey *key); gboolean (* translate_keyboard_state) (GdkKeymap *keymap, guint hardware_keycode, GdkModifierType state, - gint group, + int group, guint *keyval, - gint *effective_group, - gint *level, + int *effective_group, + int *level, GdkModifierType *consumed_modifiers); guint (* get_modifier_state) (GdkKeymap *keymap); @@ -94,20 +94,20 @@ guint gdk_keymap_lookup_key (GdkKeymap *keymap, gboolean gdk_keymap_translate_keyboard_state (GdkKeymap *keymap, guint hardware_keycode, GdkModifierType state, - gint group, + int group, guint *keyval, - gint *effective_group, - gint *level, + int *effective_group, + int *level, GdkModifierType *consumed_modifiers); gboolean gdk_keymap_get_entries_for_keyval (GdkKeymap *keymap, guint keyval, GdkKeymapKey **keys, - gint *n_keys); + int *n_keys); gboolean gdk_keymap_get_entries_for_keycode (GdkKeymap *keymap, guint hardware_keycode, GdkKeymapKey **keys, guint **keyvals, - gint *n_entries); + int *n_entries); PangoDirection gdk_keymap_get_direction (GdkKeymap *keymap); gboolean gdk_keymap_have_bidi_layouts (GdkKeymap *keymap); diff --git a/gdk/gdkpango.c b/gdk/gdkpango.c index 443afed7ba..38999a3af1 100644 --- a/gdk/gdkpango.c +++ b/gdk/gdkpango.c @@ -127,16 +127,16 @@ */ static cairo_region_t* layout_iter_get_line_clip_region (PangoLayoutIter *iter, - gint x_origin, - gint y_origin, - const gint *index_ranges, - gint n_ranges) + int x_origin, + int y_origin, + const int *index_ranges, + int n_ranges) { PangoLayoutLine *line; cairo_region_t *clip_region; PangoRectangle logical_rect; - gint baseline; - gint i; + int baseline; + int i; line = pango_layout_iter_get_line_readonly (iter); @@ -148,9 +148,9 @@ layout_iter_get_line_clip_region (PangoLayoutIter *iter, i = 0; while (i < n_ranges) { - gint *pixel_ranges = NULL; - gint n_pixel_ranges = 0; - gint j; + int *pixel_ranges = NULL; + int n_pixel_ranges = 0; + int j; /* Note that get_x_ranges returns layout coordinates */ @@ -212,10 +212,10 @@ layout_iter_get_line_clip_region (PangoLayoutIter *iter, **/ cairo_region_t* gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line, - gint x_origin, - gint y_origin, - const gint *index_ranges, - gint n_ranges) + int x_origin, + int y_origin, + const int *index_ranges, + int n_ranges) { cairo_region_t *clip_region; PangoLayoutIter *iter; @@ -256,10 +256,10 @@ gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line, **/ cairo_region_t* gdk_pango_layout_get_clip_region (PangoLayout *layout, - gint x_origin, - gint y_origin, - const gint *index_ranges, - gint n_ranges) + int x_origin, + int y_origin, + const int *index_ranges, + int n_ranges) { PangoLayoutIter *iter; cairo_region_t *clip_region; @@ -275,7 +275,7 @@ gdk_pango_layout_get_clip_region (PangoLayout *layout, { PangoRectangle logical_rect; cairo_region_t *line_region; - gint baseline; + int baseline; pango_layout_iter_get_line_extents (iter, NULL, &logical_rect); baseline = pango_layout_iter_get_baseline (iter); diff --git a/gdk/gdkpango.h b/gdk/gdkpango.h index 1378e7892a..5a674bc3d8 100644 --- a/gdk/gdkpango.h +++ b/gdk/gdkpango.h @@ -35,16 +35,16 @@ G_BEGIN_DECLS GDK_AVAILABLE_IN_ALL cairo_region_t *gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line, - gint x_origin, - gint y_origin, - const gint *index_ranges, - gint n_ranges); + int x_origin, + int y_origin, + const int *index_ranges, + int n_ranges); GDK_AVAILABLE_IN_ALL cairo_region_t *gdk_pango_layout_get_clip_region (PangoLayout *layout, - gint x_origin, - gint y_origin, - const gint *index_ranges, - gint n_ranges); + int x_origin, + int y_origin, + const int *index_ranges, + int n_ranges); G_END_DECLS diff --git a/gdk/gdkpipeiostream.c b/gdk/gdkpipeiostream.c index f0477d5dff..02147e4a12 100644 --- a/gdk/gdkpipeiostream.c +++ b/gdk/gdkpipeiostream.c @@ -34,7 +34,7 @@ typedef struct _GdkIOPipe GdkIOPipe; struct _GdkIOPipe { - gint ref_count; + int ref_count; GMutex mutex; GCond cond; diff --git a/gdk/gdkpixbuf-drawable.c b/gdk/gdkpixbuf-drawable.c index e90edc1f20..3b7c717bb9 100644 --- a/gdk/gdkpixbuf-drawable.c +++ b/gdk/gdkpixbuf-drawable.c @@ -169,10 +169,10 @@ convert_no_alpha (guchar *dest_data, */ GdkPixbuf * gdk_pixbuf_get_from_surface (cairo_surface_t *surface, - gint src_x, - gint src_y, - gint width, - gint height) + int src_x, + int src_y, + int width, + int height) { cairo_content_t content; GdkPixbuf *dest; diff --git a/gdk/gdkpixbuf.h b/gdk/gdkpixbuf.h index c2538c9633..65db8ebbc8 100644 --- a/gdk/gdkpixbuf.h +++ b/gdk/gdkpixbuf.h @@ -40,10 +40,10 @@ G_BEGIN_DECLS GDK_AVAILABLE_IN_ALL GdkPixbuf *gdk_pixbuf_get_from_surface (cairo_surface_t *surface, - gint src_x, - gint src_y, - gint width, - gint height); + int src_x, + int src_y, + int width, + int height); GDK_AVAILABLE_IN_ALL GdkPixbuf *gdk_pixbuf_get_from_texture (GdkTexture *texture); diff --git a/gdk/gdkrectangle.c b/gdk/gdkrectangle.c index 641d093e6f..edae510625 100644 --- a/gdk/gdkrectangle.c +++ b/gdk/gdkrectangle.c @@ -67,7 +67,7 @@ gdk_rectangle_union (const GdkRectangle *src1, const GdkRectangle *src2, GdkRectangle *dest) { - gint dest_x, dest_y; + int dest_x, dest_y; g_return_if_fail (src1 != NULL); g_return_if_fail (src2 != NULL); @@ -102,9 +102,9 @@ gdk_rectangle_intersect (const GdkRectangle *src1, const GdkRectangle *src2, GdkRectangle *dest) { - gint dest_x, dest_y; - gint dest_x2, dest_y2; - gint return_val; + int dest_x, dest_y; + int dest_x2, dest_y2; + int return_val; g_return_val_if_fail (src1 != NULL, FALSE); g_return_val_if_fail (src2 != NULL, FALSE); diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index 96302ea630..9840034514 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -140,7 +140,7 @@ static GdkMonitor * get_monitor_for_rect (GdkDisplay *display, const GdkRectangle *rect) { - gint biggest_area = G_MININT; + int biggest_area = G_MININT; GdkMonitor *best_monitor = NULL; GdkMonitor *monitor; GdkRectangle workarea; @@ -168,7 +168,7 @@ get_monitor_for_rect (GdkDisplay *display, return best_monitor; } -static gint +static int get_anchor_x_sign (GdkGravity anchor) { switch (anchor) @@ -192,7 +192,7 @@ get_anchor_x_sign (GdkGravity anchor) } } -static gint +static int get_anchor_y_sign (GdkGravity anchor) { switch (anchor) @@ -216,20 +216,20 @@ get_anchor_y_sign (GdkGravity anchor) } } -static gint -maybe_flip_position (gint bounds_pos, - gint bounds_size, - gint rect_pos, - gint rect_size, - gint surface_size, - gint rect_sign, - gint surface_sign, - gint offset, +static int +maybe_flip_position (int bounds_pos, + int bounds_size, + int rect_pos, + int rect_size, + int surface_size, + int rect_sign, + int surface_sign, + int offset, gboolean flip, gboolean *flipped) { - gint primary; - gint secondary; + int primary; + int secondary; *flipped = FALSE; primary = rect_pos + (1 + rect_sign) * rect_size / 2 + offset - (1 + surface_sign) * surface_size / 2; @@ -784,8 +784,8 @@ gdk_surface_new (GdkDisplay *display, **/ GdkSurface * gdk_surface_new_toplevel (GdkDisplay *display, - gint width, - gint height) + int width, + int height) { g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); @@ -1556,10 +1556,10 @@ gdk_surface_thaw_toplevel_updates (GdkSurface *surface) void gdk_surface_constrain_size (GdkGeometry *geometry, GdkSurfaceHints flags, - gint width, - gint height, - gint *new_width, - gint *new_height) + int width, + int height, + int *new_width, + int *new_height) { /* This routine is partially borrowed from fvwm. * @@ -1569,16 +1569,16 @@ gdk_surface_constrain_size (GdkGeometry *geometry, * * which in turn borrows parts of the algorithm from uwm */ - gint min_width = 0; - gint min_height = 0; - gint base_width = 0; - gint base_height = 0; - gint xinc = 1; - gint yinc = 1; - gint max_width = G_MAXINT; - gint max_height = G_MAXINT; + int min_width = 0; + int min_height = 0; + int base_width = 0; + int base_height = 0; + int xinc = 1; + int yinc = 1; + int max_width = G_MAXINT; + int max_height = G_MAXINT; -#define FLOOR(value, base) ( ((gint) ((value) / (base))) * (base) ) +#define FLOOR(value, base) ( ((int) ((value) / (base))) * (base) ) if ((flags & GDK_HINT_BASE_SIZE) && (flags & GDK_HINT_MIN_SIZE)) { @@ -1635,7 +1635,7 @@ gdk_surface_constrain_size (GdkGeometry *geometry, geometry->min_aspect > 0 && geometry->max_aspect > 0) { - gint delta; + int delta; if (flags & GDK_HINT_BASE_SIZE) { @@ -1983,10 +1983,10 @@ gdk_surface_set_device_cursor (GdkSurface *surface, */ void gdk_surface_get_geometry (GdkSurface *surface, - gint *x, - gint *y, - gint *width, - gint *height) + int *x, + int *y, + int *width, + int *height) { g_return_if_fail (GDK_IS_SURFACE (surface)); @@ -2047,8 +2047,8 @@ gdk_surface_get_height (GdkSurface *surface) */ void gdk_surface_get_origin (GdkSurface *surface, - gint *x, - gint *y) + int *x, + int *y) { g_return_if_fail (GDK_IS_SURFACE (surface)); @@ -2070,10 +2070,10 @@ gdk_surface_get_origin (GdkSurface *surface, */ void gdk_surface_get_root_coords (GdkSurface *surface, - gint x, - gint y, - gint *root_x, - gint *root_y) + int x, + int y, + int *root_x, + int *root_y) { g_return_if_fail (GDK_IS_SURFACE (surface)); @@ -2528,7 +2528,7 @@ gdk_surface_get_frame_clock (GdkSurface *surface) * * Returns: the scale factor */ -gint +int gdk_surface_get_scale_factor (GdkSurface *surface) { GdkSurfaceClass *class; @@ -2554,7 +2554,7 @@ gdk_surface_get_unscaled_size (GdkSurface *surface, int *unscaled_height) { GdkSurfaceClass *class; - gint scale; + int scale; g_return_if_fail (GDK_IS_SURFACE (surface)); @@ -2637,10 +2637,10 @@ gdk_surface_set_opaque_region (GdkSurface *surface, */ void gdk_surface_set_shadow_width (GdkSurface *surface, - gint left, - gint right, - gint top, - gint bottom) + int left, + int right, + int top, + int bottom) { GdkSurfaceClass *class; diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h index 5b10920291..acd766b259 100644 --- a/gdk/gdksurface.h +++ b/gdk/gdksurface.h @@ -186,7 +186,7 @@ gboolean gdk_surface_translate_coordinates (GdkSurface *from, double *y); GDK_AVAILABLE_IN_ALL -gint gdk_surface_get_scale_factor (GdkSurface *surface); +int gdk_surface_get_scale_factor (GdkSurface *surface); GDK_AVAILABLE_IN_ALL void gdk_surface_get_device_position (GdkSurface *surface, @@ -222,10 +222,10 @@ void gdk_surface_set_opaque_region (GdkSurface *surface, GDK_AVAILABLE_IN_ALL void gdk_surface_set_shadow_width (GdkSurface *surface, - gint left, - gint right, - gint top, - gint bottom); + int left, + int right, + int top, + int bottom); GDK_AVAILABLE_IN_ALL GdkCairoContext *gdk_surface_create_cairo_context(GdkSurface *surface); diff --git a/gdk/gdksurfaceprivate.h b/gdk/gdksurfaceprivate.h index 2aa1828a35..b3a8457a58 100644 --- a/gdk/gdksurfaceprivate.h +++ b/gdk/gdksurfaceprivate.h @@ -45,8 +45,8 @@ struct _GdkSurface gpointer widget; - gint x; - gint y; + int x; + int y; guint8 resize_count; @@ -81,11 +81,11 @@ struct _GdkSurface guint update_and_descendants_freeze_count; - gint width, height; - gint shadow_top; - gint shadow_left; - gint shadow_right; - gint shadow_bottom; + int width, height; + int shadow_top; + int shadow_left; + int shadow_right; + int shadow_bottom; GdkCursor *cursor; GHashTable *device_cursor; @@ -114,15 +114,15 @@ struct _GdkSurfaceClass void (* hide) (GdkSurface *surface); void (* get_geometry) (GdkSurface *surface, - gint *x, - gint *y, - gint *width, - gint *height); + int *x, + int *y, + int *width, + int *height); void (* get_root_coords) (GdkSurface *surface, - gint x, - gint y, - gint *root_x, - gint *root_y); + int x, + int y, + int *root_x, + int *root_y); gboolean (* get_device_state) (GdkSurface *surface, GdkDevice *device, gdouble *x, @@ -155,7 +155,7 @@ struct _GdkSurfaceClass double dx, double dy); - gint (* get_scale_factor) (GdkSurface *surface); + int (* get_scale_factor) (GdkSurface *surface); void (* get_unscaled_size) (GdkSurface *surface, int *unscaled_width, int *unscaled_height); @@ -163,10 +163,10 @@ struct _GdkSurfaceClass void (* set_opaque_region) (GdkSurface *surface, cairo_region_t *region); void (* set_shadow_width) (GdkSurface *surface, - gint left, - gint right, - gint top, - gint bottom); + int left, + int right, + int top, + int bottom); GdkGLContext *(*create_gl_context) (GdkSurface *surface, gboolean attached, GdkGLContext *share, diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h index 9ad7879367..0a0068e181 100644 --- a/gdk/gdktypes.h +++ b/gdk/gdktypes.h @@ -62,8 +62,8 @@ G_BEGIN_DECLS */ struct _GdkPoint { - gint x; - gint y; + int x; + int y; }; typedef struct _GdkPoint GdkPoint; @@ -405,8 +405,8 @@ typedef struct _GdkKeymapKey GdkKeymapKey; struct _GdkKeymapKey { guint keycode; - gint group; - gint level; + int group; + int level; }; diff --git a/gdk/macos/GdkMacosWindow.c b/gdk/macos/GdkMacosWindow.c index 6ba8780bc8..f226e9443c 100644 --- a/gdk/macos/GdkMacosWindow.c +++ b/gdk/macos/GdkMacosWindow.c @@ -609,7 +609,7 @@ { GdkMacosSurface *surface = gdk_surface; NSRect rect; - gint shadow_top; + int shadow_top; /* Allow the window to move up "shadow_top" more than normally allowed * by the default impl. This makes it possible to move windows with diff --git a/gdk/macos/gdkdisplaylinksource.c b/gdk/macos/gdkdisplaylinksource.c index ba8731de5a..36decbbaad 100644 --- a/gdk/macos/gdkdisplaylinksource.c +++ b/gdk/macos/gdkdisplaylinksource.c @@ -32,7 +32,7 @@ static gint64 host_to_frame_clock_time (gint64 host_time); static gboolean gdk_display_link_source_prepare (GSource *source, - gint *timeout_) + int *timeout_) { GdkDisplayLinkSource *impl = (GdkDisplayLinkSource *)source; gint64 now; diff --git a/gdk/macos/gdkmacosdevice.c b/gdk/macos/gdkmacosdevice.c index 8e621fa6fe..3b77c7a7d0 100644 --- a/gdk/macos/gdkmacosdevice.c +++ b/gdk/macos/gdkmacosdevice.c @@ -72,8 +72,8 @@ gdk_macos_device_surface_at_position (GdkDevice *device, GdkMacosDisplay *display; GdkMacosSurface *surface; NSPoint point; - gint x; - gint y; + int x; + int y; g_assert (GDK_IS_MACOS_DEVICE (device)); g_assert (win_x != NULL); diff --git a/gdk/macos/gdkmacosdisplay-settings.c b/gdk/macos/gdkmacosdisplay-settings.c index 558e0b81e0..cf3224b6db 100644 --- a/gdk/macos/gdkmacosdisplay-settings.c +++ b/gdk/macos/gdkmacosdisplay-settings.c @@ -78,7 +78,7 @@ _gdk_macos_settings_load (GdkMacosSettings *settings) settings->double_click_time = fval * 1000; name = [[NSFont systemFontOfSize:0] familyName]; - pt_size = (gint)[[NSFont userFontOfSize:0] pointSize]; + pt_size = (int)[[NSFont userFontOfSize:0] pointSize]; /* Let's try to use the "views" font size (12pt) by default. This is * used for lists/text/other "content" which is the largest parts of * apps, using the "regular control" size (13pt) looks a bit out of diff --git a/gdk/macos/gdkmacosdrag.c b/gdk/macos/gdkmacosdrag.c index de1324c674..7cc70d921e 100644 --- a/gdk/macos/gdkmacosdrag.c +++ b/gdk/macos/gdkmacosdrag.c @@ -248,7 +248,7 @@ gdk_macos_drag_drop_performed (GdkDrag *drag, static void gdk_drag_get_current_actions (GdkModifierType state, - gint button, + int button, GdkDragAction actions, GdkDragAction *suggested_action, GdkDragAction *possible_actions) @@ -414,7 +414,7 @@ gdk_dnd_handle_key_event (GdkDrag *drag, GdkMacosDrag *self = GDK_MACOS_DRAG (drag); GdkModifierType state; GdkDevice *pointer; - gint dx, dy; + int dx, dy; dx = dy = 0; state = gdk_event_get_modifier_state (event); diff --git a/gdk/macos/gdkmacoseventsource.c b/gdk/macos/gdkmacoseventsource.c index f173433de4..b4ad1fe471 100644 --- a/gdk/macos/gdkmacoseventsource.c +++ b/gdk/macos/gdkmacoseventsource.c @@ -89,7 +89,7 @@ static gboolean run_loop_polling_async = FALSE; /* Between run_loop_before_waiting() and run_loop_after_waiting(); * max_prioritiy to pass to g_main_loop_check() */ -static gint run_loop_max_priority; +static int run_loop_max_priority; /* Timer that we've added to wake up the run loop when a GLib timeout */ @@ -148,7 +148,7 @@ static NSAutoreleasePool *autorelease_pool; * a run loop iteration, so we need to detect that and avoid triggering * our "run the GLib main looop while the run loop is active machinery. */ -static gint getting_events = 0; +static int getting_events = 0; /************************************************************ ********* Select Thread ********* @@ -199,7 +199,7 @@ static GPollFD *next_pollfds; static guint next_n_pollfds; /* Pipe used to wake up the select thread */ -static gint select_thread_wakeup_pipe[2]; +static int select_thread_wakeup_pipe[2]; /* Run loop source used to wake up the main thread */ static CFRunLoopSourceRef select_main_thread_source; @@ -365,7 +365,7 @@ dump_poll_result (GPollFD *ufds, guint nfds) { GString *s; - gint i; + int i; s = g_string_new (""); for (i = 0; i < nfds; i++) @@ -393,7 +393,7 @@ pollfds_equal (GPollFD *old_pollfds, GPollFD *new_pollfds, guint new_n_pollfds) { - gint i; + int i; if (old_n_pollfds != new_n_pollfds) return FALSE; @@ -417,15 +417,15 @@ pollfds_equal (GPollFD *old_pollfds, * 0: No file descriptors ready, asynchronous poll not needed * > 0: Number of file descriptors ready */ -static gint +static int select_thread_start_poll (GPollFD *ufds, guint nfds, - gint timeout) + int timeout) { - gint n_ready; + int n_ready; gboolean have_new_pollfds = FALSE; - gint poll_fd_index = -1; - gint i; + int poll_fd_index = -1; + int i; for (i = 0; i < nfds; i++) if (ufds[i].fd == -1) @@ -575,8 +575,8 @@ select_thread_start_poll (GPollFD *ufds, static int select_thread_collect_poll (GPollFD *ufds, guint nfds) { - gint i; - gint n_ready = 0; + int i; + int n_ready = 0; SELECT_THREAD_LOCK (); @@ -640,7 +640,7 @@ _gdk_macos_event_source_get_pending (void) static gboolean gdk_macos_event_source_prepare (GSource *source, - gint *timeout) + int *timeout) { GdkMacosEventSource *event_source = (GdkMacosEventSource *)source; gboolean retval; @@ -737,14 +737,14 @@ static GSourceFuncs event_funcs = { ********* Our Poll Function ********* ************************************************************/ -static gint +static int poll_func (GPollFD *ufds, guint nfds, - gint timeout_) + int timeout_) { NSEvent *event; NSDate *limit_date; - gint n_ready; + int n_ready; static GPollFD *last_ufds; @@ -808,12 +808,12 @@ poll_func (GPollFD *ufds, /* Wrapper around g_main_context_query() that handles reallocating * run_loop_pollfds up to the proper size */ -static gint +static int query_main_context (GMainContext *context, int max_priority, int *timeout) { - gint nfds; + int nfds; if (!run_loop_pollfds) { @@ -869,8 +869,8 @@ static void run_loop_before_sources (void) { GMainContext *context = g_main_context_default (); - gint max_priority; - gint nfds; + int max_priority; + int nfds; /* Before we let the CFRunLoop process sources, we want to check if there * are any pending GLib main loop sources more urgent than @@ -909,8 +909,8 @@ static void run_loop_before_waiting (void) { GMainContext *context = g_main_context_default (); - gint timeout; - gint n_ready; + int timeout; + int n_ready; /* At this point, the CFRunLoop is ready to wait. We start a GMain loop * iteration by calling the check() and query() stages. We start a diff --git a/gdk/macos/gdkmacoskeymap.c b/gdk/macos/gdkmacoskeymap.c index c638c75179..3265499200 100644 --- a/gdk/macos/gdkmacoskeymap.c +++ b/gdk/macos/gdkmacoskeymap.c @@ -394,12 +394,12 @@ gdk_macos_keymap_lookup_key (GdkKeymap *keymap, static guint translate_keysym (guint hardware_keycode, - gint group, + int group, GdkModifierType state, - gint *effective_group, - gint *effective_level) + int *effective_group, + int *effective_level) { - gint level; + int level; guint tmp_keyval; level = (state & GDK_SHIFT_MASK) ? 1 : 0; @@ -463,7 +463,7 @@ gdk_macos_keymap_get_entries_for_keycode (GdkKeymap *keymap, guint hardware_keycode, GdkKeymapKey **keys, guint **keyvals, - gint *n_entries) + int *n_entries) { GArray *keys_array; GArray *keyvals_array; @@ -527,10 +527,10 @@ static gboolean gdk_macos_keymap_translate_keyboard_state (GdkKeymap *keymap, guint hardware_keycode, GdkModifierType state, - gint group, + int group, guint *keyval, - gint *effective_group, - gint *level, + int *effective_group, + int *level, GdkModifierType *consumed_modifiers) { guint tmp_keyval; diff --git a/gdk/macos/gdkmacossurface-private.h b/gdk/macos/gdkmacossurface-private.h index f5a52db3cb..4d9aa4c053 100644 --- a/gdk/macos/gdkmacossurface-private.h +++ b/gdk/macos/gdkmacossurface-private.h @@ -81,10 +81,10 @@ const char *_gdk_macos_surface_get_title (GdkMacosSurface void _gdk_macos_surface_set_title (GdkMacosSurface *self, const gchar *title); void _gdk_macos_surface_get_shadow (GdkMacosSurface *self, - gint *top, - gint *right, - gint *bottom, - gint *left); + int *top, + int *right, + int *bottom, + int *left); NSView *_gdk_macos_surface_get_view (GdkMacosSurface *self); gboolean _gdk_macos_surface_get_modal_hint (GdkMacosSurface *self); void _gdk_macos_surface_set_modal_hint (GdkMacosSurface *self, diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c index 83fad33ffd..84c74b9d46 100644 --- a/gdk/macos/gdkmacossurface.c +++ b/gdk/macos/gdkmacossurface.c @@ -122,7 +122,7 @@ gdk_macos_surface_hide (GdkSurface *surface) _gdk_surface_clear_update_area (surface); } -static gint +static int gdk_macos_surface_get_scale_factor (GdkSurface *surface) { GdkMacosSurface *self = (GdkMacosSurface *)surface; @@ -541,10 +541,10 @@ _gdk_macos_surface_new (GdkMacosDisplay *display, void _gdk_macos_surface_get_shadow (GdkMacosSurface *self, - gint *top, - gint *right, - gint *bottom, - gint *left) + int *top, + int *right, + int *bottom, + int *left) { g_return_if_fail (GDK_IS_MACOS_SURFACE (self)); diff --git a/gdk/wayland/gdkcursor-wayland.c b/gdk/wayland/gdkcursor-wayland.c index 66a461dd6c..3358a8184a 100644 --- a/gdk/wayland/gdkcursor-wayland.c +++ b/gdk/wayland/gdkcursor-wayland.c @@ -104,7 +104,7 @@ static const struct { static const gchar * name_fallback (const gchar *name) { - gint i; + int i; for (i = 0; i < G_N_ELEMENTS (name_map); i++) { diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 524f17e277..13f03ca4b3 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -185,7 +185,7 @@ struct _GdkWaylandTabletData GdkWaylandTabletToolData *current_tool; - gint axis_indices[GDK_AXIS_LAST]; + int axis_indices[GDK_AXIS_LAST]; gdouble *axes; }; @@ -833,7 +833,7 @@ gdk_wayland_device_init (GdkWaylandDevice *device_core) _gdk_device_add_axis (device, GDK_AXIS_Y, 0, 0, 1); } -static gint +static int gdk_wayland_device_pad_get_n_groups (GdkDevicePad *pad) { GdkSeat *seat = gdk_device_get_seat (GDK_DEVICE (pad)); @@ -846,9 +846,9 @@ gdk_wayland_device_pad_get_n_groups (GdkDevicePad *pad) return g_list_length (data->mode_groups); } -static gint +static int gdk_wayland_device_pad_get_group_n_modes (GdkDevicePad *pad, - gint n_group) + int n_group) { GdkSeat *seat = gdk_device_get_seat (GDK_DEVICE (pad)); GdkWaylandTabletPadGroupData *group; @@ -865,7 +865,7 @@ gdk_wayland_device_pad_get_group_n_modes (GdkDevicePad *pad, return group->n_modes; } -static gint +static int gdk_wayland_device_pad_get_n_features (GdkDevicePad *pad, GdkDevicePadFeature feature) { @@ -889,16 +889,16 @@ gdk_wayland_device_pad_get_n_features (GdkDevicePad *pad, } } -static gint +static int gdk_wayland_device_pad_get_feature_group (GdkDevicePad *pad, GdkDevicePadFeature feature, - gint idx) + int idx) { GdkSeat *seat = gdk_device_get_seat (GDK_DEVICE (pad)); GdkWaylandTabletPadGroupData *group; GdkWaylandTabletPadData *data; GList *l; - gint i; + int i; data = gdk_wayland_seat_find_pad (GDK_WAYLAND_SEAT (seat), GDK_DEVICE (pad)); @@ -3344,7 +3344,7 @@ static void gdk_wayland_device_tablet_clone_tool_axes (GdkWaylandTabletData *tablet, GdkDeviceTool *tool) { - gint axis_pos; + int axis_pos; g_object_freeze_notify (G_OBJECT (tablet->stylus_device)); _gdk_device_reset_axes (tablet->stylus_device); @@ -3404,8 +3404,8 @@ gdk_wayland_mimic_device_axes (GdkDevice *logical, { gdouble axis_min, axis_max, axis_resolution; GdkAxisUse axis_use; - gint axis_count; - gint i; + int axis_count; + int i; g_object_freeze_notify (G_OBJECT (logical)); _gdk_device_reset_axes (logical); @@ -3607,7 +3607,7 @@ tablet_tool_handle_pressure (void *data, { GdkWaylandTabletToolData *tool = data; GdkWaylandTabletData *tablet = tool->current_tablet; - gint axis_index = tablet->axis_indices[GDK_AXIS_PRESSURE]; + int axis_index = tablet->axis_indices[GDK_AXIS_PRESSURE]; _gdk_device_translate_axis (tablet->stylus_device, axis_index, pressure, &tablet->axes[axis_index]); @@ -3624,7 +3624,7 @@ tablet_tool_handle_distance (void *data, { GdkWaylandTabletToolData *tool = data; GdkWaylandTabletData *tablet = tool->current_tablet; - gint axis_index = tablet->axis_indices[GDK_AXIS_DISTANCE]; + int axis_index = tablet->axis_indices[GDK_AXIS_DISTANCE]; _gdk_device_translate_axis (tablet->stylus_device, axis_index, distance, &tablet->axes[axis_index]); @@ -3642,8 +3642,8 @@ tablet_tool_handle_tilt (void *data, { GdkWaylandTabletToolData *tool = data; GdkWaylandTabletData *tablet = tool->current_tablet; - gint xtilt_axis_index = tablet->axis_indices[GDK_AXIS_XTILT]; - gint ytilt_axis_index = tablet->axis_indices[GDK_AXIS_YTILT]; + int xtilt_axis_index = tablet->axis_indices[GDK_AXIS_XTILT]; + int ytilt_axis_index = tablet->axis_indices[GDK_AXIS_YTILT]; _gdk_device_translate_axis (tablet->stylus_device, xtilt_axis_index, wl_fixed_to_double (xtilt), @@ -3701,7 +3701,7 @@ tablet_tool_handle_rotation (void *data, { GdkWaylandTabletToolData *tool = data; GdkWaylandTabletData *tablet = tool->current_tablet; - gint axis_index = tablet->axis_indices[GDK_AXIS_ROTATION]; + int axis_index = tablet->axis_indices[GDK_AXIS_ROTATION]; _gdk_device_translate_axis (tablet->stylus_device, axis_index, wl_fixed_to_double (degrees), @@ -3720,7 +3720,7 @@ tablet_tool_handle_slider (void *data, { GdkWaylandTabletToolData *tool = data; GdkWaylandTabletData *tablet = tool->current_tablet; - gint axis_index = tablet->axis_indices[GDK_AXIS_SLIDER]; + int axis_index = tablet->axis_indices[GDK_AXIS_SLIDER]; _gdk_device_translate_axis (tablet->stylus_device, axis_index, position, &tablet->axes[axis_index]); @@ -4175,7 +4175,7 @@ tablet_pad_handle_button (void *data, GdkWaylandTabletPadData *pad = data; GdkWaylandTabletPadGroupData *group; GdkEvent *event; - gint n_group; + int n_group; GDK_SEAT_NOTE (pad->seat, EVENTS, g_message ("tablet pad handle button, pad = %p, button = %d, state = %d", diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index 45f937dfab..22623042eb 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -1072,7 +1072,7 @@ get_cursor_theme (GdkWaylandDisplay *display_wayland, void gdk_wayland_display_set_cursor_theme (GdkDisplay *display, const gchar *name, - gint size) + int size) { GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY(display); struct wl_cursor_theme *theme; @@ -1473,7 +1473,7 @@ struct _TranslationEntry { GType type; union { const char *s; - gint i; + int i; gboolean b; } fallback; }; @@ -1798,7 +1798,7 @@ init_settings (GdkDisplay *display) GSettingsSchemaSource *source; GSettingsSchema *schema; GSettings *settings; - gint i; + int i; if (gdk_should_use_portal ()) { diff --git a/gdk/wayland/gdkdisplay-wayland.h b/gdk/wayland/gdkdisplay-wayland.h index db5e6a4fb3..7321b34a4e 100644 --- a/gdk/wayland/gdkdisplay-wayland.h +++ b/gdk/wayland/gdkdisplay-wayland.h @@ -58,7 +58,7 @@ typedef struct _GdkWaylandSelection GdkWaylandSelection; typedef struct { gboolean antialias; gboolean hinting; - gint dpi; + int dpi; const gchar *rgba; const gchar *hintstyle; } GsdXftSettings; diff --git a/gdk/wayland/gdkdrag-wayland.c b/gdk/wayland/gdkdrag-wayland.c index e09129f02f..05bf681717 100644 --- a/gdk/wayland/gdkdrag-wayland.c +++ b/gdk/wayland/gdkdrag-wayland.c @@ -51,8 +51,8 @@ struct _GdkWaylandDrag struct wl_data_source *data_source; struct wl_data_offer *offer; uint32_t serial; - gint hot_x; - gint hot_y; + int hot_x; + int hot_y; }; struct _GdkWaylandDragClass @@ -122,12 +122,12 @@ gdk_wayland_drag_get_drag_surface (GdkDrag *drag) static void gdk_wayland_drag_set_hotspot (GdkDrag *drag, - gint hot_x, - gint hot_y) + int hot_x, + int hot_y) { GdkWaylandDrag *drag_wayland = GDK_WAYLAND_DRAG (drag); - gint prev_hot_x = drag_wayland->hot_x; - gint prev_hot_y = drag_wayland->hot_y; + int prev_hot_x = drag_wayland->hot_x; + int prev_hot_y = drag_wayland->hot_y; const GdkRectangle damage_rect = { .width = 1, .height = 1 }; drag_wayland->hot_x = hot_x; diff --git a/gdk/wayland/gdkeventsource.c b/gdk/wayland/gdkeventsource.c index 8db92954e8..6f761f0ab7 100644 --- a/gdk/wayland/gdkeventsource.c +++ b/gdk/wayland/gdkeventsource.c @@ -33,7 +33,7 @@ typedef struct _GdkWaylandEventSource { static gboolean gdk_event_source_prepare (GSource *base, - gint *timeout) + int *timeout) { GdkWaylandEventSource *source = (GdkWaylandEventSource *) base; GdkWaylandDisplay *display = (GdkWaylandDisplay *) source->display; diff --git a/gdk/wayland/gdkkeys-wayland.c b/gdk/wayland/gdkkeys-wayland.c index c60dada58b..38f346c75d 100644 --- a/gdk/wayland/gdkkeys-wayland.c +++ b/gdk/wayland/gdkkeys-wayland.c @@ -84,7 +84,7 @@ static PangoDirection gdk_wayland_keymap_get_direction (GdkKeymap *keymap) { GdkWaylandKeymap *keymap_wayland = GDK_WAYLAND_KEYMAP (keymap); - gint i; + int i; for (i = 0; i < xkb_keymap_num_layouts (keymap_wayland->xkb_keymap); i++) { @@ -138,16 +138,16 @@ gdk_wayland_keymap_get_entries_for_keyval (GdkKeymap *keymap, max_keycode = xkb_keymap_max_keycode (xkb_keymap); for (keycode = min_keycode; keycode < max_keycode; keycode++) { - gint num_layouts, layout; + int num_layouts, layout; num_layouts = xkb_keymap_num_layouts_for_key (xkb_keymap, keycode); for (layout = 0; layout < num_layouts; layout++) { - gint num_levels, level; + int num_levels, level; num_levels = xkb_keymap_num_levels_for_key (xkb_keymap, keycode, layout); for (level = 0; level < num_levels; level++) { const xkb_keysym_t *syms; - gint num_syms, sym; + int num_syms, sym; num_syms = xkb_keymap_key_get_syms_by_level (xkb_keymap, keycode, layout, level, &syms); for (sym = 0; sym < num_syms; sym++) { @@ -174,12 +174,12 @@ gdk_wayland_keymap_get_entries_for_keycode (GdkKeymap *keymap, guint hardware_keycode, GdkKeymapKey **keys, guint **keyvals, - gint *n_entries) + int *n_entries) { struct xkb_keymap *xkb_keymap = GDK_WAYLAND_KEYMAP (keymap)->xkb_keymap; - gint num_layouts, layout; - gint num_entries; - gint i; + int num_layouts, layout; + int num_entries; + int i; num_layouts = xkb_keymap_num_layouts_for_key (xkb_keymap, hardware_keycode); @@ -197,7 +197,7 @@ gdk_wayland_keymap_get_entries_for_keycode (GdkKeymap *keymap, i = 0; for (layout = 0; layout < num_layouts; layout++) { - gint num_levels, level; + int num_levels, level; num_levels = xkb_keymap_num_levels_for_key (xkb_keymap, hardware_keycode, layout); for (level = 0; level < num_levels; level++) { @@ -306,10 +306,10 @@ static gboolean gdk_wayland_keymap_translate_keyboard_state (GdkKeymap *keymap, guint hardware_keycode, GdkModifierType state, - gint group, + int group, guint *keyval, - gint *effective_group, - gint *effective_level, + int *effective_group, + int *effective_level, GdkModifierType *consumed_modifiers) { struct xkb_keymap *xkb_keymap; @@ -390,9 +390,9 @@ _gdk_wayland_keymap_init (GdkWaylandKeymap *keymap) static void update_direction (GdkWaylandKeymap *keymap) { - gint num_layouts; - gint i; - gint *rtl; + int num_layouts; + int i; + int *rtl; xkb_keycode_t min_keycode, max_keycode; guint key; gboolean have_rtl, have_ltr; @@ -400,7 +400,7 @@ update_direction (GdkWaylandKeymap *keymap) num_layouts = xkb_keymap_num_layouts (keymap->xkb_keymap); keymap->direction = g_renew (PangoDirection, keymap->direction, num_layouts); - rtl = g_newa (gint, num_layouts); + rtl = g_newa (int, num_layouts); for (i = 0; i < num_layouts; i++) rtl[i] = 0; @@ -408,15 +408,15 @@ update_direction (GdkWaylandKeymap *keymap) max_keycode = xkb_keymap_max_keycode (keymap->xkb_keymap); for (key = min_keycode; key < max_keycode; key++) { - gint layouts, layout; + int layouts, layout; layouts = xkb_keymap_num_layouts_for_key (keymap->xkb_keymap, key); g_assert (layouts <= num_layouts); for (layout = 0; layout < layouts; layout++) { const xkb_keysym_t *syms; - gint num_syms; - gint sym; + int num_syms; + int sym; num_syms = xkb_keymap_key_get_syms_by_level (keymap->xkb_keymap, key, layout, 0, &syms); for (sym = 0; sym < num_syms; sym++) diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index 46fec90c8e..65eb7f387d 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -288,10 +288,10 @@ static void gdk_wayland_surface_sync_opaque_region (GdkSurface *surface); static void unset_transient_for_exported (GdkSurface *surface); static void gdk_wayland_surface_move_resize (GdkSurface *surface, - gint x, - gint y, - gint width, - gint height); + int x, + int y, + int width, + int height); static void update_popup_layout_state (GdkSurface *surface, int x, @@ -2135,8 +2135,8 @@ update_popup_layout_state (GdkSurface *surface, int height, GdkPopupLayout *layout) { - gint surface_x, surface_y; - gint surface_width, surface_height; + int surface_x, surface_y; + int surface_width, surface_height; GdkRectangle best_rect; GdkRectangle flipped_rect; GdkGravity rect_anchor; @@ -2239,8 +2239,8 @@ create_dynamic_positioner (GdkSurface *surface, GdkRectangle geometry; uint32_t constraint_adjustment = ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_NONE; const GdkRectangle *anchor_rect; - gint real_anchor_rect_x, real_anchor_rect_y; - gint anchor_rect_width, anchor_rect_height; + int real_anchor_rect_x, real_anchor_rect_y; + int anchor_rect_width, anchor_rect_height; int rect_anchor_dx; int rect_anchor_dy; GdkGravity rect_anchor; @@ -2761,10 +2761,10 @@ gdk_wayland_surface_hide (GdkSurface *surface) static void gdk_wayland_surface_move_resize (GdkSurface *surface, - gint x, - gint y, - gint width, - gint height) + int x, + int y, + int width, + int height) { GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface); @@ -3048,10 +3048,10 @@ gdk_wayland_surface_present_popup (GdkSurface *surface, static void gdk_wayland_surface_get_geometry (GdkSurface *surface, - gint *x, - gint *y, - gint *width, - gint *height) + int *x, + int *y, + int *width, + int *height) { if (!GDK_SURFACE_DESTROYED (surface)) { @@ -3068,10 +3068,10 @@ gdk_wayland_surface_get_geometry (GdkSurface *surface, static void gdk_wayland_surface_get_root_coords (GdkSurface *surface, - gint x, - gint y, - gint *root_x, - gint *root_y) + int x, + int y, + int *root_x, + int *root_y) { /* * Wayland does not have a global coordinate space shared between surfaces. In @@ -3826,7 +3826,7 @@ gdk_wayland_surface_destroy_notify (GdkSurface *surface) g_object_unref (surface); } -static gint +static int gdk_wayland_surface_get_scale_factor (GdkSurface *surface) { GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface); @@ -3859,7 +3859,7 @@ gdk_wayland_surface_set_shadow_width (GdkSurface *surface, int bottom) { GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface); - gint new_width, new_height; + int new_width, new_height; if (GDK_SURFACE_DESTROYED (surface)) return; diff --git a/gdk/wayland/gdkwaylanddisplay.h b/gdk/wayland/gdkwaylanddisplay.h index e07fe84915..373a2a8e46 100644 --- a/gdk/wayland/gdkwaylanddisplay.h +++ b/gdk/wayland/gdkwaylanddisplay.h @@ -52,7 +52,7 @@ struct wl_compositor *gdk_wayland_display_get_wl_compositor (GdkDisplay *dis GDK_AVAILABLE_IN_ALL void gdk_wayland_display_set_cursor_theme (GdkDisplay *display, const gchar *theme, - gint size); + int size); GDK_AVAILABLE_IN_ALL const gchar * gdk_wayland_display_get_startup_notification_id (GdkDisplay *display); GDK_AVAILABLE_IN_ALL diff --git a/gdk/win32/bdfcursor.c b/gdk/win32/bdfcursor.c index 606cd19eb3..7c091a1626 100644 --- a/gdk/win32/bdfcursor.c +++ b/gdk/win32/bdfcursor.c @@ -26,26 +26,26 @@ typedef struct { gchar *name; - gint id; + int id; gchar *bitmap; - gint hotx; - gint hoty; + int hotx; + int hoty; } font_info_t; typedef struct { gchar *name; - gint id; - gint width; - gint height; - gint hotx; - gint hoty; + int id; + int width; + int height; + int hotx; + int hoty; gchar *data; } cursor_info_t; static GSList *fonts = NULL; static GSList *cursors = NULL; -static gint dw,dh; +static int dw,dh; static gboolean debug = FALSE; @@ -97,17 +97,17 @@ cursor_info_t *ci; } } -static gint read_bdf_font(fname) +static int read_bdf_font(fname) gchar *fname; { FILE *f; gchar line[2048]; - gint rv = 0; + int rv = 0; gboolean startchar = FALSE, startbitmap = FALSE; gchar *charname,*p,*bitmap; - gint dx = 0,dy = 0; - gint w,h,x,y,py; - gint id,tmp; + int dx = 0,dy = 0; + int w,h,x,y,py; + int id,tmp; dw = 0; dh = 0; @@ -210,7 +210,7 @@ gchar *fname; return rv; } -static gint font_info_compare(fi, name) +static int font_info_compare(fi, name) font_info_t *fi; char *name; { @@ -303,8 +303,8 @@ int id; { static gchar cdata[8192]; gchar *p; - gint i; - gint c; + int i; + int c; gboolean flushed; sprintf(cdata, " { \"%s\", %d, %d, %d, %d, %d, \n \"", @@ -351,7 +351,7 @@ static int dump_cursors() GSList *ptr; FILE *f = stdout; - fprintf(f, "static const struct { const gchar *name; gint type; guchar width; guchar height; guchar hotx; guchar hoty; guchar *data; } cursors[] = {\n"); + fprintf(f, "static const struct { const gchar *name; int type; guchar width; guchar height; guchar hotx; guchar hoty; guchar *data; } cursors[] = {\n"); for (ptr = cursors; ptr; ptr = ptr->next) { @@ -365,8 +365,8 @@ static int dump_cursors() return 0; } -gint main(argc, argv) -gint argc; +int main(argc, argv) +int argc; gchar **argv; { if (argc != 2) diff --git a/gdk/win32/gdkcairocontext-win32.c b/gdk/win32/gdkcairocontext-win32.c index 5ccc640774..41b54deb3d 100644 --- a/gdk/win32/gdkcairocontext-win32.c +++ b/gdk/win32/gdkcairocontext-win32.c @@ -33,7 +33,7 @@ G_DEFINE_TYPE (GdkWin32CairoContext, gdk_win32_cairo_context, GDK_TYPE_CAIRO_CON void gdk_win32_surface_get_queued_window_rect (GdkSurface *surface, - gint scale, + int scale, RECT *return_window_rect) { RECT window_rect; @@ -79,9 +79,9 @@ gdk_win32_surface_apply_queued_move_resize (GdkSurface *surface, static cairo_surface_t * create_cairo_surface_for_layered_window (GdkWin32Surface *impl, - gint width, - gint height, - gint scale) + int width, + int height, + int scale) { if (width > impl->dib_width || height > impl->dib_height) @@ -146,7 +146,7 @@ gdk_win32_cairo_context_begin_frame (GdkDrawContext *draw_context, GdkWin32Surface *impl; int scale; cairo_t *cr; - gint width, height; + int width, height; RECT queued_window_rect; surface = gdk_draw_context_get_surface (draw_context); @@ -236,7 +236,7 @@ gdk_win32_cairo_context_end_frame (GdkDrawContext *draw_context, { GdkWin32CairoContext *self = GDK_WIN32_CAIRO_CONTEXT (draw_context); GdkSurface *surface; - gint scale; + int scale; surface = gdk_draw_context_get_surface (draw_context); scale = gdk_surface_get_scale_factor (surface); diff --git a/gdk/win32/gdkcairocontext-win32.h b/gdk/win32/gdkcairocontext-win32.h index 69b5522ffe..99fbfd76f9 100644 --- a/gdk/win32/gdkcairocontext-win32.h +++ b/gdk/win32/gdkcairocontext-win32.h @@ -53,8 +53,8 @@ struct _GdkWin32CairoContext * around between repaints, and only re-allocate it * if it's too small. */ cairo_surface_t *db_surface; - gint db_width; - gint db_height; + int db_width; + int db_height; /* Surface for the window DC (in non-layered mode). * A reference of the cache surface (in layered mode). */ diff --git a/gdk/win32/gdkclipdrop-win32.c b/gdk/win32/gdkclipdrop-win32.c index 0755876d65..65e4fdb0d9 100644 --- a/gdk/win32/gdkclipdrop-win32.c +++ b/gdk/win32/gdkclipdrop-win32.c @@ -630,7 +630,7 @@ free_queue_item (GdkWin32ClipboardThreadQueueItem *item) GdkWin32ClipboardThreadAdvertise *adv; GdkWin32ClipboardThreadRetrieve *retr; GdkWin32ClipboardThreadStore *store; - gint i; + int i; switch (item->item_type) { @@ -706,7 +706,7 @@ static gboolean process_advertise (GdkWin32ClipboardThreadAdvertise *adv) { DWORD error_code; - gint i; + int i; if (g_get_monotonic_time () > adv->parent.end_time) { @@ -785,7 +785,7 @@ static gboolean process_store (GdkWin32ClipboardThreadStore *store) { DWORD error_code; - gint i; + int i; if (g_get_monotonic_time () > store->parent.end_time) { @@ -911,7 +911,7 @@ static gboolean process_retrieve (GdkWin32ClipboardThreadRetrieve *retr) { DWORD error_code; - gint i; + int i; UINT fmt, fmt_to_use; HANDLE hdata; GdkWin32ContentFormatPair *pair; @@ -1290,7 +1290,7 @@ inner_clipboard_window_procedure (HWND hwnd, if (API_CALL (OpenClipboard, (hwnd))) { - gint i; + int i; GdkWin32ContentFormatPair *pair; for (pair = NULL, i = 0; @@ -1310,7 +1310,7 @@ inner_clipboard_window_procedure (HWND hwnd, } case WM_RENDERFORMAT: { - gint i; + int i; GdkWin32ClipboardThreadRender *render; GdkWin32ClipboardThreadRender *returned_render; GdkWin32ContentFormatPair *pair; @@ -1880,7 +1880,7 @@ gchar * _gdk_win32_get_clipboard_format_name (UINT fmt, gboolean *is_predefined) { - gint registered_name_w_len = 1024; + int registered_name_w_len = 1024; wchar_t *registered_name_w = g_malloc (registered_name_w_len); gchar *registered_name = NULL; int gcfn_result; @@ -1959,7 +1959,7 @@ static GArray * get_compatibility_w32formats_for_contentformat (const gchar *contentformat) { GArray *result = NULL; - gint i; + int i; GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get (); result = g_hash_table_lookup (clipdrop->compatibility_w32formats, contentformat); @@ -2021,7 +2021,7 @@ _gdk_win32_add_w32format_to_pairs (UINT w32format, const gchar *interned_w32format_name; GdkWin32ContentFormatPair pair; GArray *comp_pairs; - gint i, j; + int i, j; if (w32format_name != NULL) { @@ -2073,7 +2073,7 @@ _gdk_win32_add_w32format_to_pairs (UINT w32format, static void transmute_cf_unicodetext_to_utf8_string (const guchar *data, - gint length, + int length, guchar **set_data, gsize *set_data_length, GDestroyNotify *set_data_destroy) @@ -2113,7 +2113,7 @@ transmute_cf_unicodetext_to_utf8_string (const guchar *data, static void transmute_utf8_string_to_cf_unicodetext (const guchar *data, - gint length, + int length, guchar **set_data, gsize *set_data_length, GDestroyNotify *set_data_destroy) @@ -2121,7 +2121,7 @@ transmute_utf8_string_to_cf_unicodetext (const guchar *data, glong wclen; GError *err = NULL; glong size; - gint i; + int i; wchar_t *wcptr, *p; wcptr = g_utf8_to_utf16 ((char *) data, length, NULL, &wclen, &err); @@ -2188,7 +2188,7 @@ wchar_to_str (const wchar_t *wstr, static void transmute_utf8_string_to_cf_text (const guchar *data, - gint length, + int length, guchar **set_data, gsize *set_data_length, GDestroyNotify *set_data_destroy) @@ -2196,7 +2196,7 @@ transmute_utf8_string_to_cf_text (const guchar *data, glong rlen; GError *err = NULL; gsize size; - gint i; + int i; char *strptr, *p; wchar_t *wcptr; @@ -2274,7 +2274,7 @@ str_to_wchar (const char *str, static void transmute_cf_text_to_utf8_string (const guchar *data, - gint length, + int length, guchar **set_data, gsize *set_data_length, GDestroyNotify *set_data_destroy) @@ -2320,7 +2320,7 @@ transmute_cf_text_to_utf8_string (const guchar *data, static void transmute_cf_dib_to_image_bmp (const guchar *data, - gint length, + int length, guchar **set_data, gsize *set_data_length, GDestroyNotify *set_data_destroy) @@ -2354,8 +2354,8 @@ transmute_cf_dib_to_image_bmp (const guchar *data, BITMAPINFOHEADER *bi = (BITMAPINFOHEADER *) data; BITMAPFILEHEADER *bf; gpointer result; - gint data_length = length; - gint new_length; + int data_length = length; + int new_length; gboolean make_dibv5 = FALSE; BITMAPV5HEADER *bV5; guchar *p; @@ -2490,7 +2490,7 @@ transmute_cf_dib_to_image_bmp (const guchar *data, static void transmute_cf_shell_id_list_to_text_uri_list (const guchar *data, - gint length, + int length, guchar **set_data, gsize *set_data_length, GDestroyNotify *set_data_destroy) @@ -2540,12 +2540,12 @@ transmute_cf_shell_id_list_to_text_uri_list (const guchar *data, void transmute_image_bmp_to_cf_dib (const guchar *data, - gint length, + int length, guchar **set_data, gsize *set_data_length, GDestroyNotify *set_data_destroy) { - gint size; + int size; guchar *ptr; g_return_if_fail (length >= sizeof (BITMAPFILEHEADER)); @@ -2630,7 +2630,7 @@ gboolean _gdk_win32_transmute_contentformat (const gchar *from_contentformat, UINT to_w32format, const guchar *data, - gint length, + int length, guchar **set_data, gsize *set_data_length) { @@ -2682,16 +2682,16 @@ _gdk_win32_transmute_contentformat (const gchar *from_contentformat, return TRUE; } -gint +int _gdk_win32_add_contentformat_to_pairs (const char *contentformat, GArray *array) { - gint added_count = 0; + int added_count = 0; wchar_t *contentformat_w; GdkWin32ContentFormatPair fmt; - gint i; + int i; GArray *comp_pairs; - gint starting_point; + int starting_point; const wchar_t *prefix = L"application/x.windows."; size_t prefix_len = wcslen (prefix); size_t offset = 0; @@ -2732,7 +2732,7 @@ _gdk_win32_add_contentformat_to_pairs (const char *contentformat, comp_pairs = get_compatibility_w32formats_for_contentformat (contentformat); for (i = 0; comp_pairs != NULL && i < comp_pairs->len; i++) { - gint j; + int j; fmt = g_array_index (comp_pairs, GdkWin32ContentFormatPair, i); @@ -2834,7 +2834,7 @@ clipboard_store_hdata_ready (GObject *clipboard, gpointer user_data) { GError *error = NULL; - gint i; + int i; gboolean no_other_streams; GdkWin32ClipboardHDataPrepAndStream *prep_and_stream = (GdkWin32ClipboardHDataPrepAndStream *) user_data; GdkWin32ClipboardStorePrep *prep = prep_and_stream->prep; diff --git a/gdk/win32/gdkclipdrop-win32.h b/gdk/win32/gdkclipdrop-win32.h index 418d52c36e..f28b0eec80 100644 --- a/gdk/win32/gdkclipdrop-win32.h +++ b/gdk/win32/gdkclipdrop-win32.h @@ -34,7 +34,7 @@ G_BEGIN_DECLS * Also remembers whether the data needs to be transmuted. */ typedef struct { - gint w32format; + int w32format; /* This is assumed to be an interned string, it will be * compared by simply comparing the pointer. */ @@ -208,7 +208,7 @@ struct _GdkWin32Clipdrop * anything in the queue. If there is, then the queue * processing (which requires expensice locks) can happen. */ - gint dnd_queue_counter; + int dnd_queue_counter; /* We don't actually support multiple simultaneous drags, * for obvious reasons (though this might change with @@ -243,7 +243,7 @@ gchar * _gdk_win32_get_clipboard_format_name (UINT void _gdk_win32_add_w32format_to_pairs (UINT format, GArray *array, GdkContentFormatsBuilder *builder); -gint _gdk_win32_add_contentformat_to_pairs (const char *target, +int _gdk_win32_add_contentformat_to_pairs (const char *target, GArray *array); void _gdk_win32_clipboard_default_output_done (GObject *clipboard, @@ -252,7 +252,7 @@ void _gdk_win32_clipboard_default_output_done (GObject gboolean _gdk_win32_transmute_contentformat (const gchar *from_contentformat, UINT to_w32format, const guchar *data, - gint length, + int length, guchar **set_data, gsize *set_data_length); diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c index b1545a67ba..9184e6bcd3 100644 --- a/gdk/win32/gdkcursor-win32.c +++ b/gdk/win32/gdkcursor-win32.c @@ -381,12 +381,12 @@ gdk_win32_hcursor_get_handle (GdkWin32HCursor *cursor) } static HCURSOR -hcursor_from_x_cursor (gint i, +hcursor_from_x_cursor (int i, const gchar *name) { - gint j, x, y, ofs; + int j, x, y, ofs; HCURSOR rv; - gint w, h; + int w, h; guchar *and_plane, *xor_plane; w = GetSystemMetrics (SM_CXCURSOR); @@ -410,9 +410,9 @@ hcursor_from_x_cursor (gint i, for (x = 0; x < cursors[i].width && x < w ; x++, j++) { - gint pofs = ofs + x / 8; + int pofs = ofs + x / 8; guchar data = (cursors[i].data[j/4] & (0xc0 >> (2 * (j%4)))) >> (2 * (3 - (j%4))); - gint bit = 7 - (j % cursors[i].width) % 8; + int bit = 7 - (j % cursors[i].width) % 8; if (data) { @@ -510,10 +510,10 @@ win32_cursor_create_win32hcursor (GdkWin32Display *display, static Win32Cursor * win32_cursor_new (GdkWin32CursorLoadType load_type, gpointer resource_name, - gint width, - gint height, + int width, + int height, guint load_flags, - gint xcursor_number) + int xcursor_number) { Win32Cursor *result; @@ -545,7 +545,7 @@ win32_cursor_destroy (gpointer data) static void win32_cursor_theme_load_from (Win32CursorTheme *theme, - gint size, + int size, const gchar *dir) { GDir *gdir; @@ -600,11 +600,11 @@ win32_cursor_theme_load_from (Win32CursorTheme *theme, static void win32_cursor_theme_load_from_dirs (Win32CursorTheme *theme, const gchar *name, - gint size) + int size) { gchar *theme_dir; const gchar * const *dirs; - gint i; + int i; dirs = g_get_system_data_dirs (); @@ -624,9 +624,9 @@ win32_cursor_theme_load_from_dirs (Win32CursorTheme *theme, static void win32_cursor_theme_load_system (Win32CursorTheme *theme, - gint size) + int size) { - gint i; + int i; HCURSOR shared_hcursor; HCURSOR x_hcursor; Win32Cursor *cursor; @@ -690,7 +690,7 @@ win32_cursor_theme_load_system (Win32CursorTheme *theme, Win32CursorTheme * win32_cursor_theme_load (const gchar *name, - gint size) + int size) { Win32CursorTheme *result = g_new0 (Win32CursorTheme, 1); @@ -801,7 +801,7 @@ static GdkWin32HCursor * win32hcursor_x_from_name (GdkWin32Display *display, const gchar *name) { - gint i; + int i; for (i = 0; i < G_N_ELEMENTS (cursors); i++) if (cursors[i].name == NULL || strcmp (cursors[i].name, name) == 0) @@ -856,7 +856,7 @@ win32hcursor_from_name (GdkWin32Display *display, static GdkWin32HCursor * create_blank_win32hcursor (GdkWin32Display *display) { - gint w, h; + int w, h; guchar *and_plane, *xor_plane; HCURSOR rv; @@ -901,8 +901,8 @@ gdk_win32hcursor_create_for_name (GdkWin32Display *display, static HICON pixbuf_to_hicon (GdkPixbuf *pixbuf, gboolean is_icon, - gint x, - gint y); + int x, + int y); static GdkWin32HCursor * gdk_win32hcursor_create_for_texture (GdkWin32Display *display, @@ -912,7 +912,7 @@ gdk_win32hcursor_create_for_texture (GdkWin32Display *display, { cairo_surface_t *surface; GdkPixbuf *pixbuf; - gint width, height; + int width, height; HICON icon; surface = gdk_texture_download_surface (texture); @@ -1015,7 +1015,7 @@ gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon, } bmi; HDC hdc; guchar *pixels, *bits; - gint rowstride, x, y, w, h; + int rowstride, x, y, w, h; if (!GDI_CALL (GetIconInfo, (hicon, &ii))) return NULL; @@ -1113,7 +1113,7 @@ gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon, { for (x = 0; x < w; x++) { - const gint bit = 7 - (x % 8); + const int bit = 7 - (x % 8); printf ("%c ", ((bits[bpl*y+x/8])&(1<last_axis_data = g_new (gint, num_axes); + device->last_axis_data = g_new (int, num_axes); GDK_NOTE (INPUT, g_print ("device: (%u) %s axes: %d\n", cursorix, @@ -778,7 +778,7 @@ _gdk_input_set_tablet_active (void) } static void -decode_tilt (gint *axis_data, +decode_tilt (int *axis_data, AXIS *axes, PACKET *packet) { @@ -878,7 +878,7 @@ gdk_input_other_event (GdkDisplay *display, GdkEvent *event; PACKET packet; - gint num_axes; + int num_axes; double x, y; guint translated_buttons, button_diff, button_mask; diff --git a/gdk/win32/gdkdevicemanager-win32.h b/gdk/win32/gdkdevicemanager-win32.h index f1382b4df8..003be32a44 100644 --- a/gdk/win32/gdkdevicemanager-win32.h +++ b/gdk/win32/gdkdevicemanager-win32.h @@ -46,7 +46,7 @@ struct _GdkDeviceManagerWin32 * of our context (WT_PROXIMITY). Bumped down when we either * receive a WT_PACKET, or a WT_CSRCHANGE. */ - gint dev_entered_proximity; + int dev_entered_proximity; }; struct _GdkDeviceManagerWin32Class diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index 11fc4aecd7..53227c70ff 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -187,7 +187,7 @@ void _gdk_win32_display_init_monitors (GdkWin32Display *win32_display) { GPtrArray *new_monitors; - gint i; + int i; GdkWin32Monitor *primary_to_move = NULL; for (i = 0; i < g_list_model_get_n_items (win32_display->monitors); i++) @@ -340,10 +340,10 @@ _gdk_win32_display_init_monitors (GdkWin32Display *win32_display) void gdk_win32_display_set_cursor_theme (GdkDisplay *display, const gchar *name, - gint size) + int size) { - gint cursor_size; - gint w, h; + int cursor_size; + int w, h; Win32CursorTheme *theme; GdkWin32Display *win32_display = GDK_WIN32_DISPLAY (display); @@ -957,7 +957,7 @@ guint _gdk_win32_display_get_monitor_scale_factor (GdkWin32Display *win32_display, HMONITOR hmonitor, HWND hwnd, - gint *dpi) + int *dpi) { gboolean is_scale_acquired = FALSE; gboolean use_dpi_for_monitor = FALSE; diff --git a/gdk/win32/gdkdisplay-win32.h b/gdk/win32/gdkdisplay-win32.h index 8fb5ec4cb5..02c217189f 100644 --- a/gdk/win32/gdkdisplay-win32.h +++ b/gdk/win32/gdkdisplay-win32.h @@ -129,7 +129,7 @@ void gdk_win32_display_check_composited (GdkWin32Display *display); guint _gdk_win32_display_get_monitor_scale_factor (GdkWin32Display *win32_display, HMONITOR hmonitor, HWND hwnd, - gint *dpi); + int *dpi); typedef struct _GdkWin32MessageFilter GdkWin32MessageFilter; diff --git a/gdk/win32/gdkdrag-win32.c b/gdk/win32/gdkdrag-win32.c index 04169bedeb..20f8cb3f4b 100644 --- a/gdk/win32/gdkdrag-win32.c +++ b/gdk/win32/gdkdrag-win32.c @@ -225,7 +225,7 @@ typedef struct { IDropSource ids; IDropSourceNotify idsn; - gint ref_count; + int ref_count; GdkDrag *drag; /* These are thread-local @@ -1207,7 +1207,7 @@ query (LPDATAOBJECT This, GdkWin32ContentFormatPair **pair) { data_object *ctx = (data_object *) This; - gint i; + int i; if (pair) *pair = NULL; @@ -1633,8 +1633,8 @@ data_object_new (GdkDrag *drag) for (i = 0; i < n_mime_types; i++) { - gint added_count = 0; - gint j; + int added_count = 0; + int j; GDK_NOTE (DND, g_print ("DataObject supports contentformat 0x%p (%s)\n", mime_types[i], mime_types[i])); @@ -1790,8 +1790,8 @@ _gdk_win32_surface_drag_begin (GdkSurface *surface, * Unless, of course, we keep the LOCAL protocol around. */ typedef struct { - gint x; - gint y; + int x; + int y; HWND ignore; HWND result; } find_window_enum_arg; @@ -1834,8 +1834,8 @@ find_window_enum_proc (HWND hwnd, static HWND gdk_win32_drag_find_window (GdkDrag *drag, GdkSurface *drag_surface, - gint x_root, - gint y_root) + int x_root, + int y_root) { GdkWin32Drag *drag_win32 = GDK_WIN32_DRAG (drag); find_window_enum_arg a; @@ -1903,8 +1903,8 @@ _gdk_win32_get_drop_for_dest_window (HWND dest_window) static gboolean gdk_win32_local_drag_motion (GdkDrag *drag, HWND dest_window, - gint x_root, - gint y_root, + int x_root, + int y_root, GdkDragAction possible_actions, DWORD key_state, guint32 time_) @@ -2087,7 +2087,7 @@ gdk_drag_anim_timeout (gpointer data) gint64 current_time; double f; double t; - gint x, y; + int x, y; if (!frame_clock) return G_SOURCE_REMOVE; @@ -2381,7 +2381,7 @@ gdk_dnd_handle_key_event (GdkDrag *drag, GdkWin32Drag *drag_win32 = GDK_WIN32_DRAG (drag); GdkModifierType state; GdkDevice *pointer; - gint dx, dy; + int dx, dy; GDK_NOTE (DND, g_print ("gdk_dnd_handle_key_event: 0x%p\n", drag)); @@ -2546,8 +2546,8 @@ gdk_win32_drag_get_drag_surface (GdkDrag *drag) static void gdk_win32_drag_set_hotspot (GdkDrag *drag, - gint hot_x, - gint hot_y) + int hot_x, + int hot_y) { GdkWin32Drag *drag_win32 = GDK_WIN32_DRAG (drag); diff --git a/gdk/win32/gdkdrop-win32.c b/gdk/win32/gdkdrop-win32.c index 8d4af3b420..8d0ba39431 100644 --- a/gdk/win32/gdkdrop-win32.c +++ b/gdk/win32/gdkdrop-win32.c @@ -83,8 +83,8 @@ struct _GdkWin32Drop GdkDragAction actions; guint scale; /* Temporarily caches the HiDPI scale */ - gint last_x; /* Coordinates from last event, in GDK space */ - gint last_y; + int last_x; /* Coordinates from last event, in GDK space */ + int last_y; DWORD last_key_state; /* Key state from last event */ /* Just like GdkDrop->formats, but an array, and with format IDs @@ -117,7 +117,7 @@ G_DEFINE_TYPE (GdkWin32Drop, gdk_win32_drop, GDK_TYPE_DROP) struct _drop_target_context { IDropTarget idt; - gint ref_count; + int ref_count; /* The drop object we create when a drag enters our surface. * The drop object is destroyed when the drag leaves. @@ -454,8 +454,8 @@ set_source_actions_helper (GdkDrop *drop, void _gdk_win32_local_drop_target_dragenter (GdkDrag *drag, GdkSurface *dest_surface, - gint x_root, - gint y_root, + int x_root, + int y_root, DWORD grfKeyState, guint32 time_, GdkDragAction *actions) @@ -514,8 +514,8 @@ idroptarget_dragenter (LPDROPTARGET This, GdkDrop *drop; GdkWin32Drop *drop_win32; GdkDisplay *display; - gint pt_x; - gint pt_y; + int pt_x; + int pt_y; GdkDrag *drag; GdkDragAction source_actions; GdkDragAction dest_actions; @@ -574,8 +574,8 @@ idroptarget_dragenter (LPDROPTARGET This, gboolean _gdk_win32_local_drop_target_will_emit_motion (GdkDrop *drop, - gint x_root, - gint y_root, + int x_root, + int y_root, DWORD grfKeyState) { GdkWin32Drop *drop_win32 = GDK_WIN32_DROP (drop); @@ -591,8 +591,8 @@ _gdk_win32_local_drop_target_will_emit_motion (GdkDrop *drop, void _gdk_win32_local_drop_target_dragover (GdkDrop *drop, GdkDrag *drag, - gint x_root, - gint y_root, + int x_root, + int y_root, DWORD grfKeyState, guint32 time_, GdkDragAction *actions) @@ -639,8 +639,8 @@ idroptarget_dragover (LPDROPTARGET This, { drop_target_context *ctx = (drop_target_context *) This; GdkWin32Drop *drop_win32 = GDK_WIN32_DROP (ctx->drop); - gint pt_x = pt.x / drop_win32->scale + _gdk_offset_x; - gint pt_y = pt.y / drop_win32->scale + _gdk_offset_y; + int pt_x = pt.x / drop_win32->scale + _gdk_offset_x; + int pt_y = pt.y / drop_win32->scale + _gdk_offset_y; GdkDragAction source_actions; GdkDragAction dest_actions; @@ -743,8 +743,8 @@ idroptarget_drop (LPDROPTARGET This, { drop_target_context *ctx = (drop_target_context *) This; GdkWin32Drop *drop_win32 = GDK_WIN32_DROP (ctx->drop); - gint pt_x = pt.x / drop_win32->scale + _gdk_offset_x; - gint pt_y = pt.y / drop_win32->scale + _gdk_offset_y; + int pt_x = pt.x / drop_win32->scale + _gdk_offset_x; + int pt_y = pt.y / drop_win32->scale + _gdk_offset_y; GdkDragAction dest_action; GDK_NOTE (DND, g_print ("idroptarget_drop %p ", This)); @@ -930,7 +930,7 @@ close_it (gpointer data) static GdkWin32MessageFilterReturn gdk_dropfiles_filter (GdkWin32Display *display, MSG *msg, - gint *ret_valp, + int *ret_valp, gpointer data) { GdkSurface *window; @@ -939,7 +939,7 @@ gdk_dropfiles_filter (GdkWin32Display *display, GString *result; HANDLE hdrop; POINT pt; - gint nfiles, i; + int nfiles, i; gchar *fileName, *linkedFile; if (msg->message != WM_DROPFILES) diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index 377f4afbdf..0802fabdd3 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -100,9 +100,9 @@ #define SYNAPSIS_ICON_WINDOW_CLASS "SynTrackCursorWindowClass" static gboolean gdk_event_translate (MSG *msg, - gint *ret_valp); + int *ret_valp); static gboolean gdk_event_prepare (GSource *source, - gint *timeout); + int *timeout); static gboolean gdk_event_check (GSource *source); static gboolean gdk_event_dispatch (GSource *source, GSourceFunc callback, @@ -111,7 +111,7 @@ static gboolean gdk_event_dispatch (GSource *source, /* Private variable declarations */ -extern gint _gdk_input_ignore_core; +extern int _gdk_input_ignore_core; typedef struct { @@ -139,8 +139,8 @@ static GdkSurface *implicit_grab_surface = NULL; static GdkSurface *mouse_window = NULL; static GdkSurface *mouse_window_ignored_leave = NULL; -static gint current_x, current_y; -static gint current_root_x, current_root_y; +static int current_x, current_y; +static int current_root_x, current_root_y; static UINT got_gdk_events_message; static HWND modal_win32_dialog = NULL; @@ -250,7 +250,7 @@ inner_window_procedure (HWND hwnd, { MSG msg; DWORD pos; - gint ret_val = 0; + int ret_val = 0; msg.hwnd = hwnd; msg.message = message; @@ -687,10 +687,10 @@ get_active_group (void) return _gdk_win32_keymap_get_active_group (keymap); } -static gint +static int build_pointer_event_state (MSG *msg) { - gint state; + int state; state = 0; @@ -912,7 +912,7 @@ _gdk_win32_append_event (GdkEvent *event) static GdkWin32MessageFilterReturn apply_message_filters (GdkDisplay *display, MSG *msg, - gint *ret_valp, + int *ret_valp, GList **filters) { GdkWin32MessageFilterReturn result = GDK_WIN32_MESSAGE_FILTER_CONTINUE; @@ -1324,7 +1324,7 @@ _gdk_win32_hrgn_to_region (HRGN hrgn, RGNDATA *rgndata; RECT *rects; cairo_region_t *result; - gint nbytes; + int nbytes; guint i; if ((nbytes = GetRegionData (hrgn, 0, NULL)) == 0) @@ -1364,7 +1364,7 @@ _gdk_win32_hrgn_to_region (HRGN hrgn, static void adjust_drag (LONG *drag, LONG curr, - gint inc) + int inc) { if (*drag > curr) *drag = curr + ((*drag + inc/2 - curr) / inc) * inc; @@ -1482,7 +1482,7 @@ handle_nchittest (HWND hwnd, GdkSurface *window, gint16 screen_x, gint16 screen_y, - gint *ret_valp) + int *ret_valp) { RECT rect; GdkWin32Surface *impl; @@ -1569,7 +1569,7 @@ handle_dpi_changed (GdkSurface *window, static void generate_button_event (GdkEventType type, - gint button, + int button, GdkSurface *window, MSG *msg) { @@ -1820,7 +1820,7 @@ ensure_stacking_on_activate_app (MSG *msg, } static gboolean -handle_wm_sysmenu (GdkSurface *window, MSG *msg, gint *ret_valp) +handle_wm_sysmenu (GdkSurface *window, MSG *msg, int *ret_valp) { GdkWin32Surface *impl; LONG_PTR style, tmp_style; @@ -2006,8 +2006,8 @@ _gdk_win32_surface_fill_min_max_info (GdkSurface *window, GDK_BUTTON5_MASK) static gboolean -gdk_event_translate (MSG *msg, - gint *ret_valp) +gdk_event_translate (MSG *msg, + int *ret_valp) { RECT rect, *drag, orig_drag; POINT point; @@ -2021,7 +2021,7 @@ gdk_event_translate (MSG *msg, GdkEvent *event; wchar_t wbuf[100]; - gint ccount; + int ccount; GdkDisplay *display; GdkSurface *window = NULL; @@ -2036,7 +2036,7 @@ gdk_event_translate (MSG *msg, GdkDeviceGrabInfo *pointer_grab = NULL; GdkSurface *grab_window = NULL; - gint button; + int button; gchar buf[256]; gboolean return_val = FALSE; @@ -2308,7 +2308,7 @@ gdk_event_translate (MSG *msg, { if (both_shift_pressed[0] != 0 && both_shift_pressed[1] != 0) { - gint tmp_retval; + int tmp_retval; MSG fake_release = *msg; int pressed_shift = msg->lParam & 0xffffff; @@ -2508,7 +2508,7 @@ gdk_event_translate (MSG *msg, if (pointer_grab == NULL && implicit_grab_surface != NULL) { - gint state = build_pointer_event_state (msg); + int state = build_pointer_event_state (msg); /* We keep the implicit grab until no buttons at all are held down */ if ((state & GDK_ANY_BUTTON_MASK & ~(GDK_BUTTON1_MASK << (button - 1))) == 0) @@ -3602,7 +3602,7 @@ _gdk_win32_display_queue_events (GdkDisplay *display) static gboolean gdk_event_prepare (GSource *source, - gint *timeout) + int *timeout) { GdkWin32EventSource *event_source = (GdkWin32EventSource *)source; gboolean retval; diff --git a/gdk/win32/gdkglcontext-win32.c b/gdk/win32/gdkglcontext-win32.c index 965f04a46a..9aee9b2391 100644 --- a/gdk/win32/gdkglcontext-win32.c +++ b/gdk/win32/gdkglcontext-win32.c @@ -276,17 +276,17 @@ _get_dummy_window_hwnd (GdkWGLDummy *dummy) NULL); } -static gint +static int _gdk_init_dummy_context (GdkWGLDummy *dummy); #define PIXEL_ATTRIBUTES 17 -static gint +static int _get_wgl_pfd (HDC hdc, PIXELFORMATDESCRIPTOR *pfd, GdkWin32Display *display) { - gint best_pf = 0; + int best_pf = 0; pfd->nSize = sizeof (PIXELFORMATDESCRIPTOR); @@ -294,9 +294,9 @@ _get_wgl_pfd (HDC hdc, { GdkWGLDummy dummy; UINT num_formats; - gint colorbits = GetDeviceCaps (hdc, BITSPIXEL); + int colorbits = GetDeviceCaps (hdc, BITSPIXEL); guint extra_fields = 1; - gint i = 0; + int i = 0; int pixelAttribs[PIXEL_ATTRIBUTES]; /* Save up the HDC and HGLRC that we are currently using, to restore back to it when we are done here */ @@ -384,12 +384,12 @@ _get_wgl_pfd (HDC hdc, /* in WGL, for many OpenGL items, we need a dummy WGL context, so create * one and cache it for later use */ -static gint +static int _gdk_init_dummy_context (GdkWGLDummy *dummy) { PIXELFORMATDESCRIPTOR pfd; gboolean set_pixel_format_result = FALSE; - gint best_idx = 0; + int best_idx = 0; _get_dummy_window_hwnd (dummy); @@ -419,7 +419,7 @@ static gboolean _gdk_win32_display_init_gl (GdkDisplay *display) { GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (display); - gint best_idx = 0; + int best_idx = 0; GdkWGLDummy dummy; if (display_win32->have_wgl) @@ -628,7 +628,7 @@ gl_fail: static gboolean _set_pixformat_for_hdc (HDC hdc, - gint *best_idx, + int *best_idx, GdkWin32Display *display) { PIXELFORMATDESCRIPTOR pfd; @@ -658,13 +658,13 @@ gdk_win32_gl_context_realize (GdkGLContext *context, /* These are the real WGL context items that we will want to use later */ HGLRC hglrc; - gint pixel_format; + int pixel_format; gboolean debug_bit, compat_bit, legacy_bit; /* request flags and specific versions for core (3.2+) WGL context */ - gint flags = 0; - gint glver_major = 0; - gint glver_minor = 0; + int flags = 0; + int glver_major = 0; + int glver_minor = 0; GdkSurface *surface = gdk_gl_context_get_surface (context); GdkWin32Surface *impl = GDK_WIN32_SURFACE (surface); @@ -870,8 +870,8 @@ _gdk_win32_display_make_gl_context_current (GdkDisplay *display, */ gboolean gdk_win32_display_get_wgl_version (GdkDisplay *display, - gint *major, - gint *minor) + int *major, + int *minor) { g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE); diff --git a/gdk/win32/gdkglobals-win32.c b/gdk/win32/gdkglobals-win32.c index 12e228be2c..1904876a12 100644 --- a/gdk/win32/gdkglobals-win32.c +++ b/gdk/win32/gdkglobals-win32.c @@ -30,20 +30,20 @@ GdkDisplay *_gdk_display = NULL; GdkDeviceManagerWin32 *_gdk_device_manager = NULL; -gint _gdk_offset_x, _gdk_offset_y; +int _gdk_offset_x, _gdk_offset_y; HDC _gdk_display_hdc; HINSTANCE _gdk_dll_hinstance; HINSTANCE _gdk_app_hmodule; -gint _gdk_input_ignore_core; +int _gdk_input_ignore_core; HKL _gdk_input_locale; gboolean _gdk_input_locale_is_ime = FALSE; UINT _gdk_input_codepage; -gint _gdk_input_ignore_wintab = FALSE; -gint _gdk_max_colors = 0; +int _gdk_input_ignore_wintab = FALSE; +int _gdk_max_colors = 0; GdkWin32ModalOpKind _modal_operation_in_progress = GDK_WIN32_MODAL_OP_NONE; HWND _modal_move_resize_window = NULL; @@ -51,4 +51,4 @@ HWND _modal_move_resize_window = NULL; /* The singleton clipdrop object pointer */ GdkWin32Clipdrop *_win32_clipdrop = NULL; -GThread *_win32_main_thread = NULL; \ No newline at end of file +GThread *_win32_main_thread = NULL; diff --git a/gdk/win32/gdkkeys-win32.c b/gdk/win32/gdkkeys-win32.c index 972008492d..976003aea3 100644 --- a/gdk/win32/gdkkeys-win32.c +++ b/gdk/win32/gdkkeys-win32.c @@ -225,11 +225,11 @@ gdk_win32_keymap_finalize (GObject *object) static void print_keysym_tab (GdkWin32Keymap *keymap) { - gint li; + int li; GdkWin32KeyGroupOptions *options; - gint vk; + int vk; GdkWin32KeyLevelState level; - gint group_size = keymap->layout_handles->len; + int group_size = keymap->layout_handles->len; for (li = 0; li < group_size; li++) { @@ -258,7 +258,7 @@ print_keysym_tab (GdkWin32Keymap *keymap) static void handle_special (guint vk, guint *ksymp, - gint shift) + int shift) { switch (vk) @@ -554,9 +554,9 @@ _gdk_win32_keymap_get_decimal_mark (GdkWin32Keymap *keymap) } static gboolean -layouts_are_the_same (GArray *array, HKL *hkls, gint hkls_len) +layouts_are_the_same (GArray *array, HKL *hkls, int hkls_len) { - gint i; + int i; if (hkls_len != array->len) return FALSE; @@ -591,7 +591,7 @@ check_that_active_layout_is_in_sync (GdkWin32Keymap *keymap) } } -static gint +static int sort_key_nodes_by_gdk_keyval (gconstpointer a, gconstpointer b) { @@ -619,11 +619,11 @@ update_keymap (GdkKeymap *gdk_keymap) static HKL *hkls = NULL; gboolean no_list; static guint current_serial = 0; - gint i, group; + int i, group; GdkWin32KeyLevelState level; GdkWin32KeyGroupOptions *options; GdkWin32Keymap *keymap = GDK_WIN32_KEYMAP (gdk_keymap); - gint keysym_tab_size; + int keysym_tab_size; guchar key_state[KEY_STATE_SIZE]; guint scancode; @@ -760,7 +760,7 @@ update_keymap (GdkKeymap *gdk_keymap) ((vk == VK_DECIMAL) && (level == GDK_WIN32_LEVEL_NONE))) { wchar_t wcs[10]; - gint k; + int k; guint keysym; GdkWin32KeyNode dead_key; @@ -855,7 +855,7 @@ update_keymap (GdkKeymap *gdk_keymap) for (i = 0; i < options->dead_keys->len; i++) { wchar_t wcs[10]; - gint k; + int k; GdkWin32KeyNode *dead_key; GdkWin32KeyNode combo; @@ -1027,7 +1027,7 @@ gdk_win32_keymap_check_compose (GdkWin32Keymap *keymap, guint16 *output, gsize *output_len) { - gint partial_match; + int partial_match; guint8 active_group; gsize deadkey_i, node_i; GdkWin32KeyNode *dead_key; @@ -1149,7 +1149,7 @@ _gdk_win32_keymap_set_active_layout (GdkWin32Keymap *keymap, if (keymap != NULL && keymap->layout_handles->len > 0) { - gint group; + int group; for (group = 0; group < keymap->layout_handles->len; group++) if (g_array_index (keymap->layout_handles, HKL, group) == hkl) @@ -1235,7 +1235,7 @@ gdk_win32_keymap_have_bidi_layouts (GdkKeymap *gdk_keymap) GdkWin32Keymap *keymap; gboolean have_rtl = FALSE; gboolean have_ltr = FALSE; - gint group; + int group; GdkKeymap *default_keymap = gdk_display_get_keymap (gdk_display_get_default ()); if (gdk_keymap == NULL || gdk_keymap != default_keymap) @@ -1294,7 +1294,7 @@ gdk_win32_keymap_get_entries_for_keyval (GdkKeymap *gdk_keymap, /* Accept only the default keymap */ if (gdk_keymap == NULL || gdk_keymap == default_keymap) { - gint vk; + int vk; GdkWin32Keymap *keymap; if (gdk_keymap == NULL) @@ -1306,7 +1306,7 @@ gdk_win32_keymap_get_entries_for_keyval (GdkKeymap *gdk_keymap, for (vk = 0; vk < KEY_STATE_SIZE; vk++) { - gint group; + int group; for (group = 0; group < keymap->layout_handles->len; group++) { @@ -1356,11 +1356,11 @@ gdk_win32_keymap_get_entries_for_keycode (GdkKeymap *gdk_keymap, guint hardware_keycode, GdkKeymapKey **keys, guint **keyvals, - gint *n_entries) + int *n_entries) { GArray *key_array; GArray *keyval_array; - gint group; + int group; GdkWin32Keymap *keymap; GdkKeymap *default_keymap = gdk_display_get_keymap (gdk_display_get_default ()); @@ -1483,10 +1483,10 @@ static gboolean gdk_win32_keymap_translate_keyboard_state (GdkKeymap *gdk_keymap, guint hardware_keycode, GdkModifierType state, - gint group, + int group, guint *keyval, - gint *effective_group, - gint *level, + int *effective_group, + int *level, GdkModifierType *consumed_modifiers) { GdkWin32Keymap *keymap; diff --git a/gdk/win32/gdkmain-win32.c b/gdk/win32/gdkmain-win32.c index 4c9f5e7456..ea71f046b3 100644 --- a/gdk/win32/gdkmain-win32.c +++ b/gdk/win32/gdkmain-win32.c @@ -170,7 +170,7 @@ _gdk_win32_print_system_palette (void) g_free (pe); } -static gint +static int palette_size (HPALETTE hpal) { WORD npal = 0; @@ -185,7 +185,7 @@ void _gdk_win32_print_hpalette (HPALETTE hpal) { PALETTEENTRY *pe; - gint n, npal; + int n, npal; npal = palette_size (hpal); pe = g_new (PALETTEENTRY, npal); diff --git a/gdk/win32/gdkmonitor-win32.c b/gdk/win32/gdkmonitor-win32.c index 1a6d571d0d..4171965fc7 100644 --- a/gdk/win32/gdkmonitor-win32.c +++ b/gdk/win32/gdkmonitor-win32.c @@ -396,7 +396,7 @@ populate_monitor_devices_from_display_config (GPtrArray *monitors) UINT32 dispconf_path_count; fixedDISPLAYCONFIG_PATH_INFO *dispconf_paths; DISPLAYCONFIG_MODE_INFO *dispconf_modes; - gint path_index; + int path_index; user32 = LoadLibraryA ("user32.dll"); @@ -453,7 +453,7 @@ populate_monitor_devices_from_display_config (GPtrArray *monitors) for (path_index = 0; path_index < dispconf_path_count; path_index++) { fixedDISPLAYCONFIG_TARGET_DEVICE_NAME tdn; - gint i; + int i; GdkWin32Monitor *w32mon; GdkMonitor *mon; gchar *path, *path_lower; @@ -742,7 +742,7 @@ enum_monitor (HMONITOR hmonitor, static void prune_monitors (EnumMonitorData *data) { - gint i; + int i; for (i = 0; i < data->monitors->len; i++) { @@ -759,7 +759,7 @@ GPtrArray * _gdk_win32_display_get_monitor_list (GdkWin32Display *win32_display) { EnumMonitorData data; - gint i; + int i; data.display = win32_display; data.monitors = get_monitor_devices (win32_display); diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h index e9d92d0df6..86c0157369 100644 --- a/gdk/win32/gdkprivate-win32.h +++ b/gdk/win32/gdkprivate-win32.h @@ -163,22 +163,22 @@ gulong _gdk_win32_get_next_tick (gulong suggested_tick); void _gdk_surface_init_position (GdkSurface *window); void _gdk_surface_move_resize_child (GdkSurface *window, - gint x, - gint y, - gint width, - gint height); + int x, + int y, + int width, + int height); gboolean _gdk_win32_surface_enable_transparency (GdkSurface *window); /* GdkSurfaceImpl methods */ void _gdk_win32_surface_scroll (GdkSurface *window, - gint dx, - gint dy); + int dx, + int dy); void _gdk_win32_surface_move_region (GdkSurface *window, const cairo_region_t *region, - gint dx, - gint dy); + int dx, + int dy); void _gdk_win32_selection_init (void); @@ -189,8 +189,8 @@ void gdk_win32_handle_table_insert (HANDLE *handle, void gdk_win32_handle_table_remove (HANDLE handle); HRGN _gdk_win32_cairo_region_to_hrgn (const cairo_region_t *region, - gint x_origin, - gint y_origin); + int x_origin, + int y_origin); cairo_region_t *_gdk_win32_hrgn_to_region (HRGN hrgn, guint scale); @@ -270,13 +270,13 @@ extern GdkDeviceManagerWin32 *_gdk_device_manager; * to the left and/or above the primary monitor) to get GDK * coordinates, which should be non-negative on the whole screen. */ -extern gint _gdk_offset_x, _gdk_offset_y; +extern int _gdk_offset_x, _gdk_offset_y; extern HDC _gdk_display_hdc; extern HINSTANCE _gdk_dll_hinstance; extern HINSTANCE _gdk_app_hmodule; -extern gint _gdk_input_ignore_core; +extern int _gdk_input_ignore_core; /* These are thread specific, but GDK/win32 works OK only when invoked * from a single thread anyway. @@ -316,15 +316,15 @@ void _gdk_win32_end_modal_call (GdkWin32ModalOpKind kind); /* Options */ extern gboolean _gdk_input_ignore_wintab; -extern gint _gdk_max_colors; +extern int _gdk_max_colors; /* Convert a pixbuf to an HICON (or HCURSOR). Supports alpha under * Windows XP, thresholds alpha otherwise. */ HICON _gdk_win32_texture_to_hicon (GdkTexture *texture); HICON _gdk_win32_pixbuf_to_hcursor (GdkPixbuf *pixbuf, - gint x_hotspot, - gint y_hotspot); + int x_hotspot, + int y_hotspot); void _gdk_win32_display_init_cursors (GdkWin32Display *display); void _gdk_win32_display_finalize_cursors (GdkWin32Display *display); @@ -351,14 +351,14 @@ typedef struct _Win32Cursor Win32Cursor; struct _Win32Cursor { GdkWin32CursorLoadType load_type; gunichar2 *resource_name; - gint width; - gint height; + int width; + int height; guint load_flags; - gint xcursor_number; + int xcursor_number; }; Win32CursorTheme *win32_cursor_theme_load (const gchar *name, - gint size); + int size); Win32Cursor * win32_cursor_theme_get_cursor (Win32CursorTheme *theme, const gchar *name); void win32_cursor_theme_destroy (Win32CursorTheme *theme); @@ -420,8 +420,8 @@ gboolean _gdk_win32_get_window_rect (GdkSurface *window, void _gdk_win32_do_emit_configure_event (GdkSurface *window, RECT rect); void gdk_win32_surface_do_move_resize_drag (GdkSurface *window, - gint x, - gint y); + int x, + int y); void gdk_win32_surface_end_move_resize_drag (GdkSurface *window); gboolean _gdk_win32_surface_fill_min_max_info (GdkSurface *window, MINMAXINFO *mmi); diff --git a/gdk/win32/gdkproperty-win32.c b/gdk/win32/gdkproperty-win32.c index 7fbf644b5e..a5c9ade81a 100644 --- a/gdk/win32/gdkproperty-win32.c +++ b/gdk/win32/gdkproperty-win32.c @@ -40,7 +40,7 @@ _get_system_font_name (HDC hdc) PangoFontDescription *font_desc; gchar *result, *font_desc_string; int logpixelsy; - gint font_size; + int font_size; ncm.cbSize = sizeof(NONCLIENTMETRICSW); if (!SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0)) @@ -107,21 +107,21 @@ _gdk_win32_get_setting (const gchar *name, */ if (strcmp ("gtk-double-click-time", name) == 0) { - gint i = GetDoubleClickTime (); + int i = GetDoubleClickTime (); GDK_NOTE(MISC, g_print("gdk_display_get_setting(\"%s\") : %d\n", name, i)); g_value_set_int (value, i); return TRUE; } else if (strcmp ("gtk-double-click-distance", name) == 0) { - gint i = MAX(GetSystemMetrics (SM_CXDOUBLECLK), GetSystemMetrics (SM_CYDOUBLECLK)); + int i = MAX(GetSystemMetrics (SM_CXDOUBLECLK), GetSystemMetrics (SM_CYDOUBLECLK)); GDK_NOTE(MISC, g_print("gdk_display_get_setting(\"%s\") : %d\n", name, i)); g_value_set_int (value, i); return TRUE; } else if (strcmp ("gtk-dnd-drag-threshold", name) == 0) { - gint i = MAX(GetSystemMetrics (SM_CXDRAG), GetSystemMetrics (SM_CYDRAG)); + int i = MAX(GetSystemMetrics (SM_CXDRAG), GetSystemMetrics (SM_CYDRAG)); GDK_NOTE(MISC, g_print("gdk_display_get_setting(\"%s\") : %d\n", name, i)); g_value_set_int (value, i); return TRUE; diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c index 3b26a475ab..428311904b 100644 --- a/gdk/win32/gdksurface-win32.c +++ b/gdk/win32/gdksurface-win32.c @@ -211,10 +211,10 @@ gdk_surface_win32_finalize (GObject *object) void _gdk_win32_get_window_client_area_rect (GdkSurface *window, - gint scale, + int scale, RECT *rect) { - gint x, y, width, height; + int x, y, width, height; x = y = 0; width = gdk_surface_get_width (window); @@ -488,10 +488,10 @@ _gdk_win32_display_create_surface (GdkDisplay *display, GdkSurface *surface; const gchar *title; wchar_t *wtitle; - gint window_width, window_height; - gint window_x, window_y; - gint offset_x = 0, offset_y = 0; - gint real_x = 0, real_y = 0; + int window_width, window_height; + int window_x, window_y; + int offset_x = 0, offset_y = 0; + int real_x = 0, real_y = 0; GdkFrameClock *frame_clock; g_return_val_if_fail (display == _gdk_display, NULL); @@ -750,8 +750,8 @@ gdk_win32_surface_destroy_notify (GdkSurface *window) static void get_outer_rect (GdkSurface *window, - gint width, - gint height, + int width, + int height, RECT *rect) { GdkWin32Surface *impl = GDK_WIN32_SURFACE (window); @@ -765,16 +765,16 @@ get_outer_rect (GdkSurface *window, static void adjust_for_gravity_hints (GdkSurface *window, - RECT *outer_rect, - gint *x, - gint *y) + RECT *outer_rect, + int *x, + int *y) { GdkWin32Surface *impl = GDK_WIN32_SURFACE (window); if (impl->hint_flags & GDK_HINT_WIN_GRAVITY) { #ifdef G_ENABLE_DEBUG - gint orig_x = *x, orig_y = *y; + int orig_x = *x, orig_y = *y; #endif switch (impl->hints.win_gravity) @@ -1106,7 +1106,7 @@ gdk_win32_surface_hide (GdkSurface *window) static void gdk_win32_surface_do_move (GdkSurface *window, - gint x, gint y) + int x, int y) { RECT outer_rect; GdkWin32Surface *impl; @@ -1143,7 +1143,7 @@ gdk_win32_surface_do_move (GdkSurface *window, void gdk_win32_surface_resize (GdkSurface *window, - gint width, gint height) + int width, int height) { RECT outer_rect; @@ -1182,10 +1182,10 @@ gdk_win32_surface_resize (GdkSurface *window, static void gdk_win32_surface_do_move_resize (GdkSurface *window, - gint x, - gint y, - gint width, - gint height) + int x, + int y, + int width, + int height) { RECT outer_rect; GdkWin32Surface *impl; @@ -1233,10 +1233,10 @@ gdk_win32_surface_do_move_resize (GdkSurface *window, static void gdk_win32_surface_move_resize_internal (GdkSurface *window, gboolean with_move, - gint x, - gint y, - gint width, - gint height) + int x, + int y, + int width, + int height) { GdkWin32Surface *surface = GDK_WIN32_SURFACE (window); @@ -1271,18 +1271,18 @@ gdk_win32_surface_move_resize_internal (GdkSurface *window, void gdk_win32_surface_move_resize (GdkSurface *window, - gint x, - gint y, - gint width, - gint height) + int x, + int y, + int width, + int height) { gdk_win32_surface_move_resize_internal (window, TRUE, x, y, width, height); } void gdk_win32_surface_move (GdkSurface *surface, - gint x, - gint y) + int x, + int y) { gdk_win32_surface_move_resize_internal (surface, TRUE, x, y, -1, -1); } @@ -1706,10 +1706,10 @@ _gdk_modal_current (void) static void gdk_win32_surface_get_geometry (GdkSurface *window, - gint *x, - gint *y, - gint *width, - gint *height) + int *x, + int *y, + int *width, + int *height) { if (!GDK_SURFACE_DESTROYED (window)) { @@ -1772,13 +1772,13 @@ gdk_win32_surface_get_geometry (GdkSurface *window, static void gdk_win32_surface_get_root_coords (GdkSurface *window, - gint x, - gint y, - gint *root_x, - gint *root_y) + int x, + int y, + int *root_x, + int *root_y) { - gint tx; - gint ty; + int tx; + int ty; POINT pt; GdkWin32Surface *impl = GDK_WIN32_SURFACE (window); @@ -2051,10 +2051,10 @@ calculate_aerosnap_regions (GdkW32DragMoveResizeContext *context) { GdkDisplay *display; GListModel *monitors; - gint monitor_idx, other_monitor_idx; + int monitor_idx, other_monitor_idx; GdkWin32Surface *impl = GDK_WIN32_SURFACE (context->window); #if defined(MORE_AEROSNAP_DEBUGGING) - gint i; + int i; #endif display = gdk_display_get_default (); @@ -2072,8 +2072,8 @@ calculate_aerosnap_regions (GdkW32DragMoveResizeContext *context) AeroSnapEdgeRegion snap_region; gboolean move_edge[4] = { TRUE, FALSE, TRUE, TRUE }; gboolean resize_edge[2] = { TRUE, TRUE }; - gint diff; - gint thickness, trigger_thickness; + int diff; + int thickness, trigger_thickness; GdkMonitor *monitor; monitor = g_list_model_get_item (monitors, monitor_idx); @@ -2306,9 +2306,9 @@ static void stash_window (GdkSurface *window, GdkWin32Surface *impl) { - gint x, y; - gint width, wwidth; - gint height, wheight; + int x, y; + int width, wwidth; + int height, wheight; WINDOWPLACEMENT placement; HMONITOR hmonitor; MONITORINFO hmonitor_info; @@ -2379,8 +2379,8 @@ static void snap_up (GdkSurface *window) { SHORT maxysize; - gint x, y; - gint width, height; + int x, y; + int width, height; GdkWin32Surface *impl; impl = GDK_WIN32_SURFACE (window); @@ -2475,7 +2475,7 @@ _gdk_win32_surface_handle_aerosnap (GdkSurface *window, GdkWin32Surface *impl; GdkDisplay *display; GListModel *monitors; - gint n_monitors; + int n_monitors; GdkSurfaceState surface_state = gdk_toplevel_get_state (GDK_TOPLEVEL (window)); gboolean minimized = surface_state & GDK_SURFACE_STATE_MINIMIZED; gboolean maximized = surface_state & GDK_SURFACE_STATE_MAXIMIZED; @@ -2563,7 +2563,7 @@ _gdk_win32_surface_handle_aerosnap (GdkSurface *window, else if (impl->snap_state == GDK_WIN32_AEROSNAP_STATE_HALFRIGHT) { GdkMonitor *other; - gint i; + int i; unsnap (window, monitor); for (i = 0; i < n_monitors; i++) @@ -2695,8 +2695,8 @@ ensure_snap_indicator_exists (GdkW32DragMoveResizeContext *context) static gboolean ensure_snap_indicator_surface (GdkW32DragMoveResizeContext *context, - gint width, - gint height, + int width, + int height, guint scale) { if (context->indicator_surface != NULL && @@ -2731,7 +2731,7 @@ adjust_indicator_rectangle (GdkRectangle *rect, gboolean inward) { gdouble inverter; - const gint gap = AEROSNAP_INDICATOR_EDGE_GAP; + const int gap = AEROSNAP_INDICATOR_EDGE_GAP; #if defined(MORE_AEROSNAP_DEBUGGING) GdkRectangle cache = *rect; #endif @@ -2755,10 +2755,10 @@ adjust_indicator_rectangle (GdkRectangle *rect, static void rounded_rectangle (cairo_t *cr, - gint x, - gint y, - gint width, - gint height, + int x, + int y, + int width, + int height, gdouble radius, gdouble line_width, GdkRGBA *fill, @@ -3194,8 +3194,8 @@ get_monitor_at_point (GdkDisplay *display, static void start_indicator (GdkSurface *window, GdkW32DragMoveResizeContext *context, - gint x, - gint y, + int x, + int y, GdkWin32AeroSnapState state) { GdkMonitor *monitor; @@ -3266,12 +3266,12 @@ stop_indicator (GdkSurface *window, SWP_NOSIZE | SWP_NOREDRAW | SWP_HIDEWINDOW | SWP_NOACTIVATE)); } -static gint -point_in_aerosnap_region (gint x, - gint y, +static int +point_in_aerosnap_region (int x, + int y, AeroSnapEdgeRegion *region) { - gint edge, trigger; + int edge, trigger; edge = (x >= region->edge.x && y >= region->edge.y && @@ -3287,15 +3287,15 @@ point_in_aerosnap_region (gint x, static void handle_aerosnap_move_resize (GdkSurface *window, GdkW32DragMoveResizeContext *context, - gint x, - gint y) + int x, + int y) { - gint i; + int i; AeroSnapEdgeRegion *reg; - gint maximize = 0; - gint halfleft = 0; - gint halfright = 0; - gint fullup = 0; + int maximize = 0; + int halfleft = 0; + int halfright = 0; + int fullup = 0; gboolean fullup_edge = FALSE; if (context->op == GDK_WIN32_DRAGOP_RESIZE) @@ -3505,9 +3505,9 @@ setup_drag_move_resize_context (GdkSurface *window, GdkW32WindowDragOp op, GdkSurfaceEdge edge, GdkDevice *device, - gint button, - gint x, - gint y, + int button, + int x, + int y, guint32 timestamp) { RECT rect; @@ -3515,7 +3515,7 @@ setup_drag_move_resize_context (GdkSurface *window, GdkSurface *pointer_window; GdkWin32Surface *impl = GDK_WIN32_SURFACE (window); gboolean maximized = gdk_toplevel_get_state (GDK_TOPLEVEL (window)) & GDK_SURFACE_STATE_MAXIMIZED; - gint root_x, root_y; + int root_x, root_y; gdk_win32_surface_get_root_coords (window, x, y, &root_x, &root_y); @@ -3571,10 +3571,10 @@ setup_drag_move_resize_context (GdkSurface *window, impl->snap_state == GDK_WIN32_AEROSNAP_STATE_FULLUP)) { GdkMonitor *monitor; - gint wx, wy, wwidth, wheight; - gint swx, swy, swwidth, swheight; + int wx, wy, wwidth, wheight; + int swx, swy, swwidth, swheight; gboolean pointer_outside_of_window; - gint offsetx, offsety; + int offsetx, offsety; gboolean left_half; GdkDisplay *display; @@ -3632,8 +3632,8 @@ setup_drag_move_resize_context (GdkSurface *window, if (!pointer_outside_of_window && maximized) { WINDOWPLACEMENT placement; - gint unmax_width, unmax_height; - gint shadow_unmax_width, shadow_unmax_height; + int unmax_width, unmax_height; + int shadow_unmax_width, shadow_unmax_height; placement.length = sizeof (placement); API_CALL (GetWindowPlacement, (GDK_SURFACE_HWND (window), &placement)); @@ -3937,17 +3937,17 @@ _gdk_win32_update_layered_window_from_cache (GdkSurface *surface, void gdk_win32_surface_do_move_resize_drag (GdkSurface *window, - gint x, - gint y) + int x, + int y) { RECT rect; RECT new_rect; - gint diffy, diffx; + int diffy, diffx; MINMAXINFO mmi; GdkWin32Surface *impl; GdkW32DragMoveResizeContext *context; - gint width; - gint height; + int width; + int height; impl = GDK_WIN32_SURFACE (window); context = &impl->drag_move_resize_context; @@ -4289,7 +4289,7 @@ gdk_win32_surface_unmaximize (GdkSurface *window) static void gdk_win32_surface_fullscreen (GdkSurface *window) { - gint x, y, width, height; + int x, y, width, height; FullscreenInfo *fi; HMONITOR monitor; MONITORINFO mi; @@ -4465,7 +4465,7 @@ gdk_win32_surface_show_window_menu (GdkSurface *window, GdkEvent *event) { double event_x, event_y; - gint x, y; + int x, y; GdkWin32Surface *impl = GDK_WIN32_SURFACE (window); switch ((int) event->event_type) @@ -4586,10 +4586,10 @@ GtkShowWindow (GdkSurface *window, static void gdk_win32_surface_set_shadow_width (GdkSurface *window, - gint left, - gint right, - gint top, - gint bottom) + int left, + int right, + int top, + int bottom) { GdkWin32Surface *impl = GDK_WIN32_SURFACE (window); @@ -4614,7 +4614,7 @@ gdk_win32_surface_set_shadow_width (GdkSurface *window, } -gint +int _gdk_win32_surface_get_scale_factor (GdkSurface *window) { GdkDisplay *display; @@ -4663,8 +4663,8 @@ _gdk_win32_surface_get_scale_factor (GdkSurface *window) void _gdk_win32_surface_get_unscaled_size (GdkSurface *window, - gint *unscaled_width, - gint *unscaled_height) + int *unscaled_width, + int *unscaled_height) { GdkWin32Surface *impl = GDK_WIN32_SURFACE (window); diff --git a/gdk/win32/gdksurface-win32.h b/gdk/win32/gdksurface-win32.h index c7bbba4858..84e7dbaee0 100644 --- a/gdk/win32/gdksurface-win32.h +++ b/gdk/win32/gdksurface-win32.h @@ -117,14 +117,14 @@ struct _GdkW32DragMoveResizeContext * The op will be canceled only when *this* button * is released. */ - gint button; + int button; /* Initial cursor position when the operation began. * Current cursor position is subtracted from it to find how far * to move window border(s). */ - gint start_root_x; - gint start_root_y; + int start_root_x; + int start_root_y; /* Initial window rectangle (position and size). * The window is resized/moved relative to this (see start_root_*). @@ -153,8 +153,8 @@ struct _GdkW32DragMoveResizeContext /* Used to draw the indicator */ cairo_surface_t *indicator_surface; - gint indicator_surface_width; - gint indicator_surface_height; + int indicator_surface_width; + int indicator_surface_height; /* Size/position of shape_indicator */ GdkRectangle indicator_window_rect; @@ -240,7 +240,7 @@ struct _GdkWin32Surface wchar_t leading_surrogate_keyup; /* Window size hints */ - gint hint_flags; + int hint_flags; GdkGeometry hints; /* Non-NULL for any window that is registered as a drop target. @@ -256,18 +256,18 @@ struct _GdkWin32Surface GdkSurface *transient_owner; GSList *transient_children; - gint num_transients; + int num_transients; gboolean changing_state; - gint initial_x; - gint initial_y; + int initial_x; + int initial_y; /* left/right/top/bottom width of the shadow/resize-grip around the window */ RECT margins; /* left+right and top+bottom from @margins */ - gint margins_x; - gint margins_y; + int margins_x; + int margins_y; /* Set to TRUE when GTK tells us that margins are 0 everywhere. * We don't actually set margins to 0, we just set this bit. @@ -304,8 +304,8 @@ struct _GdkWin32Surface * does not provide a way to query its size, * so we have to remember it ourselves. */ - gint dib_width; - gint dib_height; + int dib_width; + int dib_height; /* If the client wants uniformly-transparent window, * we remember the opacity value here and apply it @@ -348,9 +348,9 @@ struct _GdkWin32Surface LONG_PTR temp_styles; /* scale of window on HiDPI */ - gint surface_scale; - gint unscaled_width; - gint unscaled_height; + int surface_scale; + int unscaled_width; + int unscaled_height; }; struct _GdkWin32SurfaceClass @@ -362,10 +362,10 @@ GType _gdk_win32_surface_get_type (void); void _gdk_win32_surface_update_style_bits (GdkSurface *window); -gint _gdk_win32_surface_get_scale_factor (GdkSurface *window); +int _gdk_win32_surface_get_scale_factor (GdkSurface *window); void _gdk_win32_get_window_client_area_rect (GdkSurface *window, - gint scale, + int scale, RECT *rect); void _gdk_win32_update_layered_window_from_cache (GdkSurface *window, RECT *client_rect, @@ -374,18 +374,18 @@ void _gdk_win32_update_layered_window_from_cache (GdkSurface *window, gboolean do_paint); void gdk_win32_surface_move (GdkSurface *surface, - gint x, - gint y); + int x, + int y); void gdk_win32_surface_move_resize (GdkSurface *window, - gint x, - gint y, - gint width, - gint height); + int x, + int y, + int width, + int height); void gdk_win32_surface_get_queued_window_rect (GdkSurface *surface, - gint scale, + int scale, RECT *return_window_rect); void diff --git a/gdk/win32/gdkwin32display.h b/gdk/win32/gdkwin32display.h index 2f7af043be..6eebe6e76d 100644 --- a/gdk/win32/gdkwin32display.h +++ b/gdk/win32/gdkwin32display.h @@ -55,7 +55,7 @@ GType gdk_win32_display_get_type (void); GDK_AVAILABLE_IN_ALL void gdk_win32_display_set_cursor_theme (GdkDisplay *display, const gchar *name, - gint size); + int size); /** * GdkWin32MessageFilterReturn: @@ -88,7 +88,7 @@ typedef enum { */ typedef GdkWin32MessageFilterReturn (*GdkWin32MessageFilterFunc) (GdkWin32Display *display, MSG *message, - gint *return_value, + int *return_value, gpointer data); GDK_AVAILABLE_IN_ALL diff --git a/gdk/win32/gdkwin32dnd-private.h b/gdk/win32/gdkwin32dnd-private.h index 7fe9324466..c19a7deead 100644 --- a/gdk/win32/gdkwin32dnd-private.h +++ b/gdk/win32/gdkwin32dnd-private.h @@ -33,8 +33,8 @@ typedef struct _GdkWin32DragUtilityData GdkWin32DragUtilityData; */ struct _GdkWin32DragUtilityData { - gint last_x; /* Coordinates from last event, in GDK space */ - gint last_y; + int last_x; /* Coordinates from last event, in GDK space */ + int last_y; DWORD last_key_state; /* Key state from last event */ GdkWin32DndState state; }; @@ -74,10 +74,10 @@ struct _GdkWin32Drag GdkWin32DragUtilityData util_data; guint scale; /* Temporarily caches the HiDPI scale */ - gint hot_x; /* Hotspot offset from the top-left of the drag-window, scaled (can be added to GDK space coordinates) */ - gint hot_y; - gint start_x; /* Coordinates of the drag start, in GDK space */ - gint start_y; + int hot_x; /* Hotspot offset from the top-left of the drag-window, scaled (can be added to GDK space coordinates) */ + int hot_y; + int start_x; /* Coordinates of the drag start, in GDK space */ + int start_y; guint drag_status : 4; /* Current status of drag */ guint drop_failed : 1; /* Whether the drop was unsuccessful */ @@ -96,21 +96,21 @@ GdkDrag *_gdk_win32_find_drag_for_dest_window (HWND dest_window) GdkDrop *_gdk_win32_get_drop_for_dest_surface (GdkSurface *dest); gboolean _gdk_win32_local_drop_target_will_emit_motion (GdkDrop *drop, - gint x_root, - gint y_root, + int x_root, + int y_root, DWORD grfKeyState); void _gdk_win32_local_drop_target_dragenter (GdkDrag *drag, GdkSurface *dest_surface, - gint x_root, - gint y_root, + int x_root, + int y_root, DWORD grfKeyState, guint32 time_, GdkDragAction *actions); void _gdk_win32_local_drop_target_dragover (GdkDrop *drop, GdkDrag *drag, - gint x_root, - gint y_root, + int x_root, + int y_root, DWORD grfKeyState, guint32 time_, GdkDragAction *actions); diff --git a/gdk/win32/gdkwin32glcontext.h b/gdk/win32/gdkwin32glcontext.h index 6b55735a9d..825841a0bd 100644 --- a/gdk/win32/gdkwin32glcontext.h +++ b/gdk/win32/gdkwin32glcontext.h @@ -41,8 +41,8 @@ GType gdk_win32_gl_context_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL gboolean gdk_win32_display_get_wgl_version (GdkDisplay *display, - gint *major, - gint *minor); + int *major, + int *minor); G_END_DECLS diff --git a/gdk/win32/gdkwin32id.c b/gdk/win32/gdkwin32id.c index 8e62e9e34b..006e59fc7c 100644 --- a/gdk/win32/gdkwin32id.c +++ b/gdk/win32/gdkwin32id.c @@ -39,7 +39,7 @@ gdk_handle_hash (HANDLE *handle) #endif } -static gint +static int gdk_handle_equal (HANDLE *a, HANDLE *b) { diff --git a/gdk/win32/gdkwin32langnotification.c b/gdk/win32/gdkwin32langnotification.c index 94814ecd6a..2ea28e824f 100644 --- a/gdk/win32/gdkwin32langnotification.c +++ b/gdk/win32/gdkwin32langnotification.c @@ -28,7 +28,7 @@ struct _GdkWin32ALPNSink { ITfActiveLanguageProfileNotifySink itf_alpn_sink; - gint ref_count; + int ref_count; }; typedef struct _GdkWin32ALPNSink GdkWin32ALPNSink; diff --git a/gdk/win32/xcursors.h b/gdk/win32/xcursors.h index 4243a39f41..03e10d12e2 100644 --- a/gdk/win32/xcursors.h +++ b/gdk/win32/xcursors.h @@ -1,4 +1,4 @@ -static const struct { const gchar *name; const gchar *builtin; gint type; guchar width; guchar height; guchar hotx; guchar hoty; gchar *data; } cursors[] = { +static const struct { const gchar *name; const gchar *builtin; int type; guchar width; guchar height; guchar hotx; guchar hoty; gchar *data; } cursors[] = { { "X_cursor", NULL, 0, 16, 16, 7, 7, "\125\000\000\125\152\100\001\251\152\220\006\251\152\244\032\251" "\032\251\152\244\006\252\252\220\001\252\252\100\000\152\251\000" diff --git a/gdk/x11/gdkasync.c b/gdk/x11/gdkasync.c index 1ef7697617..04433821de 100644 --- a/gdk/x11/gdkasync.c +++ b/gdk/x11/gdkasync.c @@ -78,7 +78,7 @@ struct _ChildInfoState guint current_child; guint n_children_found; - gint current_request; + int current_request; gboolean have_error; gboolean child_has_error; }; diff --git a/gdk/x11/gdkasync.h b/gdk/x11/gdkasync.h index f7be90fbff..009c2fae79 100644 --- a/gdk/x11/gdkasync.h +++ b/gdk/x11/gdkasync.h @@ -36,10 +36,10 @@ typedef void (*GdkRoundTripCallback) (GdkDisplay *display, struct _GdkChildInfoX11 { Window window; - gint x; - gint y; - gint width; - gint height; + int x; + int y; + int width; + int height; guint is_mapped : 1; guint has_wm_state : 1; guint window_class : 2; diff --git a/gdk/x11/gdkclipboard-x11.c b/gdk/x11/gdkclipboard-x11.c index bd46f24a15..af2434fbf4 100644 --- a/gdk/x11/gdkclipboard-x11.c +++ b/gdk/x11/gdkclipboard-x11.c @@ -141,7 +141,7 @@ static const struct { const char *mime_type; GInputStream * (* convert) (GdkX11Clipboard *, GInputStream *, const char *, int); const char *type; - gint format; + int format; } special_targets[] = { { "UTF8_STRING", "text/plain;charset=utf-8", no_convert, "UTF8_STRING", 8 }, { "COMPOUND_TEXT", "text/plain;charset=utf-8", text_list_convert, "COMPOUND_TEXT", 8 }, diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c index a050a70f7a..bb05c01baf 100644 --- a/gdk/x11/gdkcursor-x11.c +++ b/gdk/x11/gdkcursor-x11.c @@ -147,9 +147,9 @@ static const struct { static XcursorImage* create_cursor_image (GdkTexture *texture, - gint x, - gint y, - gint scale) + int x, + int y, + int scale) { XcursorImage *xcimage; @@ -187,7 +187,7 @@ gdk_x11_cursor_create_for_texture (GdkDisplay *display, static const gchar * name_fallback (const gchar *name) { - gint i; + int i; for (i = 0; i < G_N_ELEMENTS (name_map); i++) { @@ -241,7 +241,7 @@ static Cursor gdk_x11_cursor_create_for_name (GdkDisplay *display, const gchar *name) { - gint i; + int i; if (g_str_equal (name, "none")) return get_blank_cursor (display); @@ -280,12 +280,12 @@ gdk_x11_cursor_create_for_name (GdkDisplay *display, void gdk_x11_display_set_cursor_theme (GdkDisplay *display, const gchar *theme, - const gint size) + const int size) { #if defined(HAVE_XCURSOR) && defined(HAVE_XFIXES) && XFIXES_MAJOR >= 2 Display *xdisplay; gchar *old_theme; - gint old_size; + int old_size; gpointer cursor, xcursor; GHashTableIter iter; diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c index fbc98b83a3..01736e6821 100644 --- a/gdk/x11/gdkdevice-xi2.c +++ b/gdk/x11/gdkdevice-xi2.c @@ -47,7 +47,7 @@ struct _GdkX11DeviceXI2 { GdkDevice parent_instance; - gint device_id; + int device_id; GArray *scroll_valuators; gdouble *last_axes; }; @@ -199,7 +199,7 @@ gdk_x11_device_xi2_get_state (GdkDevice *device, { GdkDisplay *display; XIDeviceInfo *info; - gint i, j, ndevices; + int i, j, ndevices; Screen *xscreen; display = gdk_device_get_display (device); @@ -228,7 +228,7 @@ gdk_x11_device_xi2_get_state (GdkDevice *device, case GDK_AXIS_Y: case GDK_AXIS_IGNORE: { - gint root_x, root_y; + int root_x, root_y; /* FIXME: Maybe root coords caching should happen here */ gdk_surface_get_origin (surface, &root_x, &root_y); @@ -387,7 +387,7 @@ gdk_x11_device_xi2_grab (GdkDevice *device, XIEventMask mask; Window xwindow; Cursor xcursor; - gint status; + int status; display = gdk_device_get_display (device); device_manager_xi2 = GDK_X11_DEVICE_MANAGER_XI2 (GDK_X11_DISPLAY (display)->device_manager); @@ -498,7 +498,7 @@ gdk_x11_device_xi2_surface_at_position (GdkDevice *device, } else { - gint width, height; + int width, height; GList *toplevels, *list; Window pointer_window; @@ -628,10 +628,10 @@ gdk_x11_device_xi2_surface_at_position (GdkDevice *device, guchar * _gdk_x11_device_xi2_translate_event_mask (GdkX11DeviceManagerXI2 *device_manager_xi2, GdkEventMask event_mask, - gint *len) + int *len) { guchar *mask; - gint minor; + int minor; g_object_get (device_manager_xi2, "minor", &minor, NULL); @@ -707,7 +707,7 @@ _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state, if (buttons_state) { - gint len, i; + int len, i; /* We're only interested in the first 3 buttons */ len = MIN (3, buttons_state->mask_len * 8); @@ -827,7 +827,7 @@ _gdk_device_xi2_unset_scroll_valuators (GdkX11DeviceXI2 *device) device->scroll_valuators->len); } -gint +int _gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device) { g_return_val_if_fail (GDK_IS_X11_DEVICE_XI2 (device), 0); @@ -837,7 +837,7 @@ _gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device) gdouble gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device, - gint n_axis) + int n_axis) { if (n_axis >= gdk_device_get_n_axes (GDK_DEVICE (device))) return 0; @@ -851,7 +851,7 @@ gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device, void gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device, gdouble *axes, - gint n_axes) + int n_axes) { g_free (device->last_axes); diff --git a/gdk/x11/gdkdevicemanager-x11.c b/gdk/x11/gdkdevicemanager-x11.c index 1478b9242a..5be86397e7 100644 --- a/gdk/x11/gdkdevicemanager-x11.c +++ b/gdk/x11/gdkdevicemanager-x11.c @@ -76,7 +76,7 @@ _gdk_x11_device_manager_new (GdkDisplay *display) **/ GdkDevice * gdk_x11_device_manager_lookup (GdkX11DeviceManagerXI2 *device_manager, - gint device_id) + int device_id) { g_return_val_if_fail (GDK_IS_X11_DEVICE_MANAGER_XI2 (device_manager), NULL); @@ -92,7 +92,7 @@ gdk_x11_device_manager_lookup (GdkX11DeviceManagerXI2 *device_manager, * * Returns: the XInput2 device ID. **/ -gint +int gdk_x11_device_get_id (GdkDevice *device) { g_return_val_if_fail (GDK_IS_DEVICE (device), 0); diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c index de6feaad3d..ef63fb5c4d 100644 --- a/gdk/x11/gdkdevicemanager-xi2.c +++ b/gdk/x11/gdkdevicemanager-xi2.c @@ -88,9 +88,9 @@ struct _GdkX11DeviceManagerXI2 GList *devices; - gint opcode; - gint major; - gint minor; + int opcode; + int major; + int minor; }; struct _GdkX11DeviceManagerXI2Class @@ -211,7 +211,7 @@ translate_valuator_class (GdkDisplay *display, static gboolean initialized = FALSE; static Atom label_atoms [GDK_AXIS_LAST] = { 0 }; GdkAxisUse use = GDK_AXIS_IGNORE; - gint i; + int i; if (!initialized) { @@ -253,7 +253,7 @@ translate_device_classes (GdkDisplay *display, XIAnyClassInfo **classes, guint n_classes) { - gint i; + int i; g_object_freeze_notify (G_OBJECT (device)); @@ -317,7 +317,7 @@ static gboolean is_touch_device (XIAnyClassInfo **classes, guint n_classes, GdkInputSource *device_type, - gint *num_touches) + int *num_touches) { #ifdef XINPUT_2_2 guint i; @@ -473,7 +473,7 @@ create_device (GdkX11DeviceManagerXI2 *device_manager, GdkInputSource touch_source; GdkDeviceType type; GdkDevice *device; - gint num_touches = 0; + int num_touches = 0; gchar *vendor_id = NULL, *product_id = NULL; if (dev->use == XIMasterKeyboard || dev->use == XISlaveKeyboard) @@ -666,7 +666,7 @@ detach_from_seat (GdkDevice *device) static void remove_device (GdkX11DeviceManagerXI2 *device_manager, - gint device_id) + int device_id) { GdkDevice *device; @@ -893,7 +893,7 @@ handle_hierarchy_changed (GdkX11DeviceManagerXI2 *device_manager, Display *xdisplay; XIDeviceInfo *info; int ndevices; - gint i; + int i; display = device_manager->display; xdisplay = GDK_DISPLAY_XDISPLAY (display); @@ -1128,7 +1128,7 @@ handle_property_change (GdkX11DeviceManagerXI2 *device_manager, } static GdkCrossingMode -translate_crossing_mode (gint mode) +translate_crossing_mode (int mode) { switch (mode) { @@ -1149,7 +1149,7 @@ translate_crossing_mode (gint mode) } static GdkNotifyType -translate_notify_type (gint detail) +translate_notify_type (int detail) { switch (detail) { @@ -2025,7 +2025,7 @@ gdk_x11_device_manager_xi2_get_surface (GdkEventTranslator *translator, GdkDevice * _gdk_x11_device_manager_xi2_lookup (GdkX11DeviceManagerXI2 *device_manager_xi2, - gint device_id) + int device_id) { return g_hash_table_lookup (device_manager_xi2->id_table, GINT_TO_POINTER (device_id)); diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index ca337066b8..ab9a1ee949 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -111,7 +111,7 @@ static GdkEvent * gdk_x11_display_translate_event (GdkEventTranslator *translato static void gdk_internal_connection_watch (Display *display, XPointer arg, - gint fd, + int fd, gboolean opening, XPointer *watch_data); @@ -119,8 +119,8 @@ typedef struct _GdkEventTypeX11 GdkEventTypeX11; struct _GdkEventTypeX11 { - gint base; - gint n_events; + int base; + int n_events; }; /* Note that we never *directly* use WM_LOCALE_NAME, WM_PROTOCOLS, @@ -441,7 +441,7 @@ gdk_check_wm_desktop_changed (GdkSurface *surface) GdkDisplay *display = GDK_SURFACE_DISPLAY (surface); Atom type; - gint format; + int format; gulong nitems; gulong bytes_after; guchar *data; @@ -477,7 +477,7 @@ gdk_check_wm_state_changed (GdkSurface *surface) GdkX11Screen *screen = GDK_SURFACE_SCREEN (surface); Atom type; - gint format; + int format; gulong nitems; gulong bytes_after; guchar *data; @@ -542,7 +542,7 @@ gdk_check_edge_constraints_changed (GdkSurface *surface) GdkDisplay *display = GDK_SURFACE_DISPLAY (surface); Atom type; - gint format; + int format; gulong nitems; gulong bytes_after; guchar *data; @@ -923,8 +923,8 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator, !xevent->xconfigure.override_redirect && !GDK_SURFACE_DESTROYED (surface)) { - gint tx = 0; - gint ty = 0; + int tx = 0; + int ty = 0; Window child_window = 0; x = y = 0; @@ -1350,7 +1350,7 @@ set_sm_client_id (GdkDisplay *display, void gdk_display_setup_window_visual (GdkDisplay *display, - gint depth, + int depth, Visual *visual, Colormap colormap, gboolean rgba) @@ -1382,11 +1382,11 @@ gdk_x11_display_open (const gchar *display_name) Display *xdisplay; GdkDisplay *display; GdkX11Display *display_x11; - gint argc; + int argc; gchar *argv[1]; XClassHint *class_hint; - gint ignore; - gint maj, min; + int ignore; + int maj, min; char *cm_name; XInitThreads (); @@ -1549,8 +1549,8 @@ gdk_x11_display_open (const gchar *display_name) #ifdef HAVE_XKB { - gint xkb_major = XkbMajorVersion; - gint xkb_minor = XkbMinorVersion; + int xkb_major = XkbMajorVersion; + int xkb_minor = XkbMinorVersion; if (XkbLibraryVersion (&xkb_major, &xkb_minor)) { xkb_major = XkbMajorVersion; @@ -1665,7 +1665,7 @@ typedef struct _GdkInternalConnection GdkInternalConnection; struct _GdkInternalConnection { - gint fd; + int fd; GSource *source; Display *display; }; @@ -1723,7 +1723,7 @@ gdk_remove_connection_handler (GdkInternalConnection *connection) static void gdk_internal_connection_watch (Display *display, XPointer arg, - gint fd, + int fd, gboolean opening, XPointer *watch_data) { @@ -1779,7 +1779,7 @@ device_grab_update_callback (GdkDisplay *display, void _gdk_x11_display_update_grab_info (GdkDisplay *display, GdkDevice *device, - gint status) + int status) { if (status == GrabSuccess) _gdk_x11_roundtrip_async (display, device_grab_update_callback, device); @@ -2561,7 +2561,7 @@ gdk_x11_display_error_trap_push (GdkDisplay *display) g_slist_prepend (display_x11->error_traps, trap); } -static gint +static int gdk_x11_display_error_trap_pop_internal (GdkDisplay *display, gboolean need_code) { @@ -2649,7 +2649,7 @@ gdk_x11_display_error_trap_pop_internal (GdkDisplay *display, */ void gdk_x11_display_set_surface_scale (GdkDisplay *display, - gint scale) + int scale) { GdkX11Screen *x11_screen; gboolean need_reread_settings = FALSE; @@ -2694,7 +2694,7 @@ gdk_x11_display_set_surface_scale (GdkDisplay *display, * * Returns: X error code or 0 on success */ -gint +int gdk_x11_display_error_trap_pop (GdkDisplay *display) { g_return_val_if_fail (GDK_IS_X11_DISPLAY (display), Success); diff --git a/gdk/x11/gdkdisplay-x11.h b/gdk/x11/gdkdisplay-x11.h index 39e9219d30..c3719e9ac5 100644 --- a/gdk/x11/gdkdisplay-x11.h +++ b/gdk/x11/gdkdisplay-x11.h @@ -48,7 +48,7 @@ struct _GdkX11Display GSource *event_source; - gint grab_count; + int grab_count; /* Visual infos for creating Windows */ int window_depth; @@ -56,7 +56,7 @@ struct _GdkX11Display Colormap window_colormap; /* Keyboard related information */ - gint xkb_event_type; + int xkb_event_type; gboolean use_xkb; /* Whether we were able to turn on detectable-autorepeat using @@ -69,14 +69,14 @@ struct _GdkX11Display guint keymap_serial; gboolean have_xfixes; - gint xfixes_event_base; + int xfixes_event_base; gboolean have_xcomposite; gboolean have_randr12; gboolean have_randr13; gboolean have_randr15; - gint xrandr_event_base; + int xrandr_event_base; /* If the SECURITY extension is in place, whether this client holds * a trusted authorization and so is allowed to make various requests @@ -120,16 +120,16 @@ struct _GdkX11Display guint have_shapes : 1; guint have_input_shapes : 1; - gint shape_event_base; + int shape_event_base; GSList *error_traps; - gint wm_moveresize_button; + int wm_moveresize_button; /* GLX information */ - gint glx_version; - gint glx_error_base; - gint glx_event_base; + int glx_version; + int glx_error_base; + int glx_event_base; /* Translation between X server time and system-local monotonic time */ gint64 server_time_query_time; @@ -152,8 +152,8 @@ struct _GdkX11Display guint has_async_glx_swap_buffers : 1; #ifdef HAVE_XDAMAGE - gint damage_event_base; - gint damage_error_base; + int damage_event_base; + int damage_error_base; guint have_damage; #endif }; diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c index 5a08c3af64..5e8e03fccb 100644 --- a/gdk/x11/gdkdrag-x11.c +++ b/gdk/x11/gdkdrag-x11.c @@ -78,7 +78,7 @@ typedef enum typedef struct { guint32 xid; - gint x, y, width, height; + int x, y, width, height; gboolean mapped; gboolean shape_selected; gboolean shape_valid; @@ -90,7 +90,7 @@ struct _GdkSurfaceCache { GHashTable *child_hash; guint old_event_mask; GdkDisplay *display; - gint ref_count; + int ref_count; }; @@ -100,8 +100,8 @@ struct _GdkX11Drag GdkDragProtocol protocol; - gint start_x; /* Where the drag started */ - gint start_y; + int start_x; /* Where the drag started */ + int start_y; guint16 last_x; /* Coordinates from last event */ guint16 last_y; gulong timestamp; /* Timestamp we claimed the DND selection with */ @@ -118,8 +118,8 @@ struct _GdkX11Drag GdkDragAction actions; GdkDragAction current_action; - gint hot_x; - gint hot_y; + int hot_x; + int hot_y; Window dest_xid; /* The last window we looked up */ Window proxy_xid; /* The proxy window for dest_xid (or dest_xid if no proxying happens) */ @@ -136,8 +136,8 @@ struct _GdkX11DragClass }; typedef struct { - gint keysym; - gint modifiers; + int keysym; + int modifiers; } GrabKey; static GrabKey grab_keys[] = { @@ -186,14 +186,14 @@ gdk_x11_drag_init (GdkX11Drag *drag) static void gdk_x11_drag_finalize (GObject *object); static Window gdk_x11_drag_find_surface (GdkDrag *drag, GdkSurface *drag_surface, - gint x_root, - gint y_root, + int x_root, + int y_root, GdkDragProtocol *protocol); static gboolean gdk_x11_drag_drag_motion (GdkDrag *drag, Window proxy_xid, GdkDragProtocol protocol, - gint x_root, - gint y_root, + int x_root, + int y_root, GdkDragAction suggested_action, GdkDragAction possible_actions, guint32 time); @@ -201,8 +201,8 @@ static void gdk_x11_drag_drop (GdkDrag *drag, guint32 time_); static GdkSurface * gdk_x11_drag_get_drag_surface (GdkDrag *drag); static void gdk_x11_drag_set_hotspot (GdkDrag *drag, - gint hot_x, - gint hot_y); + int hot_x, + int hot_y); static void gdk_x11_drag_drop_done (GdkDrag *drag, gboolean success); static void gdk_x11_drag_set_cursor (GdkDrag *drag, @@ -328,10 +328,10 @@ free_cache_child (GdkCacheChild *child, static void gdk_surface_cache_add (GdkSurfaceCache *cache, guint32 xid, - gint x, - gint y, - gint width, - gint height, + int x, + int y, + int width, + int height, gboolean mapped) { GdkCacheChild *child = g_new (GdkCacheChild, 1); @@ -531,7 +531,7 @@ gdk_surface_cache_new (GdkDisplay *display) GList *toplevel_windows, *list; GdkSurface *surface; GdkX11Surface *impl; - gint x, y, width, height; + int x, y, width, height; toplevel_windows = gdk_x11_display_get_toplevel_windows (display); for (list = toplevel_windows; list; list = list->next) @@ -649,8 +649,8 @@ gdk_surface_cache_get (GdkDisplay *display) static gboolean is_pointer_within_shape (GdkDisplay *display, GdkCacheChild *child, - gint x_pos, - gint y_pos) + int x_pos, + int y_pos) { if (!child->shape_selected) { @@ -696,8 +696,8 @@ static Window get_client_window_at_coords_recurse (GdkDisplay *display, Window win, gboolean is_toplevel, - gint x, - gint y) + int x, + int y) { GdkChildInfoX11 *children; unsigned int nchildren; @@ -749,8 +749,8 @@ get_client_window_at_coords_recurse (GdkDisplay *display, static Window get_client_window_at_coords (GdkSurfaceCache *cache, Window ignore, - gint x_root, - gint y_root) + int x_root, + int y_root) { GList *tmp_list; Window retval = None; @@ -815,14 +815,14 @@ static struct { { "XdndActionPrivate", GDK_ACTION_COPY }, }; -static const gint xdnd_n_actions = G_N_ELEMENTS (xdnd_actions_table); +static const int xdnd_n_actions = G_N_ELEMENTS (xdnd_actions_table); static GdkDragAction xdnd_action_from_atom (GdkDisplay *display, Atom xatom) { const char *name; - gint i; + int i; if (xatom == None) return 0; @@ -840,7 +840,7 @@ static Atom xdnd_action_to_atom (GdkDisplay *display, GdkDragAction action) { - gint i; + int i; for (i = 0; i < xdnd_n_actions; i++) if (action == xdnd_actions_table[i].action) @@ -938,8 +938,8 @@ xdnd_set_actions (GdkX11Drag *drag_x11) { GdkDrag *drag = GDK_DRAG (drag_x11); Atom *atomlist; - gint i; - gint n_atoms; + int i; + int n_atoms; guint actions; GdkDisplay *display = gdk_drag_get_display (drag); @@ -1143,8 +1143,8 @@ xdnd_send_drop (GdkX11Drag *drag_x11, static void xdnd_send_motion (GdkX11Drag *drag_x11, - gint x_root, - gint y_root, + int x_root, + int y_root, GdkDragAction action, guint32 time) { @@ -1341,8 +1341,8 @@ drag_find_window_cache (GdkX11Drag *drag_x11, static Window gdk_x11_drag_find_surface (GdkDrag *drag, GdkSurface *drag_surface, - gint x_root, - gint y_root, + int x_root, + int y_root, GdkDragProtocol *protocol) { GdkX11Screen *screen_x11; @@ -1406,8 +1406,8 @@ static gboolean gdk_x11_drag_drag_motion (GdkDrag *drag, Window proxy_xid, GdkDragProtocol protocol, - gint x_root, - gint y_root, + int x_root, + int y_root, GdkDragAction suggested_action, GdkDragAction possible_actions, guint32 time) @@ -1602,8 +1602,8 @@ gdk_x11_drag_get_drag_surface (GdkDrag *drag) static void gdk_x11_drag_set_hotspot (GdkDrag *drag, - gint hot_x, - gint hot_y) + int hot_x, + int hot_y) { GdkX11Drag *x11_drag = GDK_X11_DRAG (drag); @@ -1874,7 +1874,7 @@ drag_grab (GdkDrag *drag) GdkDisplay *display; Window root; GdkSeat *seat; - gint keycode, i; + int keycode, i; GdkCursor *cursor; if (!x11_drag->ipc_surface) @@ -1900,11 +1900,11 @@ drag_grab (GdkDrag *drag) for (i = 0; i < G_N_ELEMENTS (grab_keys); ++i) { - gint deviceid = gdk_x11_device_get_id (gdk_seat_get_keyboard (seat)); + int deviceid = gdk_x11_device_get_id (gdk_seat_get_keyboard (seat)); unsigned char mask[XIMaskLen(XI_LASTEVENT)]; XIGrabModifiers mods; XIEventMask evmask; - gint num_mods; + int num_mods; keycode = XKeysymToKeycode (GDK_DISPLAY_XDISPLAY (display), grab_keys[i].keysym); @@ -1946,7 +1946,7 @@ drag_ungrab (GdkDrag *drag) GdkDisplay *display; GdkDevice *keyboard; Window root; - gint keycode, i; + int keycode, i; if (!x11_drag->grab_seat) return; @@ -1961,7 +1961,7 @@ drag_ungrab (GdkDrag *drag) for (i = 0; i < G_N_ELEMENTS (grab_keys); ++i) { XIGrabModifiers mods; - gint num_mods; + int num_mods; keycode = XKeysymToKeycode (GDK_DISPLAY_XDISPLAY (display), grab_keys[i].keysym); @@ -2106,7 +2106,7 @@ gdk_x11_drag_drop_performed (GdkDrag *drag, static void gdk_drag_get_current_actions (GdkModifierType state, - gint button, + int button, GdkDragAction actions, GdkDragAction *suggested_action, GdkDragAction *possible_actions) @@ -2208,7 +2208,7 @@ gdk_dnd_handle_key_event (GdkDrag *drag, GdkX11Drag *x11_drag = GDK_X11_DRAG (drag); GdkModifierType state; GdkDevice *pointer; - gint dx, dy; + int dx, dy; dx = dy = 0; state = gdk_event_get_modifier_state (event); diff --git a/gdk/x11/gdkdrop-x11.c b/gdk/x11/gdkdrop-x11.c index 68535043c2..628ac33d0e 100644 --- a/gdk/x11/gdkdrop-x11.c +++ b/gdk/x11/gdkdrop-x11.c @@ -280,14 +280,14 @@ static struct { { "XdndActionPrivate", GDK_ACTION_COPY }, }; -static const gint xdnd_n_actions = G_N_ELEMENTS (xdnd_actions_table); +static const int xdnd_n_actions = G_N_ELEMENTS (xdnd_actions_table); static GdkDragAction xdnd_action_from_atom (GdkDisplay *display, Atom xatom) { const char *name; - gint i; + int i; if (xatom == None) return 0; @@ -305,7 +305,7 @@ static Atom xdnd_action_to_atom (GdkDisplay *display, GdkDragAction action) { - gint i; + int i; for (i = 0; i < xdnd_n_actions; i++) if (action == xdnd_actions_table[i].action) @@ -343,7 +343,7 @@ gdk_x11_drop_read_actions (GdkDrop *drop) gulong nitems, after; guchar *data; Atom *atoms; - gint i; + int i; drag = gdk_drop_get_drag (drop); @@ -439,7 +439,7 @@ xdnd_enter_filter (GdkSurface *surface, GdkX11Drop *drop_x11; GdkDrag *drag; GdkSeat *seat; - gint i; + int i; Atom type; int format; gulong nitems, after; @@ -449,7 +449,7 @@ xdnd_enter_filter (GdkSurface *surface, GPtrArray *formats; Window source_window; gboolean get_types; - gint version; + int version; source_window = xevent->xclient.data.l[0]; get_types = ((xevent->xclient.data.l[1] & 1) != 0); diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c index ad0d6e05ee..a5d17e232c 100644 --- a/gdk/x11/gdkeventsource.c +++ b/gdk/x11/gdkeventsource.c @@ -27,7 +27,7 @@ static gboolean gdk_event_source_prepare (GSource *source, - gint *timeout); + int *timeout); static gboolean gdk_event_source_check (GSource *source); static gboolean gdk_event_source_dispatch (GSource *source, GSourceFunc callback, @@ -340,7 +340,7 @@ gdk_check_xpending (GdkDisplay *display) static gboolean gdk_event_source_prepare (GSource *source, - gint *timeout) + int *timeout) { GdkDisplay *display = ((GdkEventSource*) source)->display; gboolean retval; @@ -488,7 +488,7 @@ gdk_x11_event_source_select_events (GdkEventSource *source, { unsigned int xmask = extra_x_mask; GList *list; - gint i; + int i; list = source->translators; diff --git a/gdk/x11/gdkglcontext-x11.c b/gdk/x11/gdkglcontext-x11.c index 0bd475908f..d3f6d7df42 100644 --- a/gdk/x11/gdkglcontext-x11.c +++ b/gdk/x11/gdkglcontext-x11.c @@ -1278,7 +1278,7 @@ get_cached_gl_visuals (GdkDisplay *display, int *system, int *rgba) { gboolean found; Atom type_return; - gint format_return; + int format_return; gulong nitems_return; gulong bytes_after_return; guchar *data = NULL; @@ -1521,8 +1521,8 @@ gdk_x11_display_make_gl_context_current (GdkDisplay *display, */ gboolean gdk_x11_display_get_glx_version (GdkDisplay *display, - gint *major, - gint *minor) + int *major, + int *minor) { g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE); diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c index 11ee46a4d2..dc4cd45e3c 100644 --- a/gdk/x11/gdkkeys-x11.c +++ b/gdk/x11/gdkkeys-x11.c @@ -63,10 +63,10 @@ struct _GdkX11Keymap { GdkKeymap parent_instance; - gint min_keycode; - gint max_keycode; + int min_keycode; + int max_keycode; KeySym* keymap; - gint keysyms_per_keycode; + int keysyms_per_keycode; XModifierKeymap* mod_keymap; guint lock_keysym; GdkModifierType group_switch_mask; @@ -176,7 +176,7 @@ update_modmap (Display *display, { NULL, 0, 0 } }; - gint i, j, k; + int i, j, k; if (!vmods[0].atom) for (i = 0; vmods[i].name; i++) @@ -254,17 +254,17 @@ get_xkb (GdkX11Keymap *keymap_x11) * otherwise we lose a whole group of keys */ #define KEYSYM_INDEX(keymap_impl, group, level) \ - (2 * ((group) % (gint)((keymap_impl->keysyms_per_keycode + 1) / 2)) + (level)) + (2 * ((group) % (int)((keymap_impl->keysyms_per_keycode + 1) / 2)) + (level)) #define KEYSYM_IS_KEYPAD(s) (((s) >= 0xff80 && (s) <= 0xffbd) || \ ((s) >= 0x11000000 && (s) <= 0x1100ffff)) -static gint +static int get_symbol (const KeySym *syms, GdkX11Keymap *keymap_x11, - gint group, - gint level) + int group, + int level) { - gint index; + int index; index = KEYSYM_INDEX(keymap_x11, group, level); if (index >= keymap_x11->keysyms_per_keycode) @@ -276,11 +276,11 @@ get_symbol (const KeySym *syms, static void set_symbol (KeySym *syms, GdkX11Keymap *keymap_x11, - gint group, - gint level, + int group, + int level, KeySym sym) { - gint index; + int index; index = KEYSYM_INDEX(keymap_x11, group, level); if (index >= keymap_x11->keysyms_per_keycode) @@ -302,9 +302,9 @@ update_keymaps (GdkX11Keymap *keymap_x11) if (keymap_x11->keymap == NULL || keymap_x11->current_serial != display_x11->keymap_serial) { - gint i; - gint map_size; - gint keycode; + int i; + int map_size; + int keycode; keymap_x11->current_serial = display_x11->keymap_serial; @@ -374,8 +374,8 @@ update_keymaps (GdkX11Keymap *keymap_x11) for (i = 0; i < map_size; i++) { /* Get the key code at this point in the map. */ - gint code = keymap_x11->mod_keymap->modifiermap[i]; - gint j; + int code = keymap_x11->mod_keymap->modifiermap[i]; + int j; KeySym *syms; guint mask; @@ -472,15 +472,15 @@ get_keymap (GdkX11Keymap *keymap_x11) #ifdef HAVE_XKB static PangoDirection get_direction (XkbDescRec *xkb, - gint group) + int group) { - gint code; + int code; - gint rtl_minus_ltr = 0; /* total number of RTL keysyms minus LTR ones */ + int rtl_minus_ltr = 0; /* total number of RTL keysyms minus LTR ones */ for (code = xkb->min_key_code; code <= xkb->max_key_code; code++) { - gint level = 0; + int level = 0; KeySym sym = XkbKeySymEntry (xkb, code, level, group); PangoDirection dir = gdk_unichar_direction (gdk_keyval_to_unicode (sym)); @@ -511,7 +511,7 @@ get_direction (XkbDescRec *xkb, static PangoDirection get_direction_from_cache (GdkX11Keymap *keymap_x11, XkbDescPtr xkb, - gint group) + int group) { Atom group_atom = xkb->names->groups[group]; @@ -519,7 +519,7 @@ get_direction_from_cache (GdkX11Keymap *keymap_x11, DirectionCacheEntry *cache = keymap_x11->group_direction_cache; PangoDirection direction = PANGO_DIRECTION_NEUTRAL; - gint i; + int i; if (keymap_x11->have_direction) { @@ -550,7 +550,7 @@ get_direction_from_cache (GdkX11Keymap *keymap_x11, /* insert in cache */ if (!cache_hit) { - gint oldest = 0; + int oldest = 0; direction = get_direction (xkb, group); @@ -583,7 +583,7 @@ get_num_groups (GdkKeymap *keymap, static gboolean update_direction (GdkX11Keymap *keymap_x11, GdkDevice *keyboard, - gint group) + int group) { XkbDescPtr xkb = get_xkb (keymap_x11); Atom group_atom; @@ -615,8 +615,8 @@ update_direction (GdkX11Keymap *keymap_x11, static gboolean update_lock_state (GdkX11Keymap *keymap_x11, GdkDevice *keyboard, - gint locked_mods, - gint effective_mods) + int locked_mods, + int effective_mods) { XkbDescPtr xkb G_GNUC_UNUSED; gboolean have_lock_state; @@ -832,17 +832,17 @@ gdk_x11_keymap_get_entries_for_keyval (GdkKeymap *keymap, /* See sec 15.3.4 in XKB docs */ XkbDescRec *xkb = get_xkb (keymap_x11); - gint keycode; + int keycode; keycode = keymap_x11->min_keycode; while (keycode <= keymap_x11->max_keycode) { - gint max_shift_levels = XkbKeyGroupsWidth (xkb, keycode); /* "key width" */ - gint group = 0; - gint level = 0; - gint total_syms = XkbKeyNumSyms (xkb, keycode); - gint i = 0; + int max_shift_levels = XkbKeyGroupsWidth (xkb, keycode); /* "key width" */ + int group = 0; + int level = 0; + int total_syms = XkbKeyNumSyms (xkb, keycode); + int i = 0; KeySym *entry; /* entry is an array with all syms for group 0, all @@ -888,13 +888,13 @@ gdk_x11_keymap_get_entries_for_keyval (GdkKeymap *keymap, #endif { const KeySym *map = get_keymap (keymap_x11); - gint keycode; + int keycode; keycode = keymap_x11->min_keycode; while (keycode <= keymap_x11->max_keycode) { const KeySym *syms = map + (keycode - keymap_x11->min_keycode) * keymap_x11->keysyms_per_keycode; - gint i = 0; + int i = 0; while (i < keymap_x11->keysyms_per_keycode) { @@ -927,7 +927,7 @@ gdk_x11_keymap_get_entries_for_keycode (GdkKeymap *keymap, guint hardware_keycode, GdkKeymapKey **keys, guint **keyvals, - gint *n_entries) + int *n_entries) { GdkX11Keymap *keymap_x11 = GDK_X11_KEYMAP (keymap); GArray *key_array; @@ -963,11 +963,11 @@ gdk_x11_keymap_get_entries_for_keycode (GdkKeymap *keymap, /* See sec 15.3.4 in XKB docs */ XkbDescRec *xkb = get_xkb (keymap_x11); - gint max_shift_levels; - gint group = 0; - gint level = 0; - gint total_syms; - gint i = 0; + int max_shift_levels; + int group = 0; + int level = 0; + int total_syms; + int i = 0; KeySym *entry; max_shift_levels = XkbKeyGroupsWidth (xkb, hardware_keycode); /* "key width" */ @@ -1014,7 +1014,7 @@ gdk_x11_keymap_get_entries_for_keycode (GdkKeymap *keymap, { const KeySym *map = get_keymap (keymap_x11); const KeySym *syms; - gint i = 0; + int i = 0; syms = map + (hardware_keycode - keymap_x11->min_keycode) * keymap_x11->keysyms_per_keycode; @@ -1230,10 +1230,10 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb, static guint translate_keysym (GdkX11Keymap *keymap_x11, guint hardware_keycode, - gint group, + int group, GdkModifierType state, - gint *effective_group, - gint *effective_level) + int *effective_group, + int *effective_level) { const KeySym *map = get_keymap (keymap_x11); const KeySym *syms = map + (hardware_keycode - keymap_x11->min_keycode) * keymap_x11->keysyms_per_keycode; @@ -1241,7 +1241,7 @@ translate_keysym (GdkX11Keymap *keymap_x11, #define SYM(k,g,l) get_symbol (syms, k,g,l) GdkModifierType shift_modifiers; - gint shift_level; + int shift_level; guint tmp_keyval; shift_modifiers = GDK_SHIFT_MASK; @@ -1299,10 +1299,10 @@ static gboolean gdk_x11_keymap_translate_keyboard_state (GdkKeymap *keymap, guint hardware_keycode, GdkModifierType state, - gint group, + int group, guint *keyval, - gint *effective_group, - gint *level, + int *effective_group, + int *level, GdkModifierType *consumed_modifiers) { GdkX11Keymap *keymap_x11 = GDK_X11_KEYMAP (keymap); @@ -1406,7 +1406,7 @@ gdk_x11_keymap_translate_keyboard_state (GdkKeymap *keymap, * * Returns: the index of the active keyboard group for the event */ -gint +int gdk_x11_keymap_get_group_for_state (GdkKeymap *keymap, guint state) { @@ -1478,7 +1478,7 @@ gdk_x11_keymap_key_is_modifier (GdkKeymap *keymap, guint keycode) { GdkX11Keymap *keymap_x11 = GDK_X11_KEYMAP (keymap); - gint i; + int i; g_return_val_if_fail (GDK_IS_X11_KEYMAP (keymap), FALSE); diff --git a/gdk/x11/gdkkeys-x11.h b/gdk/x11/gdkkeys-x11.h index e56be6edca..db53da0dcc 100644 --- a/gdk/x11/gdkkeys-x11.h +++ b/gdk/x11/gdkkeys-x11.h @@ -39,7 +39,7 @@ typedef struct _GdkX11KeymapClass GdkX11KeymapClass; GType gdk_x11_keymap_get_type (void); -gint gdk_x11_keymap_get_group_for_state (GdkKeymap *keymap, +int gdk_x11_keymap_get_group_for_state (GdkKeymap *keymap, guint state); gboolean gdk_x11_keymap_key_is_modifier (GdkKeymap *keymap, diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index 62cbf7b654..4208ab881e 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -101,7 +101,7 @@ _gdk_x11_surfaceing_init (void) } GdkGrabStatus -_gdk_x11_convert_grab_status (gint status) +_gdk_x11_convert_grab_status (int status) { switch (status) { @@ -323,7 +323,7 @@ _gdk_x11_error_handler_pop (void) } } -gint +int _gdk_x11_display_send_xevent (GdkDisplay *display, Window window, gboolean propagate, @@ -348,15 +348,15 @@ _gdk_x11_display_send_xevent (GdkDisplay *display, void _gdk_x11_region_get_xrectangles (const cairo_region_t *region, - gint x_offset, - gint y_offset, - gint scale, + int x_offset, + int y_offset, + int scale, XRectangle **rects, - gint *n_rects) + int *n_rects) { XRectangle *rectangles; cairo_rectangle_int_t box; - gint i, n; + int i, n; n = cairo_region_num_rectangles (region); rectangles = g_new (XRectangle, n); diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h index 23540383cf..eca7e4fcbd 100644 --- a/gdk/x11/gdkprivate-x11.h +++ b/gdk/x11/gdkprivate-x11.h @@ -56,7 +56,7 @@ void _gdk_x11_error_handler_push (void); void _gdk_x11_error_handler_pop (void); void gdk_display_setup_window_visual (GdkDisplay *display, - gint depth, + int depth, Visual *visual, Colormap colormap, gboolean rgba); @@ -70,23 +70,23 @@ void _gdk_x11_display_add_window (GdkDisplay *display, void _gdk_x11_display_remove_window (GdkDisplay *display, XID xid); -gint _gdk_x11_display_send_xevent (GdkDisplay *display, - Window window, - gboolean propagate, - glong event_mask, - XEvent *event_send); +int _gdk_x11_display_send_xevent (GdkDisplay *display, + Window window, + gboolean propagate, + glong event_mask, + XEvent *event_send); cairo_region_t* _gdk_x11_xwindow_get_shape (Display *xdisplay, Window window, - gint scale, - gint shape_type); + int scale, + int shape_type); void _gdk_x11_region_get_xrectangles (const cairo_region_t *region, - gint x_offset, - gint y_offset, - gint scale, + int x_offset, + int y_offset, + int scale, XRectangle **rects, - gint *n_rects); + int *n_rects); gboolean _gdk_x11_moveresize_handle_event (const XEvent *event); gboolean _gdk_x11_moveresize_configure_done (GdkDisplay *display, @@ -114,7 +114,7 @@ gboolean _gdk_x11_display_is_root_window (GdkDisplay *display, void _gdk_x11_display_update_grab_info (GdkDisplay *display, GdkDevice *device, - gint status); + int status); void _gdk_x11_display_update_grab_info_ungrab (GdkDisplay *display, GdkDevice *device, guint32 time, @@ -124,11 +124,11 @@ void _gdk_x11_display_queue_events (GdkDisplay *display); GdkAppLaunchContext *_gdk_x11_display_get_app_launch_context (GdkDisplay *display); -gint _gdk_x11_display_text_property_to_utf8_list (GdkDisplay *display, +int _gdk_x11_display_text_property_to_utf8_list (GdkDisplay *display, const char *encoding, - gint format, + int format, const guchar *text, - gint length, + int length, gchar ***list); char * gdk_x11_utf8_to_string_target (const char *utf8_str, gboolean return_latin1); @@ -139,16 +139,16 @@ GdkX11DeviceManagerXI2 *_gdk_x11_device_manager_new (GdkDisplay *display); guchar * _gdk_x11_device_xi2_translate_event_mask (GdkX11DeviceManagerXI2 *device_manager_xi2, GdkEventMask event_mask, - gint *len); + int *len); guint _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state, XIButtonState *buttons_state, XIGroupState *group_state); -gint _gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device); +int _gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device); void _gdk_device_xi2_unset_scroll_valuators (GdkX11DeviceXI2 *device); GdkDevice * _gdk_x11_device_manager_xi2_lookup (GdkX11DeviceManagerXI2 *device_manager_xi2, - gint device_id); + int device_id); void _gdk_x11_device_xi2_add_scroll_valuator (GdkX11DeviceXI2 *device, guint n_valuator, GdkScrollDirection direction, @@ -161,11 +161,11 @@ gboolean _gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device, void _gdk_device_xi2_reset_scroll_valuators (GdkX11DeviceXI2 *device); gdouble gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device, - gint n_axis); + int n_axis); void gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device, gdouble *axes, - gint n_axes); + int n_axes); gboolean _gdk_x11_display_supports_cursor_alpha (GdkDisplay *display); gboolean _gdk_x11_display_supports_cursor_color (GdkDisplay *display); @@ -187,7 +187,7 @@ GList * gdk_x11_display_get_toplevel_windows (GdkDisplay *display); void _gdk_x11_precache_atoms (GdkDisplay *display, const gchar * const *atom_names, - gint n_atoms); + int n_atoms); Atom _gdk_x11_get_xatom_for_display_printf (GdkDisplay *display, const gchar *format, @@ -232,10 +232,10 @@ GdkDrag * _gdk_x11_surface_drag_begin (GdkSurface *window, double dy); void gdk_x11_surface_get_root_coords (GdkSurface *surface, - gint x, - gint y, - gint *root_x, - gint *root_y); + int x, + int y, + int *root_x, + int *root_y); void gdk_x11_surface_show (GdkSurface *surface, gboolean already_mapped); @@ -244,14 +244,14 @@ void gdk_x11_surface_set_opacity (GdkSurface *surface, double opacity); gboolean gdk_x11_surface_supports_edge_constraints (GdkSurface *surface); -GdkGrabStatus _gdk_x11_convert_grab_status (gint status); +GdkGrabStatus _gdk_x11_convert_grab_status (int status); cairo_surface_t * _gdk_x11_display_create_bitmap_surface (GdkDisplay *display, int width, int height); -extern const gint _gdk_x11_event_mask_table[]; -extern const gint _gdk_x11_event_mask_table_size; +extern const int _gdk_x11_event_mask_table[]; +extern const int _gdk_x11_event_mask_table_size; #define GDK_SCREEN_DISPLAY(screen) (GDK_X11_SCREEN (screen)->display) #define GDK_SCREEN_XROOTWIN(screen) (GDK_X11_SCREEN (screen)->xroot_window) diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c index 4755d895a5..fd6ddca2fb 100644 --- a/gdk/x11/gdkproperty-x11.c +++ b/gdk/x11/gdkproperty-x11.c @@ -103,12 +103,12 @@ gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display, void _gdk_x11_precache_atoms (GdkDisplay *display, const gchar * const *atom_names, - gint n_atoms) + int n_atoms) { Atom *xatoms; const char **xatom_names; - gint n_xatoms; - gint i; + int n_xatoms; + int i; xatoms = g_new (Atom, n_atoms); xatom_names = g_new (const char *, n_atoms); diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c index 6f1aa1f9c8..8b875dfc58 100644 --- a/gdk/x11/gdkscreen-x11.c +++ b/gdk/x11/gdkscreen-x11.c @@ -106,7 +106,7 @@ static void gdk_x11_screen_finalize (GObject *object) { GdkX11Screen *x11_screen = GDK_X11_SCREEN (object); - gint i; + int i; /* Visual Part */ for (i = 0; i < x11_screen->nvisuals; i++) @@ -131,7 +131,7 @@ gdk_x11_screen_finalize (GObject *object) */ XID gdk_x11_screen_get_monitor_output (GdkX11Screen *x11_screen, - gint monitor_num) + int monitor_num) { GdkX11Display *x11_display = GDK_X11_DISPLAY (x11_screen->display); GdkX11Monitor *monitor; @@ -874,7 +874,7 @@ init_multihead (GdkX11Screen *screen) GdkX11Screen * _gdk_x11_screen_new (GdkDisplay *display, - gint screen_number, + int screen_number, gboolean setup_display) { GdkX11Screen *x11_screen; @@ -913,7 +913,7 @@ _gdk_x11_screen_new (GdkDisplay *display, void _gdk_x11_screen_set_surface_scale (GdkX11Screen *x11_screen, - gint scale) + int scale) { GdkX11Display *x11_display = GDK_X11_DISPLAY (x11_screen->display); GList *toplevels, *l; @@ -995,17 +995,17 @@ _gdk_x11_screen_size_changed (GdkX11Screen *screen, void _gdk_x11_screen_get_edge_monitors (GdkX11Screen *x11_screen, - gint *top, - gint *bottom, - gint *left, - gint *right) + int *top, + int *bottom, + int *left, + int *right) { #ifdef HAVE_XFREE_XINERAMA - gint top_most_pos = HeightOfScreen (x11_screen->xscreen); - gint left_most_pos = WidthOfScreen (x11_screen->xscreen); - gint bottom_most_pos = 0; - gint right_most_pos = 0; - gint i; + int top_most_pos = HeightOfScreen (x11_screen->xscreen); + int left_most_pos = WidthOfScreen (x11_screen->xscreen); + int bottom_most_pos = 0; + int right_most_pos = 0; + int i; XineramaScreenInfo *x_monitors; int x_n_monitors; #endif @@ -1102,7 +1102,7 @@ get_net_supporting_wm_check (GdkX11Screen *screen, { GdkDisplay *display; Atom type; - gint format; + int format; gulong n_items; gulong bytes_after; guchar *data; @@ -1135,7 +1135,7 @@ fetch_net_wm_check_window (GdkX11Screen *x11_screen) GdkDisplay *display; Window window; GTimeVal tv; - gint error; + int error; display = x11_screen->display; @@ -1234,7 +1234,7 @@ gdk_x11_screen_supports_net_wm_hint (GdkX11Screen *x11_screen, * refetch it. */ Atom type; - gint format; + int format; gulong bytes_after; x11_screen->need_refetch_net_supported = FALSE; @@ -1302,7 +1302,7 @@ gdk_x11_screen_get_window_manager_name (GdkX11Screen *x11_screen) if (x11_screen->wmspec_check_window != None) { Atom type; - gint format; + int format; gulong n_items; gulong bytes_after; gchar *name; @@ -1361,7 +1361,7 @@ get_netwm_cardinal_property (GdkX11Screen *x11_screen, { guint32 prop = 0; Atom type; - gint format; + int format; gulong nitems; gulong bytes_after; guchar *data; diff --git a/gdk/x11/gdkscreen-x11.h b/gdk/x11/gdkscreen-x11.h index 61a4ef1947..0d7bead87e 100644 --- a/gdk/x11/gdkscreen-x11.h +++ b/gdk/x11/gdkscreen-x11.h @@ -37,17 +37,17 @@ struct _GdkX11Screen Display *xdisplay; Screen *xscreen; Window xroot_window; - gint screen_num; + int screen_num; - gint surface_scale; + int surface_scale; gboolean fixed_surface_scale; /* Xft resources for the display, used for default values for * the Xft/ XSETTINGS */ - gint xft_hintstyle; - gint xft_rgba; - gint xft_dpi; + int xft_hintstyle; + int xft_rgba; + int xft_dpi; /* Window manager */ long last_wmspec_check_time; @@ -72,10 +72,10 @@ struct _GdkX11Screen guint xft_hinting : 1; /* Visual Part */ - gint nvisuals; + int nvisuals; GdkX11Visual **visuals; GdkX11Visual *system_visual; - gint available_depths[7]; + int available_depths[7]; GdkVisualType available_types[6]; gint16 navailable_depths; gint16 navailable_types; @@ -94,7 +94,7 @@ struct _GdkX11ScreenClass GType _gdk_x11_screen_get_type (void); GdkX11Screen *_gdk_x11_screen_new (GdkDisplay *display, - gint screen_number, + int screen_number, gboolean setup_display); void _gdk_x11_screen_update_visuals_for_gl (GdkX11Screen *screen); @@ -102,10 +102,10 @@ void _gdk_x11_screen_window_manager_changed (GdkX11Screen *screen); void _gdk_x11_screen_size_changed (GdkX11Screen *screen, const XEvent *event); void _gdk_x11_screen_get_edge_monitors (GdkX11Screen *screen, - gint *top, - gint *bottom, - gint *left, - gint *right); + int *top, + int *bottom, + int *left, + int *right); void _gdk_x11_screen_set_surface_scale (GdkX11Screen *x11_screen, int scale); gboolean _gdk_x11_screen_get_monitor_work_area (GdkX11Screen *screen, diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c index 544d0875dc..83cdd8c37a 100644 --- a/gdk/x11/gdkselection-x11.c +++ b/gdk/x11/gdkselection-x11.c @@ -53,17 +53,17 @@ * Returns: the number of strings stored in list, or 0, * if the conversion failed */ -gint +int gdk_x11_display_text_property_to_text_list (GdkDisplay *display, const char *encoding, - gint format, + int format, const guchar *text, - gint length, + int length, gchar ***list) { XTextProperty property; - gint count = 0; - gint res; + int count = 0; + int res; gchar **local_list; g_return_val_if_fail (GDK_IS_DISPLAY (display), 0); @@ -108,15 +108,15 @@ gdk_x11_free_text_list (gchar **list) XFreeStringList (list); } -static gint +static int make_list (const gchar *text, - gint length, + int length, gboolean latin1, gchar ***list) { GSList *strings = NULL; - gint n_strings = 0; - gint i; + int n_strings = 0; + int i; const gchar *p = text; const gchar *q; GSList *tmp_list; @@ -186,12 +186,12 @@ make_list (const gchar *text, return n_strings; } -gint +int _gdk_x11_display_text_property_to_utf8_list (GdkDisplay *display, const char *encoding, - gint format, + int format, const guchar *text, - gint length, + int length, gchar ***list) { if (g_str_equal (encoding, "STRING")) @@ -205,11 +205,11 @@ _gdk_x11_display_text_property_to_utf8_list (GdkDisplay *display, else { gchar **local_list; - gint local_count; - gint i; + int local_count; + int i; const gchar *charset = NULL; gboolean need_conversion = !g_get_charset (&charset); - gint count = 0; + int count = 0; GError *error = NULL; /* Probably COMPOUND text, we fall back to Xlib routines @@ -285,15 +285,15 @@ _gdk_x11_display_text_property_to_utf8_list (GdkDisplay *display, * * Returns: 0 upon success, non-zero upon failure */ -gint +int gdk_x11_display_string_to_compound_text (GdkDisplay *display, const char *str, const char **encoding, - gint *format, + int *format, guchar **ctext, - gint *length) + int *length) { - gint res; + int res; XTextProperty property; g_return_val_if_fail (GDK_IS_DISPLAY (display), 0); @@ -343,9 +343,9 @@ gboolean gdk_x11_display_utf8_to_compound_text (GdkDisplay *display, const char *str, const char **encoding, - gint *format, + int *format, guchar **ctext, - gint *length) + int *length) { gboolean need_conversion; const gchar *charset; diff --git a/gdk/x11/gdkselectioninputstream-x11.c b/gdk/x11/gdkselectioninputstream-x11.c index 99778c236d..6e10867abd 100644 --- a/gdk/x11/gdkselectioninputstream-x11.c +++ b/gdk/x11/gdkselectioninputstream-x11.c @@ -325,12 +325,12 @@ get_selection_property (Display *display, Window owner, Atom property, Atom *ret_type, - gint *ret_format) + int *ret_format) { gulong nitems; gulong nbytes; Atom prop_type; - gint prop_format; + int prop_format; guchar *data = NULL; if (XGetWindowProperty (display, owner, property, @@ -390,7 +390,7 @@ gdk_x11_selection_input_stream_xevent (GdkDisplay *display, Window xwindow; GBytes *bytes; Atom type; - gint format; + int format; xdisplay = gdk_x11_display_get_xdisplay (priv->display); xwindow = GDK_X11_DISPLAY (priv->display)->leader_window; diff --git a/gdk/x11/gdkselectionoutputstream-x11.c b/gdk/x11/gdkselectionoutputstream-x11.c index bdd4c57d08..b9aad4c3f3 100644 --- a/gdk/x11/gdkselectionoutputstream-x11.c +++ b/gdk/x11/gdkselectionoutputstream-x11.c @@ -846,7 +846,7 @@ static const struct { const char *x_target; const char *mime_type; const char *type; - gint format; + int format; MimeTypeHandleFunc handler; } special_targets[] = { { "UTF8_STRING", "text/plain;charset=utf-8", "UTF8_STRING", 8, handle_utf8 }, @@ -901,7 +901,7 @@ gdk_x11_selection_output_streams_request (GdkDisplay *display, gulong n_atoms; gulong nbytes; Atom prop_type; - gint prop_format; + int prop_format; Atom *atoms = NULL; int error; diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index 2567d7e765..ec0c6d582a 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -96,7 +96,7 @@ const int _gdk_x11_event_mask_table[21] = ButtonPressMask /* SCROLL; on X mouse wheel events is treated as mouse button 4/5 */ }; -const gint _gdk_x11_event_mask_table_size = G_N_ELEMENTS (_gdk_x11_event_mask_table); +const int _gdk_x11_event_mask_table_size = G_N_ELEMENTS (_gdk_x11_event_mask_table); /* Forward declarations */ static void gdk_x11_surface_apply_fullscreen_mode (GdkSurface *surface); @@ -1197,7 +1197,7 @@ set_initial_hints (GdkSurface *surface) Window xwindow = GDK_SURFACE_XID (surface); GdkToplevelX11 *toplevel; Atom atoms[9]; - gint i; + int i; toplevel = _gdk_x11_surface_get_toplevel (surface); @@ -1379,8 +1379,8 @@ gdk_x11_surface_hide (GdkSurface *surface) static inline void x11_surface_move (GdkSurface *surface, - gint x, - gint y) + int x, + int y) { GdkX11Surface *impl = GDK_X11_SURFACE (surface); @@ -1408,8 +1408,8 @@ x11_surface_move (GdkSurface *surface, static inline void x11_surface_resize (GdkSurface *surface, - gint width, - gint height) + int width, + int height) { GdkX11Surface *impl = GDK_X11_SURFACE (surface); @@ -1443,10 +1443,10 @@ x11_surface_resize (GdkSurface *surface, static inline void x11_surface_move_resize (GdkSurface *surface, - gint x, - gint y, - gint width, - gint height) + int x, + int y, + int width, + int height) { GdkX11Surface *impl = GDK_X11_SURFACE (surface); @@ -1496,10 +1496,10 @@ x11_surface_move_resize (GdkSurface *surface, static void gdk_x11_surface_move_resize (GdkSurface *surface, gboolean with_move, - gint x, - gint y, - gint width, - gint height) + int x, + int y, + int width, + int height) { if (with_move && (width < 0 && height < 0)) x11_surface_move (surface, x, y); @@ -1514,16 +1514,16 @@ gdk_x11_surface_move_resize (GdkSurface *surface, static void gdk_x11_surface_toplevel_resize (GdkSurface *surface, - gint width, - gint height) + int width, + int height) { x11_surface_resize (surface, width, height); } void gdk_x11_surface_move (GdkSurface *surface, - gint x, - gint y) + int x, + int y) { gdk_x11_surface_move_resize (surface, TRUE, x, y, -1, -1); } @@ -1804,7 +1804,7 @@ get_netwm_cardinal_property (GdkSurface *surface, GdkX11Screen *x11_screen = GDK_SURFACE_SCREEN (surface); guint32 prop = 0; Atom type; - gint format; + int format; gulong nitems; gulong bytes_after; guchar *data; @@ -2334,8 +2334,8 @@ set_text_property (GdkDisplay *display, { gchar *prop_text = NULL; Atom prop_type; - gint prop_length; - gint prop_format; + int prop_length; + int prop_format; gboolean is_compound_text; if (utf8_is_latin1 (utf8_str)) @@ -2483,15 +2483,15 @@ _gdk_x11_surface_get_cursor (GdkSurface *surface) static void gdk_x11_surface_get_geometry (GdkSurface *surface, - gint *x, - gint *y, - gint *width, - gint *height) + int *x, + int *y, + int *width, + int *height) { GdkX11Surface *impl; Window root; - gint tx; - gint ty; + int tx; + int ty; guint twidth; guint theight; guint tborder_width; @@ -2518,15 +2518,15 @@ gdk_x11_surface_get_geometry (GdkSurface *surface, void gdk_x11_surface_get_root_coords (GdkSurface *surface, - gint x, - gint y, - gint *root_x, - gint *root_y) + int x, + int y, + int *root_x, + int *root_y) { GdkX11Surface *impl = GDK_X11_SURFACE (surface); Window child; - gint tx; - gint ty; + int tx; + int ty; XTranslateCoordinates (GDK_SURFACE_XDISPLAY (surface), GDK_SURFACE_XID (surface), @@ -2558,10 +2558,10 @@ gdk_x11_surface_get_frame_extents (GdkSurface *surface, guint nvroots; gulong nitems_return; gulong bytes_after_return; - gint format_return; - gint i; + int format_return; + int i; guint ww, wh, wb, wd; - gint wx, wy; + int wx, wy; gboolean got_frame_extents = FALSE; g_return_if_fail (rect != NULL); @@ -2752,7 +2752,7 @@ gdk_x11_surface_set_input_region (GdkSurface *surface, } else { - gint n_rects = 0; + int n_rects = 0; XRectangle *xrects = NULL; _gdk_x11_region_get_xrectangles (input_region, @@ -3032,12 +3032,12 @@ gdk_x11_surface_set_icon_list (GdkSurface *surface, { gulong *data; gulong *p; - gint size; + int size; GList *l; - gint width, height; + int width, height; GdkTexture *texture; GdkDisplay *display; - gint i, n; + int i, n; if (GDK_SURFACE_DESTROYED (surface)) return; @@ -3206,8 +3206,8 @@ gdk_x11_surface_apply_fullscreen_mode (GdkSurface *surface) if (GDK_SURFACE_IS_MAPPED (surface)) { XClientMessageEvent xclient; - gint monitors[4]; - gint i; + int monitors[4]; + int i; memset (&xclient, 0, sizeof (xclient)); xclient.type = ClientMessage; @@ -3404,7 +3404,7 @@ gdk_surface_get_mwm_hints (GdkSurface *surface) Atom hints_atom = None; guchar *data; Atom type; - gint format; + int format; gulong nitems; gulong bytes_after; @@ -3435,7 +3435,7 @@ gdk_surface_set_mwm_hints (GdkSurface *surface, guchar *data; MotifWmHints *hints; Atom type; - gint format; + int format; gulong nitems; gulong bytes_after; @@ -3591,13 +3591,13 @@ gdk_x11_surface_get_functions (GdkSurface *surface, cairo_region_t * _gdk_x11_xwindow_get_shape (Display *xdisplay, Window window, - gint scale, - gint shape_type) + int scale, + int shape_type) { cairo_region_t *shape; GdkRectangle *rl; XRectangle *xrl; - gint rn, ord, i; + int rn, ord, i; shape = NULL; rn = 0; @@ -3660,10 +3660,10 @@ _gdk_x11_xwindow_get_shape (Display *xdisplay, static void wmspec_send_message (GdkDisplay *display, GdkSurface *surface, - gint root_x, - gint root_y, - gint action, - gint button) + int root_x, + int root_y, + int action, + int button) { GdkX11Surface *impl = GDK_X11_SURFACE (surface); XClientMessageEvent xclient; @@ -3716,11 +3716,11 @@ handle_wmspec_button_release (GdkDisplay *display, static void wmspec_moveresize (GdkSurface *surface, - gint direction, + int direction, GdkDevice *device, - gint button, - gint root_x, - gint root_y, + int button, + int root_x, + int root_y, guint32 timestamp) { GdkDisplay *display = GDK_SURFACE_DISPLAY (surface); @@ -3736,12 +3736,12 @@ static void wmspec_resize_drag (GdkSurface *surface, GdkSurfaceEdge edge, GdkDevice *device, - gint button, - gint root_x, - gint root_y, + int button, + int root_x, + int root_y, guint32 timestamp) { - gint direction; + int direction; if (button == 0) direction = _NET_WM_MOVERESIZE_SIZE_KEYBOARD; @@ -3803,13 +3803,13 @@ struct _MoveResizeData gboolean is_resize; GdkSurfaceEdge resize_edge; GdkDevice *device; - gint moveresize_button; - gint moveresize_x; - gint moveresize_y; - gint moveresize_orig_x; - gint moveresize_orig_y; - gint moveresize_orig_width; - gint moveresize_orig_height; + int moveresize_button; + int moveresize_x; + int moveresize_y; + int moveresize_orig_x; + int moveresize_orig_y; + int moveresize_orig_width; + int moveresize_orig_height; GdkSurfaceHints moveresize_geom_mask; GdkGeometry moveresize_geometry; Time moveresize_process_time; @@ -3845,7 +3845,7 @@ check_maximize (MoveResizeData *mv_resize, gdouble y_root) { GdkSurfaceState state; - gint y; + int y; if (mv_resize->is_resize) return; @@ -3867,7 +3867,7 @@ check_unmaximize (MoveResizeData *mv_resize, gdouble y_root) { GdkSurfaceState state; - gint dx, dy; + int dx, dy; if (mv_resize->is_resize) return; @@ -3886,10 +3886,10 @@ check_unmaximize (MoveResizeData *mv_resize, static void update_pos (MoveResizeData *mv_resize, - gint new_root_x, - gint new_root_y) + int new_root_x, + int new_root_y) { - gint dx, dy; + int dx, dy; check_unmaximize (mv_resize, new_root_x, new_root_y); dx = new_root_x - mv_resize->moveresize_x; @@ -3897,7 +3897,7 @@ update_pos (MoveResizeData *mv_resize, if (mv_resize->is_resize) { - gint x, y, w, h; + int x, y, w, h; x = mv_resize->moveresize_orig_x; y = mv_resize->moveresize_orig_y; @@ -3962,7 +3962,7 @@ update_pos (MoveResizeData *mv_resize, } else { - gint x, y; + int x, y; x = mv_resize->moveresize_orig_x + dx; y = mv_resize->moveresize_orig_y + dy; @@ -4104,7 +4104,7 @@ _gdk_x11_moveresize_handle_event (const XEvent *event) /* we just assume this is an XI2 event */ XIEvent *ev = (XIEvent *) event->xcookie.data; XIDeviceEvent *xev = (XIDeviceEvent *)ev; - gint state; + int state; switch (ev->evtype) { case XI_Motion: @@ -4202,7 +4202,7 @@ static void calculate_unmoving_origin (MoveResizeData *mv_resize) { GdkRectangle rect; - gint width, height; + int width, height; if (mv_resize->moveresize_geom_mask & GDK_HINT_WIN_GRAVITY && mv_resize->moveresize_geometry.win_gravity == GDK_GRAVITY_STATIC) @@ -4268,9 +4268,9 @@ static void emulate_resize_drag (GdkSurface *surface, GdkSurfaceEdge edge, GdkDevice *device, - gint button, - gint root_x, - gint root_y, + int button, + int root_x, + int root_y, guint32 timestamp) { MoveResizeData *mv_resize = get_move_resize_data (GDK_SURFACE_DISPLAY (surface), TRUE); @@ -4302,9 +4302,9 @@ emulate_resize_drag (GdkSurface *surface, static void emulate_move_drag (GdkSurface *surface, GdkDevice *device, - gint button, - gint root_x, - gint root_y, + int button, + int root_x, + int root_y, guint32 timestamp) { MoveResizeData *mv_resize = get_move_resize_data (GDK_SURFACE_DISPLAY (surface), TRUE); @@ -4378,7 +4378,7 @@ gdk_x11_toplevel_begin_move (GdkToplevel *toplevel, { GdkSurface *surface = GDK_SURFACE (toplevel); int root_x, root_y; - gint direction; + int direction; if (GDK_SURFACE_DESTROYED (surface)) return; @@ -4522,7 +4522,7 @@ gdk_x11_surface_get_xid (GdkSurface *surface) return GDK_X11_SURFACE (surface)->xid; } -static gint +static int gdk_x11_surface_get_scale_factor (GdkSurface *surface) { GdkX11Surface *impl = GDK_X11_SURFACE (surface); diff --git a/gdk/x11/gdksurface-x11.h b/gdk/x11/gdksurface-x11.h index 6fc7afd07d..eb23474afd 100644 --- a/gdk/x11/gdksurface-x11.h +++ b/gdk/x11/gdksurface-x11.h @@ -57,15 +57,15 @@ struct _GdkX11Surface guint frame_sync_enabled : 1; guint tracking_damage: 1; - gint surface_scale; + int surface_scale; /* Width and height not divided by surface_scale - this matters in the * corner-case where the window manager assigns us a size that isn't * a multiple of surface_scale - for example for a maximized window * with an odd-sized title-bar. */ - gint unscaled_width; - gint unscaled_height; + int unscaled_width; + int unscaled_height; cairo_surface_t *cairo_surface; @@ -184,8 +184,8 @@ gboolean _gdk_x11_surface_syncs_frames (GdkSurface *surface); void gdk_x11_surface_pre_damage (GdkSurface *surface); void gdk_x11_surface_move (GdkSurface *surface, - gint x, - gint y); + int x, + int y); void gdk_x11_surface_check_monitor (GdkSurface *surface, GdkMonitor *monitor); diff --git a/gdk/x11/gdktextlistconverter-x11.c b/gdk/x11/gdktextlistconverter-x11.c index 0e6999e7e4..fdd4228ad2 100644 --- a/gdk/x11/gdktextlistconverter-x11.c +++ b/gdk/x11/gdktextlistconverter-x11.c @@ -38,7 +38,7 @@ struct _GdkX11TextListConverter GdkDisplay *display; const char *encoding; /* interned */ - gint format; + int format; guint encoder : 1; }; @@ -82,7 +82,7 @@ gdk_x11_text_list_converter_decode (GdkX11TextListConverter *conv, gsize *bytes_written, GError **error) { - gint count; + int count; char **list; if (!(flags & G_CONVERTER_INPUT_AT_END)) @@ -132,7 +132,7 @@ char * gdk_x11_utf8_to_string_target (const char *utf8_str, gboolean return_latin1) { - gint len = strlen (utf8_str); + int len = strlen (utf8_str); GString *result = g_string_sized_new (len); const gchar *p = utf8_str; @@ -164,7 +164,7 @@ gdk_x11_utf8_to_string_target (const char *utf8_str, else { char buf[7]; - gint buflen; + int buflen; buflen = g_unichar_to_utf8 (ch, buf); g_string_append_len (result, buf, buflen); @@ -223,8 +223,8 @@ gdk_x11_text_list_converter_encode (GdkX11TextListConverter *conv, GConverterResult result; guchar *text; const char *encoding; - gint format; - gint new_length; + int format; + int new_length; char *tmp; tmp = g_strndup (inbuf, inbuf_size); diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c index c43c853def..ecb9ea6b6f 100644 --- a/gdk/x11/gdkvisual-x11.c +++ b/gdk/x11/gdkvisual-x11.c @@ -52,7 +52,7 @@ void _gdk_x11_screen_init_visuals (GdkX11Screen *x11_screen, gboolean setup_display) { - static const gint possible_depths[8] = { 32, 30, 24, 16, 15, 8, 4, 1 }; + static const int possible_depths[8] = { 32, 30, 24, 16, 15, 8, 4, 1 }; static const GdkVisualType possible_types[6] = { GDK_VISUAL_DIRECT_COLOR, diff --git a/gdk/x11/gdkvisual-x11.h b/gdk/x11/gdkvisual-x11.h index 7fbf9d20d4..7b1acb4e0c 100644 --- a/gdk/x11/gdkvisual-x11.h +++ b/gdk/x11/gdkvisual-x11.h @@ -57,10 +57,10 @@ struct _GdkX11Visual GObject parent_instance; GdkVisualType type; - gint depth; + int depth; GdkByteOrder byte_order; - gint colormap_size; - gint bits_per_rgb; + int colormap_size; + int bits_per_rgb; guint32 red_mask; guint32 green_mask; diff --git a/gdk/x11/gdkx11device.h b/gdk/x11/gdkx11device.h index ae9e606303..956375dfab 100644 --- a/gdk/x11/gdkx11device.h +++ b/gdk/x11/gdkx11device.h @@ -27,7 +27,7 @@ G_BEGIN_DECLS GDK_AVAILABLE_IN_ALL -gint gdk_x11_device_get_id (GdkDevice *device); +int gdk_x11_device_get_id (GdkDevice *device); G_END_DECLS diff --git a/gdk/x11/gdkx11devicemanager.h b/gdk/x11/gdkx11devicemanager.h index f1c9ac62c9..6f07b331a2 100644 --- a/gdk/x11/gdkx11devicemanager.h +++ b/gdk/x11/gdkx11devicemanager.h @@ -32,7 +32,7 @@ G_BEGIN_DECLS GDK_AVAILABLE_IN_ALL GdkDevice * gdk_x11_device_manager_lookup (GdkX11DeviceManagerXI2 *device_manager, - gint device_id); + int device_id); G_END_DECLS diff --git a/gdk/x11/gdkx11display.h b/gdk/x11/gdkx11display.h index 78356d287f..0eb84a8025 100644 --- a/gdk/x11/gdkx11display.h +++ b/gdk/x11/gdkx11display.h @@ -92,7 +92,7 @@ void gdk_x11_display_set_program_class (GdkDisplay * GDK_AVAILABLE_IN_ALL void gdk_x11_display_set_cursor_theme (GdkDisplay *display, const gchar *theme, - const gint size); + const int size); GDK_AVAILABLE_IN_ALL void gdk_x11_display_broadcast_startup_message (GdkDisplay *display, @@ -115,13 +115,13 @@ void gdk_x11_display_ungrab (GdkDisplay *display); GDK_AVAILABLE_IN_ALL void gdk_x11_display_set_surface_scale (GdkDisplay *display, - gint scale); + int scale); GDK_AVAILABLE_IN_ALL void gdk_x11_display_error_trap_push (GdkDisplay *display); /* warn unused because you could use pop_ignored otherwise */ GDK_AVAILABLE_IN_ALL -G_GNUC_WARN_UNUSED_RESULT gint gdk_x11_display_error_trap_pop (GdkDisplay *display); +G_GNUC_WARN_UNUSED_RESULT int gdk_x11_display_error_trap_pop (GdkDisplay *display); GDK_AVAILABLE_IN_ALL void gdk_x11_display_error_trap_pop_ignored (GdkDisplay *display); diff --git a/gdk/x11/gdkx11glcontext.h b/gdk/x11/gdkx11glcontext.h index 4053ac4b4f..4a6e049f7e 100644 --- a/gdk/x11/gdkx11glcontext.h +++ b/gdk/x11/gdkx11glcontext.h @@ -41,8 +41,8 @@ GType gdk_x11_gl_context_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL gboolean gdk_x11_display_get_glx_version (GdkDisplay *display, - gint *major, - gint *minor); + int *major, + int *minor); G_END_DECLS diff --git a/gdk/x11/gdkx11screen.h b/gdk/x11/gdkx11screen.h index b0a047d30f..f18ddfeef8 100644 --- a/gdk/x11/gdkx11screen.h +++ b/gdk/x11/gdkx11screen.h @@ -63,7 +63,7 @@ gboolean gdk_x11_screen_supports_net_wm_hint (GdkX11Screen *screen, GDK_AVAILABLE_IN_ALL XID gdk_x11_screen_get_monitor_output (GdkX11Screen *screen, - gint monitor_num); + int monitor_num); GDK_AVAILABLE_IN_ALL guint32 gdk_x11_screen_get_number_of_desktops (GdkX11Screen *screen); diff --git a/gdk/x11/gdkx11selection.h b/gdk/x11/gdkx11selection.h index 3a078ffc68..7fd9f73892 100644 --- a/gdk/x11/gdkx11selection.h +++ b/gdk/x11/gdkx11selection.h @@ -37,28 +37,28 @@ G_BEGIN_DECLS GDK_AVAILABLE_IN_ALL -gint gdk_x11_display_text_property_to_text_list (GdkDisplay *display, +int gdk_x11_display_text_property_to_text_list (GdkDisplay *display, const char *encoding, - gint format, + int format, const guchar *text, - gint length, + int length, gchar ***list); GDK_AVAILABLE_IN_ALL void gdk_x11_free_text_list (gchar **list); GDK_AVAILABLE_IN_ALL -gint gdk_x11_display_string_to_compound_text (GdkDisplay *display, +int gdk_x11_display_string_to_compound_text (GdkDisplay *display, const char *str, const char **encoding, - gint *format, + int *format, guchar **ctext, - gint *length); + int *length); GDK_AVAILABLE_IN_ALL gboolean gdk_x11_display_utf8_to_compound_text (GdkDisplay *display, const char *str, const char **encoding, - gint *format, + int *format, guchar **ctext, - gint *length); + int *length); GDK_AVAILABLE_IN_ALL void gdk_x11_free_compound_text (guchar *ctext); diff --git a/gdk/x11/gdkxftdefaults.c b/gdk/x11/gdkxftdefaults.c index 68b5f7d138..2d3709c97c 100644 --- a/gdk/x11/gdkxftdefaults.c +++ b/gdk/x11/gdkxftdefaults.c @@ -54,7 +54,7 @@ #include #include -static gint +static int parse_boolean (char *v) { gchar c0, c1; @@ -87,7 +87,7 @@ get_boolean_default (GdkX11Screen *x11_screen, { Display *dpy = GDK_SCREEN_XDISPLAY (x11_screen); gchar *v; - gint i; + int i; if (GDK_DISPLAY_DEBUG_CHECK (GDK_SCREEN_DISPLAY (x11_screen), DEFAULT_SETTINGS)) return FALSE; @@ -136,7 +136,7 @@ get_double_default (GdkX11Screen *x11_screen, static gboolean get_integer_default (GdkX11Screen *x11_screen, const gchar *option, - gint *value) + int *value) { Display *dpy = GDK_SCREEN_XDISPLAY (x11_screen); gchar *v, *e; diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 6e8457667a..1013972bcf 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c @@ -3740,8 +3740,8 @@ blur_once (cairo_surface_t *src, { int width, height, src_rowstride, dest_rowstride, n_channels; guchar *p_src, *p_dest, *c1, *c2; - gint x, y, i, i1, i2, width_minus_1, height_minus_1, radius_plus_1; - gint r, g, b, a; + int x, y, i, i1, i2, width_minus_1, height_minus_1, radius_plus_1; + int r, g, b, a; guchar *p_dest_row, *p_dest_col; width = cairo_image_surface_get_width (src); diff --git a/gsk/vulkan/gskvulkanrenderer.c b/gsk/vulkan/gskvulkanrenderer.c index 7f3eeab9ae..cd91c90820 100644 --- a/gsk/vulkan/gskvulkanrenderer.c +++ b/gsk/vulkan/gskvulkanrenderer.c @@ -89,7 +89,7 @@ gsk_vulkan_renderer_update_images_cb (GdkVulkanContext *context, GskVulkanRenderer *self) { GdkSurface *window; - gint scale_factor; + int scale_factor; gsize width, height; guint i; diff --git a/gsk/vulkan/gskvulkanrenderpass.c b/gsk/vulkan/gskvulkanrenderpass.c index c622a3b14b..51ed812ce7 100644 --- a/gsk/vulkan/gskvulkanrenderpass.c +++ b/gsk/vulkan/gskvulkanrenderpass.c @@ -352,7 +352,7 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self, int i; guint count; guint texture_index; - gint x_position; + int x_position; GskVulkanRenderer *renderer = GSK_VULKAN_RENDERER (gsk_vulkan_render_get_renderer (render)); if (has_color_glyphs) diff --git a/gtk/a11y/gtkbooleancellaccessible.c b/gtk/a11y/gtkbooleancellaccessible.c index 694f86710d..3074c9f65f 100644 --- a/gtk/a11y/gtkbooleancellaccessible.c +++ b/gtk/a11y/gtkbooleancellaccessible.c @@ -29,7 +29,7 @@ struct _GtkBooleanCellAccessiblePrivate static AtkActionIface *parent_action_iface; -static gint +static int gtk_boolean_cell_accessible_get_n_actions (AtkAction *action) { return parent_action_iface->get_n_actions (action) + 1; @@ -37,7 +37,7 @@ gtk_boolean_cell_accessible_get_n_actions (AtkAction *action) static const gchar * gtk_boolean_cell_accessible_get_description (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action description", "Toggles the cell"); @@ -47,7 +47,7 @@ gtk_boolean_cell_accessible_get_description (AtkAction *action, static const gchar * gtk_boolean_cell_accessible_action_get_name (AtkAction *action, - gint i) + int i) { if (i == 0) return "toggle"; @@ -57,7 +57,7 @@ gtk_boolean_cell_accessible_action_get_name (AtkAction *action, static const gchar * gtk_boolean_cell_accessible_action_get_localized_name (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action name", "Toggle"); @@ -67,7 +67,7 @@ gtk_boolean_cell_accessible_action_get_localized_name (AtkAction *action, static gboolean gtk_boolean_cell_accessible_do_action (AtkAction *action, - gint i) + int i) { if (i == 0) return parent_action_iface->do_action (action, 2); diff --git a/gtk/a11y/gtkbuttonaccessible.c b/gtk/a11y/gtkbuttonaccessible.c index 3c1385dc78..3afd64644f 100644 --- a/gtk/a11y/gtkbuttonaccessible.c +++ b/gtk/a11y/gtkbuttonaccessible.c @@ -137,7 +137,7 @@ gtk_button_accessible_get_name (AtkObject *obj) return name; } -static gint +static int gtk_button_accessible_get_n_children (AtkObject* obj) { return 0; @@ -145,7 +145,7 @@ gtk_button_accessible_get_n_children (AtkObject* obj) static AtkObject * gtk_button_accessible_ref_child (AtkObject *obj, - gint i) + int i) { return NULL; } @@ -204,7 +204,7 @@ gtk_button_accessible_init (GtkButtonAccessible *button) static gboolean gtk_button_accessible_do_action (AtkAction *action, - gint i) + int i) { GtkWidget *widget; @@ -222,7 +222,7 @@ gtk_button_accessible_do_action (AtkAction *action, return TRUE; } -static gint +static int gtk_button_accessible_get_n_actions (AtkAction *action) { return 1; @@ -230,7 +230,7 @@ gtk_button_accessible_get_n_actions (AtkAction *action) static const gchar * gtk_button_accessible_get_keybinding (AtkAction *action, - gint i) + int i) { gchar *return_value = NULL; GtkWidget *widget; @@ -284,7 +284,7 @@ gtk_button_accessible_get_keybinding (AtkAction *action, static const gchar * gtk_button_accessible_action_get_name (AtkAction *action, - gint i) + int i) { if (i == 0) return "click"; @@ -293,7 +293,7 @@ gtk_button_accessible_action_get_name (AtkAction *action, static const gchar * gtk_button_accessible_action_get_localized_name (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action name", "Click"); @@ -302,7 +302,7 @@ gtk_button_accessible_action_get_localized_name (AtkAction *action, static const gchar * gtk_button_accessible_action_get_description (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action description", "Clicks the button"); @@ -343,8 +343,8 @@ gtk_button_accessible_get_image_description (AtkImage *image) static void gtk_button_accessible_get_image_position (AtkImage *image, - gint *x, - gint *y, + int *x, + int *y, AtkCoordType coord_type) { GtkWidget *widget; @@ -375,8 +375,8 @@ gtk_button_accessible_get_image_position (AtkImage *image, static void gtk_button_accessible_get_image_size (AtkImage *image, - gint *width, - gint *height) + int *width, + int *height) { GtkWidget *widget; GtkWidget *button_image; diff --git a/gtk/a11y/gtkcellaccessible.c b/gtk/a11y/gtkcellaccessible.c index e55144ba02..51bff40d29 100644 --- a/gtk/a11y/gtkcellaccessible.c +++ b/gtk/a11y/gtkcellaccessible.c @@ -54,7 +54,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkCellAccessible, gtk_cell_accessible, GTK_TYPE_ACCESS G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init) G_IMPLEMENT_INTERFACE (ATK_TYPE_TABLE_CELL, atk_table_cell_interface_init)) -static gint +static int gtk_cell_accessible_get_index_in_parent (AtkObject *obj) { GtkCellAccessible *cell; @@ -224,7 +224,7 @@ _gtk_cell_accessible_remove_state (GtkCellAccessible *cell, return TRUE; } -static gint +static int gtk_cell_accessible_action_get_n_actions (AtkAction *action) { return 3; @@ -232,7 +232,7 @@ gtk_cell_accessible_action_get_n_actions (AtkAction *action) static const gchar * gtk_cell_accessible_action_get_name (AtkAction *action, - gint index) + int index) { switch (index) { @@ -249,7 +249,7 @@ gtk_cell_accessible_action_get_name (AtkAction *action, static const gchar * gtk_cell_accessible_action_get_localized_name (AtkAction *action, - gint index) + int index) { switch (index) { @@ -266,7 +266,7 @@ gtk_cell_accessible_action_get_localized_name (AtkAction *action, static const gchar * gtk_cell_accessible_action_get_description (AtkAction *action, - gint index) + int index) { switch (index) { @@ -283,14 +283,14 @@ gtk_cell_accessible_action_get_description (AtkAction *action, static const gchar * gtk_cell_accessible_action_get_keybinding (AtkAction *action, - gint index) + int index) { return NULL; } static gboolean gtk_cell_accessible_action_do_action (AtkAction *action, - gint index) + int index) { GtkCellAccessible *cell = GTK_CELL_ACCESSIBLE (action); GtkCellAccessibleParent *parent; @@ -331,10 +331,10 @@ atk_action_interface_init (AtkActionIface *iface) static void gtk_cell_accessible_get_extents (AtkComponent *component, - gint *x, - gint *y, - gint *width, - gint *height, + int *x, + int *y, + int *width, + int *height, AtkCoordType coord_type) { GtkCellAccessible *cell; @@ -388,8 +388,8 @@ gtk_cell_accessible_get_column_header_cells (AtkTableCell *table_cell) static gboolean gtk_cell_accessible_get_position (AtkTableCell *table_cell, - gint *row, - gint *column) + int *row, + int *column) { GtkCellAccessible *cell; AtkObject *parent; diff --git a/gtk/a11y/gtkcellaccessibleparent.c b/gtk/a11y/gtkcellaccessibleparent.c index 535d907d09..f0389fc486 100644 --- a/gtk/a11y/gtkcellaccessibleparent.c +++ b/gtk/a11y/gtkcellaccessibleparent.c @@ -52,10 +52,10 @@ gtk_cell_accessible_parent_get_type (void) void gtk_cell_accessible_parent_get_cell_extents (GtkCellAccessibleParent *parent, GtkCellAccessible *cell, - gint *x, - gint *y, - gint *width, - gint *height, + int *x, + int *y, + int *width, + int *height, AtkCoordType coord_type) { GtkCellAccessibleParentIface *iface; @@ -207,8 +207,8 @@ gtk_cell_accessible_parent_update_relationset (GtkCellAccessibleParent *parent, void gtk_cell_accessible_parent_get_cell_position (GtkCellAccessibleParent *parent, GtkCellAccessible *cell, - gint *row, - gint *column) + int *row, + int *column) { GtkCellAccessibleParentIface *iface; diff --git a/gtk/a11y/gtkcellaccessibleparent.h b/gtk/a11y/gtkcellaccessibleparent.h index 1a8c2c62fb..b724f71188 100644 --- a/gtk/a11y/gtkcellaccessibleparent.h +++ b/gtk/a11y/gtkcellaccessibleparent.h @@ -49,10 +49,10 @@ struct _GtkCellAccessibleParentIface GTypeInterface parent; void ( *get_cell_extents) (GtkCellAccessibleParent *parent, GtkCellAccessible *cell, - gint *x, - gint *y, - gint *width, - gint *height, + int *x, + int *y, + int *width, + int *height, AtkCoordType coord_type); void ( *get_cell_area) (GtkCellAccessibleParent *parent, GtkCellAccessible *cell, @@ -77,8 +77,8 @@ struct _GtkCellAccessibleParentIface AtkRelationSet *relationset); void ( *get_cell_position) (GtkCellAccessibleParent *parent, GtkCellAccessible *cell, - gint *row, - gint *column); + int *row, + int *column); GPtrArray * ( *get_column_header_cells) (GtkCellAccessibleParent *parent, GtkCellAccessible *cell); GPtrArray * ( *get_row_header_cells) (GtkCellAccessibleParent *parent, @@ -91,10 +91,10 @@ GType gtk_cell_accessible_parent_get_type (void); GDK_AVAILABLE_IN_ALL void gtk_cell_accessible_parent_get_cell_extents (GtkCellAccessibleParent *parent, GtkCellAccessible *cell, - gint *x, - gint *y, - gint *width, - gint *height, + int *x, + int *y, + int *width, + int *height, AtkCoordType coord_type); GDK_AVAILABLE_IN_ALL void gtk_cell_accessible_parent_get_cell_area (GtkCellAccessibleParent *parent, @@ -126,8 +126,8 @@ void gtk_cell_accessible_parent_update_relationset (GtkCellAccessibleParent GDK_AVAILABLE_IN_ALL void gtk_cell_accessible_parent_get_cell_position(GtkCellAccessibleParent *parent, GtkCellAccessible *cell, - gint *row, - gint *column); + int *row, + int *column); GDK_AVAILABLE_IN_ALL GPtrArray *gtk_cell_accessible_parent_get_column_header_cells (GtkCellAccessibleParent *parent, GtkCellAccessible *cell); diff --git a/gtk/a11y/gtkcolorswatchaccessible.c b/gtk/a11y/gtkcolorswatchaccessible.c index 1c52fda18c..5ee14822b8 100644 --- a/gtk/a11y/gtkcolorswatchaccessible.c +++ b/gtk/a11y/gtkcolorswatchaccessible.c @@ -116,7 +116,7 @@ _gtk_color_swatch_accessible_init (GtkColorSwatchAccessible *self) ATK_OBJECT (self)->role = ATK_ROLE_RADIO_BUTTON; } -static gint +static int gtk_color_swatch_accessible_get_n_actions (AtkAction *action) { return 3; @@ -124,14 +124,14 @@ gtk_color_swatch_accessible_get_n_actions (AtkAction *action) static const gchar * gtk_color_swatch_accessible_get_keybinding (AtkAction *action, - gint i) + int i) { return NULL; } static const gchar * gtk_color_swatch_accessible_get_name (AtkAction *action, - gint i) + int i) { switch (i) { @@ -144,7 +144,7 @@ gtk_color_swatch_accessible_get_name (AtkAction *action, static const gchar * gtk_color_swatch_accessible_get_localized_name (AtkAction *action, - gint i) + int i) { switch (i) { @@ -157,7 +157,7 @@ gtk_color_swatch_accessible_get_localized_name (AtkAction *action, static const gchar * gtk_color_swatch_accessible_get_description (AtkAction *action, - gint i) + int i) { switch (i) { @@ -170,7 +170,7 @@ gtk_color_swatch_accessible_get_description (AtkAction *action, static gboolean gtk_color_swatch_accessible_do_action (AtkAction *action, - gint i) + int i) { GtkWidget *widget; diff --git a/gtk/a11y/gtkcomboboxaccessible.c b/gtk/a11y/gtkcomboboxaccessible.c index bb9f7c9acf..2b29ad7457 100644 --- a/gtk/a11y/gtkcomboboxaccessible.c +++ b/gtk/a11y/gtkcomboboxaccessible.c @@ -24,7 +24,7 @@ struct _GtkComboBoxAccessiblePrivate { gchar *name; - gint old_selection; + int old_selection; gboolean popup_set; }; @@ -42,7 +42,7 @@ changed_cb (GtkWidget *widget) GtkComboBox *combo_box; AtkObject *obj; GtkComboBoxAccessible *accessible; - gint index; + int index; combo_box = GTK_COMBO_BOX (widget); @@ -104,8 +104,8 @@ gtk_combo_box_accessible_get_name (AtkObject *obj) GtkTreeIter iter; const gchar *name; GtkTreeModel *model; - gint n_columns; - gint i; + int n_columns; + int i; name = ATK_OBJECT_CLASS (gtk_combo_box_accessible_parent_class)->get_name (obj); if (name) @@ -140,10 +140,10 @@ gtk_combo_box_accessible_get_name (AtkObject *obj) return accessible->priv->name; } -static gint +static int gtk_combo_box_accessible_get_n_children (AtkObject* obj) { - gint n_children = 0; + int n_children = 0; GtkWidget *widget; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); @@ -159,7 +159,7 @@ gtk_combo_box_accessible_get_n_children (AtkObject* obj) static AtkObject * gtk_combo_box_accessible_ref_child (AtkObject *obj, - gint i) + int i) { GtkWidget *widget; AtkObject *child; @@ -216,7 +216,7 @@ gtk_combo_box_accessible_init (GtkComboBoxAccessible *combo_box) static gboolean gtk_combo_box_accessible_do_action (AtkAction *action, - gint i) + int i) { GtkComboBox *combo_box; GtkWidget *widget; @@ -242,7 +242,7 @@ gtk_combo_box_accessible_do_action (AtkAction *action, return TRUE; } -static gint +static int gtk_combo_box_accessible_get_n_actions (AtkAction *action) { return 1; @@ -250,7 +250,7 @@ gtk_combo_box_accessible_get_n_actions (AtkAction *action) static const gchar * gtk_combo_box_accessible_get_keybinding (AtkAction *action, - gint i) + int i) { GtkComboBoxAccessible *combo_box; GtkWidget *widget; @@ -295,7 +295,7 @@ gtk_combo_box_accessible_get_keybinding (AtkAction *action, static const gchar * gtk_combo_box_accessible_action_get_name (AtkAction *action, - gint i) + int i) { if (i == 0) return "press"; @@ -304,7 +304,7 @@ gtk_combo_box_accessible_action_get_name (AtkAction *action, static const gchar * gtk_combo_box_accessible_action_get_localized_name (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action name", "Press"); @@ -313,7 +313,7 @@ gtk_combo_box_accessible_action_get_localized_name (AtkAction *action, static const gchar * gtk_combo_box_accessible_action_get_description (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action description", "Presses the combobox"); @@ -333,7 +333,7 @@ atk_action_interface_init (AtkActionIface *iface) static gboolean gtk_combo_box_accessible_add_selection (AtkSelection *selection, - gint i) + int i) { GtkWidget *widget; @@ -362,12 +362,12 @@ gtk_combo_box_accessible_clear_selection (AtkSelection *selection) static AtkObject * gtk_combo_box_accessible_ref_selection (AtkSelection *selection, - gint i) + int i) { GtkComboBox *combo_box; GtkWidget *widget; AtkObject *obj; - gint index; + int index; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection)); if (widget == NULL) @@ -384,7 +384,7 @@ gtk_combo_box_accessible_ref_selection (AtkSelection *selection, return atk_object_ref_accessible_child (obj, index); } -static gint +static int gtk_combo_box_accessible_get_selection_count (AtkSelection *selection) { GtkWidget *widget; @@ -398,10 +398,10 @@ gtk_combo_box_accessible_get_selection_count (AtkSelection *selection) static gboolean gtk_combo_box_accessible_is_child_selected (AtkSelection *selection, - gint i) + int i) { GtkWidget *widget; - gint j; + int j; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection)); @@ -415,7 +415,7 @@ gtk_combo_box_accessible_is_child_selected (AtkSelection *selection, static gboolean gtk_combo_box_accessible_remove_selection (AtkSelection *selection, - gint i) + int i) { if (atk_selection_is_child_selected (selection, i)) atk_selection_clear_selection (selection); diff --git a/gtk/a11y/gtkcontainercellaccessible.c b/gtk/a11y/gtkcontainercellaccessible.c index a756e3cadf..e581d98afc 100644 --- a/gtk/a11y/gtkcontainercellaccessible.c +++ b/gtk/a11y/gtkcontainercellaccessible.c @@ -24,7 +24,7 @@ struct _GtkContainerCellAccessiblePrivate { GList *children; - gint n_children; + int n_children; }; G_DEFINE_TYPE_WITH_PRIVATE (GtkContainerCellAccessible, gtk_container_cell_accessible, GTK_TYPE_CELL_ACCESSIBLE) @@ -41,7 +41,7 @@ gtk_container_cell_accessible_finalize (GObject *obj) } -static gint +static int gtk_container_cell_accessible_get_n_children (AtkObject *obj) { GtkContainerCellAccessible *cell = GTK_CONTAINER_CELL_ACCESSIBLE (obj); @@ -51,7 +51,7 @@ gtk_container_cell_accessible_get_n_children (AtkObject *obj) static AtkObject * gtk_container_cell_accessible_ref_child (AtkObject *obj, - gint child) + int child) { GtkContainerCellAccessible *cell = GTK_CONTAINER_CELL_ACCESSIBLE (obj); GList *l; diff --git a/gtk/a11y/gtkentryaccessible.c b/gtk/a11y/gtkentryaccessible.c index f8a874833c..88a7ffcbcc 100644 --- a/gtk/a11y/gtkentryaccessible.c +++ b/gtk/a11y/gtkentryaccessible.c @@ -39,8 +39,8 @@ struct _GtkEntryAccessiblePrivate { - gint cursor_position; - gint selection_bound; + int cursor_position; + int selection_bound; AtkObject *icons[2]; }; @@ -219,7 +219,7 @@ gtk_entry_icon_accessible_class_init (GtkEntryIconAccessibleClass *klass) static gboolean gtk_entry_icon_accessible_do_action (AtkAction *action, - gint i) + int i) { GtkEntryIconAccessible *icon = (GtkEntryIconAccessible *)action; GtkWidget *widget; @@ -245,7 +245,7 @@ gtk_entry_icon_accessible_do_action (AtkAction *action, return TRUE; } -static gint +static int gtk_entry_icon_accessible_get_n_actions (AtkAction *action) { GtkEntryIconAccessible *icon = GTK_ENTRY_ICON_ACCESSIBLE (action); @@ -257,7 +257,7 @@ gtk_entry_icon_accessible_get_n_actions (AtkAction *action) static const gchar * gtk_entry_icon_accessible_get_name (AtkAction *action, - gint i) + int i) { GtkEntryIconAccessible *icon = GTK_ENTRY_ICON_ACCESSIBLE (action); GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (icon->entry)); @@ -281,10 +281,10 @@ icon_atk_action_interface_init (AtkActionIface *iface) static void gtk_entry_icon_accessible_get_extents (AtkComponent *component, - gint *x, - gint *y, - gint *width, - gint *height, + int *x, + int *y, + int *width, + int *height, AtkCoordType coord_type) { GtkEntryIconAccessible *icon = GTK_ENTRY_ICON_ACCESSIBLE (component); @@ -309,8 +309,8 @@ gtk_entry_icon_accessible_get_extents (AtkComponent *component, static void gtk_entry_icon_accessible_get_position (AtkComponent *component, - gint *x, - gint *y, + int *x, + int *y, AtkCoordType coord_type) { GtkEntryIconAccessible *icon = GTK_ENTRY_ICON_ACCESSIBLE (component); @@ -333,8 +333,8 @@ gtk_entry_icon_accessible_get_position (AtkComponent *component, static void gtk_entry_icon_accessible_get_size (AtkComponent *component, - gint *width, - gint *height) + int *width, + int *height) { GtkEntryIconAccessible *icon = GTK_ENTRY_ICON_ACCESSIBLE (component); GdkRectangle icon_area; @@ -389,7 +389,7 @@ check_for_selection_change (GtkEntryAccessible *accessible, GtkEditable *editable) { gboolean ret_val = FALSE; - gint start, end; + int start, end; if (gtk_editable_get_selection_bounds (editable, &start, &end)) { @@ -419,8 +419,8 @@ check_for_selection_change (GtkEntryAccessible *accessible, static void insert_text_cb (GtkEditable *editable, gchar *new_text, - gint new_text_length, - gint *position, + int new_text_length, + int *position, GtkEntryAccessible *self) { int length; @@ -443,8 +443,8 @@ insert_text_cb (GtkEditable *editable, */ static void delete_text_cb (GtkEditable *editable, - gint start, - gint end, + int start, + int end, GtkEntryAccessible *self) { GtkText *textw; @@ -535,7 +535,7 @@ on_notify (GObject *gobject, } else if (g_strcmp0 (pspec->name, "secondary-icon-storage-type") == 0) { - gint index = (priv->icons[GTK_ENTRY_ICON_PRIMARY] ? 1 : 0); + int index = (priv->icons[GTK_ENTRY_ICON_PRIMARY] ? 1 : 0); if (gtk_entry_get_icon_storage_type (GTK_ENTRY (widget), GTK_ENTRY_ICON_SECONDARY) != GTK_IMAGE_EMPTY && !priv->icons[GTK_ENTRY_ICON_SECONDARY]) { @@ -705,7 +705,7 @@ gtk_entry_accessible_initialize (AtkObject *obj, { GtkWidget *widget; GtkEntryAccessible *gtk_entry_accessible; - gint start_pos, end_pos; + int start_pos, end_pos; ATK_OBJECT_CLASS (gtk_entry_accessible_parent_class)->initialize (obj, data); @@ -722,7 +722,7 @@ gtk_entry_accessible_initialize (AtkObject *obj, g_signal_connect (widget, "notify", G_CALLBACK (on_notify), obj); } -static gint +static int gtk_entry_accessible_get_index_in_parent (AtkObject *accessible) { /* @@ -736,11 +736,11 @@ gtk_entry_accessible_get_index_in_parent (AtkObject *accessible) return ATK_OBJECT_CLASS (gtk_entry_accessible_parent_class)->get_index_in_parent (accessible); } -static gint +static int gtk_entry_accessible_get_n_children (AtkObject* obj) { GtkWidget *widget; - gint count = 0; + int count = 0; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); if (widget == NULL) @@ -756,7 +756,7 @@ gtk_entry_accessible_get_n_children (AtkObject* obj) static AtkObject * gtk_entry_accessible_ref_child (AtkObject *obj, - gint i) + int i) { GtkEntryAccessible *accessible = GTK_ENTRY_ACCESSIBLE (obj); GtkEntryAccessiblePrivate *priv = accessible->priv; @@ -833,8 +833,8 @@ gtk_entry_accessible_init (GtkEntryAccessible *entry) static gchar * gtk_entry_accessible_get_text (AtkText *atk_text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkText *text; @@ -848,10 +848,10 @@ gtk_entry_accessible_get_text (AtkText *atk_text, static gchar * gtk_entry_accessible_get_text_before_offset (AtkText *atk_text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkText *text; @@ -867,10 +867,10 @@ gtk_entry_accessible_get_text_before_offset (AtkText *atk_text, static gchar * gtk_entry_accessible_get_text_at_offset (AtkText *atk_text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkText *text; @@ -886,10 +886,10 @@ gtk_entry_accessible_get_text_at_offset (AtkText *atk_text, static gchar * gtk_entry_accessible_get_text_after_offset (AtkText *atk_text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkText *text; @@ -903,7 +903,7 @@ gtk_entry_accessible_get_text_after_offset (AtkText *atk_text, start_offset, end_offset); } -static gint +static int gtk_entry_accessible_get_character_count (AtkText *atk_text) { GtkText *text; @@ -927,7 +927,7 @@ gtk_entry_accessible_get_character_count (AtkText *atk_text) return char_count; } -static gint +static int gtk_entry_accessible_get_caret_offset (AtkText *text) { GtkWidget *widget; @@ -947,7 +947,7 @@ gtk_entry_accessible_get_caret_offset (AtkText *text) static gboolean gtk_entry_accessible_set_caret_offset (AtkText *text, - gint offset) + int offset) { GtkWidget *widget; @@ -963,7 +963,7 @@ gtk_entry_accessible_set_caret_offset (AtkText *text, static AtkAttributeSet * add_text_attribute (AtkAttributeSet *attributes, AtkTextAttribute attr, - gint i) + int i) { AtkAttribute *at; @@ -976,9 +976,9 @@ add_text_attribute (AtkAttributeSet *attributes, static AtkAttributeSet * gtk_entry_accessible_get_run_attributes (AtkText *atk_text, - gint offset, - gint *start_offset, - gint *end_offset) + int offset, + int *start_offset, + int *end_offset) { GtkText *text; AtkAttributeSet *attributes; @@ -1024,17 +1024,17 @@ gtk_entry_accessible_get_default_attributes (AtkText *atk_text) static void gtk_entry_accessible_get_character_extents (AtkText *atk_text, - gint offset, - gint *x, - gint *y, - gint *width, - gint *height, + int offset, + int *x, + int *y, + int *width, + int *height, AtkCoordType coords) { GtkText *textw; PangoRectangle char_rect; gchar *entry_text; - gint index, x_layout, y_layout; + int index, x_layout, y_layout; GtkAllocation allocation; textw = get_text (atk_text); @@ -1058,16 +1058,16 @@ gtk_entry_accessible_get_character_extents (AtkText *atk_text, *height = char_rect.height; } -static gint +static int gtk_entry_accessible_get_offset_at_point (AtkText *atk_text, - gint x, - gint y, + int x, + int y, AtkCoordType coords) { GtkText *textw; gchar *text; - gint index, x_layout, y_layout; - gint x_local, y_local; + int index, x_layout, y_layout; + int x_local, y_local; glong offset; textw = get_text (atk_text); @@ -1102,11 +1102,11 @@ gtk_entry_accessible_get_offset_at_point (AtkText *atk_text, return offset; } -static gint +static int gtk_entry_accessible_get_n_selections (AtkText *text) { GtkWidget *widget; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -1120,9 +1120,9 @@ gtk_entry_accessible_get_n_selections (AtkText *text) static gchar * gtk_entry_accessible_get_selection (AtkText *text, - gint selection_num, - gint *start_pos, - gint *end_pos) + int selection_num, + int *start_pos, + int *end_pos) { GtkWidget *widget; @@ -1141,12 +1141,12 @@ gtk_entry_accessible_get_selection (AtkText *text, static gboolean gtk_entry_accessible_add_selection (AtkText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkEntry *entry; GtkWidget *widget; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -1165,10 +1165,10 @@ gtk_entry_accessible_add_selection (AtkText *text, static gboolean gtk_entry_accessible_remove_selection (AtkText *text, - gint selection_num) + int selection_num) { GtkWidget *widget; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -1188,12 +1188,12 @@ gtk_entry_accessible_remove_selection (AtkText *text, static gboolean gtk_entry_accessible_set_selection (AtkText *text, - gint selection_num, - gint start_pos, - gint end_pos) + int selection_num, + int start_pos, + int end_pos) { GtkWidget *widget; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -1213,7 +1213,7 @@ gtk_entry_accessible_set_selection (AtkText *text, static gunichar gtk_entry_accessible_get_character_at_offset (AtkText *atk_text, - gint offset) + int offset) { GtkText *textw; gchar *text; @@ -1282,8 +1282,8 @@ gtk_entry_accessible_set_text_contents (AtkEditableText *text, static void gtk_entry_accessible_insert_text (AtkEditableText *text, const gchar *string, - gint length, - gint *position) + int length, + int *position) { GtkWidget *widget; GtkEditable *editable; @@ -1302,8 +1302,8 @@ gtk_entry_accessible_insert_text (AtkEditableText *text, static void gtk_entry_accessible_copy_text (AtkEditableText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; GtkEditable *editable; @@ -1323,8 +1323,8 @@ gtk_entry_accessible_copy_text (AtkEditableText *text, static void gtk_entry_accessible_cut_text (AtkEditableText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; GtkEditable *editable; @@ -1347,8 +1347,8 @@ gtk_entry_accessible_cut_text (AtkEditableText *text, static void gtk_entry_accessible_delete_text (AtkEditableText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; GtkEditable *editable; @@ -1367,7 +1367,7 @@ gtk_entry_accessible_delete_text (AtkEditableText *text, typedef struct { GtkEntry* entry; - gint position; + int position; } PasteData; static void @@ -1390,7 +1390,7 @@ paste_received_cb (GObject *clipboard, static void gtk_entry_accessible_paste_text (AtkEditableText *text, - gint position) + int position) { GtkWidget *widget; GtkEditable *editable; @@ -1428,7 +1428,7 @@ atk_editable_text_interface_init (AtkEditableTextIface *iface) static gboolean gtk_entry_accessible_do_action (AtkAction *action, - gint i) + int i) { GtkWidget *widget; @@ -1447,7 +1447,7 @@ gtk_entry_accessible_do_action (AtkAction *action, return TRUE; } -static gint +static int gtk_entry_accessible_get_n_actions (AtkAction *action) { return 1; @@ -1455,7 +1455,7 @@ gtk_entry_accessible_get_n_actions (AtkAction *action) static const gchar * gtk_entry_accessible_get_keybinding (AtkAction *action, - gint i) + int i) { GtkWidget *widget; GtkWidget *label; @@ -1500,7 +1500,7 @@ gtk_entry_accessible_get_keybinding (AtkAction *action, static const gchar* gtk_entry_accessible_action_get_name (AtkAction *action, - gint i) + int i) { if (i == 0) return "activate"; @@ -1509,7 +1509,7 @@ gtk_entry_accessible_action_get_name (AtkAction *action, static const gchar* gtk_entry_accessible_action_get_localized_name (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action name", "Activate"); @@ -1518,7 +1518,7 @@ gtk_entry_accessible_action_get_localized_name (AtkAction *action, static const gchar* gtk_entry_accessible_action_get_description (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action description", "Activates the entry"); diff --git a/gtk/a11y/gtkexpanderaccessible.c b/gtk/a11y/gtkexpanderaccessible.c index a4d323df15..8644675d11 100644 --- a/gtk/a11y/gtkexpanderaccessible.c +++ b/gtk/a11y/gtkexpanderaccessible.c @@ -57,7 +57,7 @@ gtk_expander_accessible_get_name (AtkObject *obj) return gtk_expander_accessible_get_full_text (GTK_EXPANDER (widget)); } -static gint +static int gtk_expander_accessible_get_n_children (AtkObject *obj) { GtkWidget *widget; @@ -74,7 +74,7 @@ gtk_expander_accessible_get_n_children (AtkObject *obj) static AtkObject * gtk_expander_accessible_ref_child (AtkObject *obj, - gint i) + int i) { AtkObject *accessible; GtkWidget *widget; @@ -160,7 +160,7 @@ gtk_expander_accessible_init (GtkExpanderAccessible *self) static gboolean gtk_expander_accessible_do_action (AtkAction *action, - gint i) + int i) { GtkWidget *widget; @@ -178,7 +178,7 @@ gtk_expander_accessible_do_action (AtkAction *action, return TRUE; } -static gint +static int gtk_expander_accessible_get_n_actions (AtkAction *action) { return 1; @@ -186,7 +186,7 @@ gtk_expander_accessible_get_n_actions (AtkAction *action) static const gchar * gtk_expander_accessible_get_keybinding (AtkAction *action, - gint i) + int i) { gchar *return_value = NULL; GtkWidget *widget; @@ -214,7 +214,7 @@ gtk_expander_accessible_get_keybinding (AtkAction *action, static const gchar * gtk_expander_accessible_action_get_name (AtkAction *action, - gint i) + int i) { if (i == 0) return "activate"; @@ -223,7 +223,7 @@ gtk_expander_accessible_action_get_name (AtkAction *action, static const gchar * gtk_expander_accessible_action_get_localized_name (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action name", "Activate"); @@ -232,7 +232,7 @@ gtk_expander_accessible_action_get_localized_name (AtkAction *action, static const gchar * gtk_expander_accessible_action_get_description (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action description", "Activates the expander"); diff --git a/gtk/a11y/gtkflowboxaccessible.c b/gtk/a11y/gtkflowboxaccessible.c index 40b65857fc..4b0a07d5f8 100644 --- a/gtk/a11y/gtkflowboxaccessible.c +++ b/gtk/a11y/gtkflowboxaccessible.c @@ -66,7 +66,7 @@ gtk_flow_box_accessible_class_init (GtkFlowBoxAccessibleClass *klass) static gboolean gtk_flow_box_accessible_add_selection (AtkSelection *selection, - gint idx) + int idx) { GtkWidget *box; GtkWidget *child; @@ -91,7 +91,7 @@ gtk_flow_box_accessible_add_selection (AtkSelection *selection, static gboolean gtk_flow_box_accessible_remove_selection (AtkSelection *selection, - gint idx) + int idx) { GtkWidget *box; GtkWidget *child; @@ -142,7 +142,7 @@ gtk_flow_box_accessible_select_all (AtkSelection *selection) typedef struct { - gint idx; + int idx; GtkWidget *child; } FindSelectedData; @@ -164,7 +164,7 @@ find_selected_child (GtkFlowBox *box, static AtkObject * gtk_flow_box_accessible_ref_selection (AtkSelection *selection, - gint idx) + int idx) { GtkWidget *box; AtkObject *accessible; @@ -191,15 +191,15 @@ count_selected (GtkFlowBox *box, GtkFlowBoxChild *child, gpointer data) { - gint *count = data; + int *count = data; *count += 1; } -static gint +static int gtk_flow_box_accessible_get_selection_count (AtkSelection *selection) { GtkWidget *box; - gint count; + int count; box = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection)); if (box == NULL) @@ -213,7 +213,7 @@ gtk_flow_box_accessible_get_selection_count (AtkSelection *selection) static gboolean gtk_flow_box_accessible_is_child_selected (AtkSelection *selection, - gint idx) + int idx) { GtkWidget *box; GtkFlowBoxChild *child; diff --git a/gtk/a11y/gtkiconviewaccessible.c b/gtk/a11y/gtkiconviewaccessible.c index db2d56d079..4a4fd8e9a1 100644 --- a/gtk/a11y/gtkiconviewaccessible.c +++ b/gtk/a11y/gtkiconviewaccessible.c @@ -96,7 +96,7 @@ idle_do_action (gpointer data) static gboolean gtk_icon_view_item_accessible_do_action (AtkAction *action, - gint i) + int i) { GtkIconViewItemAccessible *item; @@ -120,7 +120,7 @@ gtk_icon_view_item_accessible_do_action (AtkAction *action, return TRUE; } -static gint +static int gtk_icon_view_item_accessible_get_n_actions (AtkAction *action) { return 1; @@ -128,7 +128,7 @@ gtk_icon_view_item_accessible_get_n_actions (AtkAction *action) static const gchar * gtk_icon_view_item_accessible_get_description (AtkAction *action, - gint i) + int i) { GtkIconViewItemAccessible *item; @@ -145,7 +145,7 @@ gtk_icon_view_item_accessible_get_description (AtkAction *action, static const gchar * gtk_icon_view_item_accessible_get_name (AtkAction *action, - gint i) + int i) { if (i != 0) return NULL; @@ -155,7 +155,7 @@ gtk_icon_view_item_accessible_get_name (AtkAction *action, static gboolean gtk_icon_view_item_accessible_set_description (AtkAction *action, - gint i, + int i, const gchar *description) { GtkIconViewItemAccessible *item; @@ -273,8 +273,8 @@ get_text (GtkIconView *icon_view, static void gtk_icon_view_item_accessible_get_image_size (AtkImage *image, - gint *width, - gint *height) + int *width, + int *height) { GtkIconViewItemAccessible *item; GdkRectangle box; @@ -299,8 +299,8 @@ gtk_icon_view_item_accessible_get_image_size (AtkImage *image, static void gtk_icon_view_item_accessible_get_image_position (AtkImage *image, - gint *x, - gint *y, + int *x, + int *y, AtkCoordType coord_type) { GtkIconViewItemAccessible *item; @@ -336,8 +336,8 @@ atk_image_item_interface_init (AtkImageIface *iface) static gchar * gtk_icon_view_item_accessible_get_text (AtkText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkIconViewItemAccessible *item; @@ -353,7 +353,7 @@ gtk_icon_view_item_accessible_get_text (AtkText *text, static gunichar gtk_icon_view_item_accessible_get_character_at_offset (AtkText *text, - gint offset) + int offset) { GtkIconViewItemAccessible *item; gchar *string; @@ -388,10 +388,10 @@ create_pango_layout (GtkIconViewItemAccessible *item) static gchar * gtk_icon_view_item_accessible_get_text_before_offset (AtkText *atk_text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkIconViewItemAccessible *item; PangoLayout *layout; @@ -410,10 +410,10 @@ gtk_icon_view_item_accessible_get_text_before_offset (AtkText *atk_text, static gchar * gtk_icon_view_item_accessible_get_text_at_offset (AtkText *atk_text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkIconViewItemAccessible *item; PangoLayout *layout; @@ -432,10 +432,10 @@ gtk_icon_view_item_accessible_get_text_at_offset (AtkText *atk_text, static gchar * gtk_icon_view_item_accessible_get_text_after_offset (AtkText *atk_text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkIconViewItemAccessible *item; PangoLayout *layout; @@ -452,7 +452,7 @@ gtk_icon_view_item_accessible_get_text_after_offset (AtkText *atk_text, return text; } -static gint +static int gtk_icon_view_item_accessible_get_character_count (AtkText *text) { GtkIconViewItemAccessible *item; @@ -469,11 +469,11 @@ gtk_icon_view_item_accessible_get_character_count (AtkText *text) static void gtk_icon_view_item_accessible_get_character_extents (AtkText *text, - gint offset, - gint *x, - gint *y, - gint *width, - gint *height, + int offset, + int *x, + int *y, + int *width, + int *height, AtkCoordType coord_type) { GtkIconViewItemAccessible *item; @@ -481,7 +481,7 @@ gtk_icon_view_item_accessible_get_character_extents (AtkText *text, GtkIconView *icon_view; PangoRectangle char_rect; const gchar *item_text; - gint index; + int index; #endif item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text); @@ -510,19 +510,19 @@ gtk_icon_view_item_accessible_get_character_extents (AtkText *text, #endif } -static gint +static int gtk_icon_view_item_accessible_get_offset_at_point (AtkText *text, - gint x, - gint y, + int x, + int y, AtkCoordType coord_type) { GtkIconViewItemAccessible *item; - gint offset = 0; + int offset = 0; #if 0 GtkIconView *icon_view; const gchar *item_text; - gint index; - gint l_x, l_y; + int index; + int l_x, l_y; #endif item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text); @@ -575,15 +575,15 @@ atk_text_item_interface_init (AtkTextIface *iface) static void gtk_icon_view_item_accessible_get_extents (AtkComponent *component, - gint *x, - gint *y, - gint *width, - gint *height, + int *x, + int *y, + int *width, + int *height, AtkCoordType coord_type) { GtkIconViewItemAccessible *item; AtkObject *parent_obj; - gint l_x, l_y; + int l_x, l_y; g_return_if_fail (GTK_IS_ICON_VIEW_ITEM_ACCESSIBLE (component)); @@ -799,7 +799,7 @@ _gtk_icon_view_item_accessible_get_parent (AtkObject *obj) return NULL; } -static gint +static int _gtk_icon_view_item_accessible_get_index_in_parent (AtkObject *obj) { GtkIconViewItemAccessible *item; @@ -892,7 +892,7 @@ gtk_icon_view_item_accessible_info_new (GtkIconViewAccessible *self, priv->items = g_list_insert_before (priv->items, items, info); } -static gint +static int gtk_icon_view_accessible_get_n_children (AtkObject *accessible) { GtkIconView *icon_view; @@ -909,7 +909,7 @@ gtk_icon_view_accessible_get_n_children (AtkObject *accessible) static GtkIconViewItemAccessible * gtk_icon_view_accessible_find_child (GtkIconViewAccessible *self, - gint index) + int index) { GtkIconViewAccessiblePrivate *priv = gtk_icon_view_accessible_get_instance_private (self); GList *items; @@ -932,7 +932,7 @@ gtk_icon_view_accessible_find_child (GtkIconViewAccessible *self, static AtkObject * gtk_icon_view_accessible_ref_child (AtkObject *accessible, - gint index) + int index) { GtkIconViewAccessible *self = GTK_ICON_VIEW_ACCESSIBLE (accessible); GtkIconViewItemAccessible *a11y_item; @@ -1148,7 +1148,7 @@ gtk_icon_view_accessible_model_row_deleted (GtkTreeModel *tree_model, gtk_icon_view_accessible_traverse_items (self, tmp_list); } -static gint +static int gtk_icon_view_accessible_item_compare (ItemAccessibleInfo *i1, ItemAccessibleInfo *i2) { @@ -1159,7 +1159,7 @@ static void gtk_icon_view_accessible_model_rows_reordered (GtkTreeModel *tree_model, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order, + int *new_order, gpointer user_data) { GtkIconViewAccessible *self = user_data; @@ -1327,14 +1327,14 @@ gtk_icon_view_accessible_init (GtkIconViewAccessible *accessible) static AtkObject* gtk_icon_view_accessible_ref_accessible_at_point (AtkComponent *component, - gint x, - gint y, + int x, + int y, AtkCoordType coord_type) { GtkWidget *widget; GtkIconView *icon_view; GtkIconViewItem *item; - gint x_pos, y_pos; + int x_pos, y_pos; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component)); if (widget == NULL) @@ -1357,7 +1357,7 @@ atk_component_interface_init (AtkComponentIface *iface) static gboolean gtk_icon_view_accessible_add_selection (AtkSelection *selection, - gint i) + int i) { GtkWidget *widget; GtkIconView *icon_view; @@ -1396,7 +1396,7 @@ gtk_icon_view_accessible_clear_selection (AtkSelection *selection) static AtkObject* gtk_icon_view_accessible_ref_selection (AtkSelection *selection, - gint i) + int i) { GList *l; GtkWidget *widget; @@ -1426,14 +1426,14 @@ gtk_icon_view_accessible_ref_selection (AtkSelection *selection, return NULL; } -static gint +static int gtk_icon_view_accessible_get_selection_count (AtkSelection *selection) { GtkWidget *widget; GtkIconView *icon_view; GtkIconViewItem *item; GList *l; - gint count; + int count; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection)); if (widget == NULL) @@ -1458,7 +1458,7 @@ gtk_icon_view_accessible_get_selection_count (AtkSelection *selection) static gboolean gtk_icon_view_accessible_is_child_selected (AtkSelection *selection, - gint i) + int i) { GtkWidget *widget; GtkIconView *icon_view; @@ -1479,13 +1479,13 @@ gtk_icon_view_accessible_is_child_selected (AtkSelection *selection, static gboolean gtk_icon_view_accessible_remove_selection (AtkSelection *selection, - gint i) + int i) { GtkWidget *widget; GtkIconView *icon_view; GtkIconViewItem *item; GList *l; - gint count; + int count; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection)); if (widget == NULL) diff --git a/gtk/a11y/gtkimageaccessible.c b/gtk/a11y/gtkimageaccessible.c index e299f3d4cc..98e6d5843d 100644 --- a/gtk/a11y/gtkimageaccessible.c +++ b/gtk/a11y/gtkimageaccessible.c @@ -177,7 +177,7 @@ name_from_icon_name (const gchar *icon_name) { gchar *name; const gchar *label; - gint i; + int i; name = g_strdup (icon_name); if (g_str_has_suffix (name, "-symbolic")) @@ -281,8 +281,8 @@ gtk_image_accessible_get_image_description (AtkImage *image) static void gtk_image_accessible_get_image_position (AtkImage *image, - gint *x, - gint *y, + int *x, + int *y, AtkCoordType coord_type) { atk_component_get_extents (ATK_COMPONENT (image), x, y, NULL, NULL, @@ -291,8 +291,8 @@ gtk_image_accessible_get_image_position (AtkImage *image, static void gtk_image_accessible_get_image_size (AtkImage *image, - gint *width, - gint *height) + int *width, + int *height) { GtkWidget* widget; GtkImage *gtk_image; diff --git a/gtk/a11y/gtkimagecellaccessible.c b/gtk/a11y/gtkimagecellaccessible.c index 152c456c26..56827237f7 100644 --- a/gtk/a11y/gtkimagecellaccessible.c +++ b/gtk/a11y/gtkimagecellaccessible.c @@ -79,8 +79,8 @@ gtk_image_cell_accessible_set_image_description (AtkImage *image, static void gtk_image_cell_accessible_get_image_position (AtkImage *image, - gint *x, - gint *y, + int *x, + int *y, AtkCoordType coord_type) { atk_component_get_extents (ATK_COMPONENT (image), x, y, NULL, NULL, @@ -89,8 +89,8 @@ gtk_image_cell_accessible_get_image_position (AtkImage *image, static void gtk_image_cell_accessible_get_image_size (AtkImage *image, - gint *width, - gint *height) + int *width, + int *height) { GtkImageCellAccessible *cell = GTK_IMAGE_CELL_ACCESSIBLE (image); GtkCellRenderer *cell_renderer; diff --git a/gtk/a11y/gtklabelaccessible.c b/gtk/a11y/gtklabelaccessible.c index 2048a7c0b3..7c53c309f0 100644 --- a/gtk/a11y/gtklabelaccessible.c +++ b/gtk/a11y/gtklabelaccessible.c @@ -29,8 +29,8 @@ struct _GtkLabelAccessiblePrivate { - gint cursor_position; - gint selection_bound; + int cursor_position; + int selection_bound; GList *links; }; @@ -43,7 +43,7 @@ struct _GtkLabelAccessibleLink AtkHyperlink parent; GtkLabelAccessible *label; - gint index; + int index; gboolean focused; }; @@ -53,7 +53,7 @@ struct _GtkLabelAccessibleLinkClass }; static GtkLabelAccessibleLink *gtk_label_accessible_link_new (GtkLabelAccessible *label, - gint idx); + int idx); typedef struct _GtkLabelAccessibleLinkImpl GtkLabelAccessibleLinkImpl; typedef struct _GtkLabelAccessibleLinkImplClass GtkLabelAccessibleLinkImplClass; @@ -153,7 +153,7 @@ _gtk_label_accessible_link_impl_class_init (GtkLabelAccessibleLinkImplClass *cla static GtkLabelAccessibleLinkImpl * gtk_label_accessible_link_impl_new (GtkLabelAccessible *label, - gint idx) + int idx) { GtkLabelAccessibleLinkImpl *impl; @@ -175,7 +175,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkLabelAccessibleLink, _gtk_label_accessible_link, ATK static gchar * gtk_label_accessible_link_get_uri (AtkHyperlink *atk_link, - gint i) + int i) { GtkLabelAccessibleLink *link = (GtkLabelAccessibleLink *)atk_link; GtkWidget *widget; @@ -192,7 +192,7 @@ gtk_label_accessible_link_get_uri (AtkHyperlink *atk_link, return g_strdup (uri); } -static gint +static int gtk_label_accessible_link_get_n_anchors (AtkHyperlink *atk_link) { return 1; @@ -206,7 +206,7 @@ gtk_label_accessible_link_is_valid (AtkHyperlink *atk_link) static AtkObject * gtk_label_accessible_link_get_object (AtkHyperlink *atk_link, - gint i) + int i) { GtkLabelAccessibleLink *link = (GtkLabelAccessibleLink *)atk_link; @@ -215,12 +215,12 @@ gtk_label_accessible_link_get_object (AtkHyperlink *atk_link, return ATK_OBJECT (link->label); } -static gint +static int gtk_label_accessible_link_get_start_index (AtkHyperlink *atk_link) { GtkLabelAccessibleLink *link = (GtkLabelAccessibleLink *)atk_link; GtkWidget *widget; - gint start, end; + int start, end; if (link->label == NULL) return 0; @@ -231,12 +231,12 @@ gtk_label_accessible_link_get_start_index (AtkHyperlink *atk_link) return start; } -static gint +static int gtk_label_accessible_link_get_end_index (AtkHyperlink *atk_link) { GtkLabelAccessibleLink *link = (GtkLabelAccessibleLink *)atk_link; GtkWidget *widget; - gint start, end; + int start, end; if (link->label == NULL) return 0; @@ -269,7 +269,7 @@ _gtk_label_accessible_link_class_init (GtkLabelAccessibleLinkClass *class) static GtkLabelAccessibleLink * gtk_label_accessible_link_new (GtkLabelAccessible *label, - gint idx) + int idx) { GtkLabelAccessibleLink *link; @@ -284,7 +284,7 @@ gtk_label_accessible_link_new (GtkLabelAccessible *label, static gboolean gtk_label_accessible_link_do_action (AtkAction *action, - gint i) + int i) { GtkLabelAccessibleLink *link = (GtkLabelAccessibleLink *)action; GtkWidget *widget; @@ -307,7 +307,7 @@ gtk_label_accessible_link_do_action (AtkAction *action, return TRUE; } -static gint +static int gtk_label_accessible_link_get_n_actions (AtkAction *action) { return 1; @@ -315,7 +315,7 @@ gtk_label_accessible_link_get_n_actions (AtkAction *action) static const gchar * gtk_label_accessible_link_get_name (AtkAction *action, - gint i) + int i) { if (i != 0) return NULL; @@ -380,7 +380,7 @@ check_for_selection_change (GtkLabelAccessible *accessible, GtkLabel *label) { gboolean ret_val = FALSE; - gint start, end; + int start, end; if (gtk_label_get_selection_bounds (label, &start, &end)) { @@ -485,7 +485,7 @@ gtk_label_accessible_get_name (AtkObject *accessible) } } -static gint +static int gtk_label_accessible_get_n_children (AtkObject *obj) { GtkLabelAccessible *accessible = GTK_LABEL_ACCESSIBLE (obj); @@ -495,7 +495,7 @@ gtk_label_accessible_get_n_children (AtkObject *obj) static AtkObject * gtk_label_accessible_ref_child (AtkObject *obj, - gint idx) + int idx) { GtkLabelAccessible *accessible = GTK_LABEL_ACCESSIBLE (obj); AtkObject *child; @@ -612,7 +612,7 @@ static void clear_links (GtkLabelAccessible *accessible) { GList *l; - gint i; + int i; GtkLabelAccessibleLinkImpl *impl; for (l = accessible->priv->links, i = 0; l; l = l->next, i++) @@ -630,7 +630,7 @@ static void create_links (GtkLabelAccessible *accessible) { GtkWidget *widget; - gint n, i; + int n, i; GtkLabelAccessibleLinkImpl *impl; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)); @@ -688,8 +688,8 @@ _gtk_label_accessible_focus_link_changed (GtkLabel *label) static gchar* gtk_label_accessible_get_text (AtkText *atk_text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; const gchar *text; @@ -722,10 +722,10 @@ gtk_label_accessible_get_text (AtkText *atk_text, static gchar * gtk_label_accessible_get_text_before_offset (AtkText *text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkWidget *widget; @@ -740,10 +740,10 @@ gtk_label_accessible_get_text_before_offset (AtkText *text, static gchar* gtk_label_accessible_get_text_at_offset (AtkText *text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkWidget *widget; @@ -758,10 +758,10 @@ gtk_label_accessible_get_text_at_offset (AtkText *text, static gchar* gtk_label_accessible_get_text_after_offset (AtkText *text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkWidget *widget; @@ -774,7 +774,7 @@ gtk_label_accessible_get_text_after_offset (AtkText *text, start_offset, end_offset); } -static gint +static int gtk_label_accessible_get_character_count (AtkText *atk_text) { GtkWidget *widget; @@ -792,7 +792,7 @@ gtk_label_accessible_get_character_count (AtkText *atk_text) return 0; } -static gint +static int gtk_label_accessible_get_caret_offset (AtkText *text) { GtkWidget *widget; @@ -810,7 +810,7 @@ gtk_label_accessible_get_caret_offset (AtkText *text) static gboolean gtk_label_accessible_set_caret_offset (AtkText *text, - gint offset) + int offset) { GtkWidget *widget; GtkLabel *label; @@ -829,7 +829,7 @@ gtk_label_accessible_set_caret_offset (AtkText *text, return TRUE; } -static gint +static int gtk_label_accessible_get_n_selections (AtkText *text) { GtkWidget *widget; @@ -846,9 +846,9 @@ gtk_label_accessible_get_n_selections (AtkText *text) static gchar * gtk_label_accessible_get_selection (AtkText *atk_text, - gint selection_num, - gint *start_pos, - gint *end_pos) + int selection_num, + int *start_pos, + int *end_pos) { GtkWidget *widget; GtkLabel *label; @@ -877,12 +877,12 @@ gtk_label_accessible_get_selection (AtkText *atk_text, static gboolean gtk_label_accessible_add_selection (AtkText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; GtkLabel *label; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -904,11 +904,11 @@ gtk_label_accessible_add_selection (AtkText *text, static gboolean gtk_label_accessible_remove_selection (AtkText *text, - gint selection_num) + int selection_num) { GtkWidget *widget; GtkLabel *label; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -933,13 +933,13 @@ gtk_label_accessible_remove_selection (AtkText *text, static gboolean gtk_label_accessible_set_selection (AtkText *text, - gint selection_num, - gint start_pos, - gint end_pos) + int selection_num, + int start_pos, + int end_pos) { GtkWidget *widget; GtkLabel *label; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -964,18 +964,18 @@ gtk_label_accessible_set_selection (AtkText *text, static void gtk_label_accessible_get_character_extents (AtkText *text, - gint offset, - gint *x, - gint *y, - gint *width, - gint *height, + int offset, + int *x, + int *y, + int *width, + int *height, AtkCoordType coords) { GtkWidget *widget; GtkLabel *label; PangoRectangle char_rect; const gchar *label_text; - gint index, x_layout, y_layout; + int index, x_layout, y_layout; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -995,17 +995,17 @@ gtk_label_accessible_get_character_extents (AtkText *text, *height = char_rect.height; } -static gint +static int gtk_label_accessible_get_offset_at_point (AtkText *atk_text, - gint x, - gint y, + int x, + int y, AtkCoordType coords) { GtkWidget *widget; GtkLabel *label; const gchar *text; - gint index, x_layout, y_layout; - gint x_local, y_local; + int index, x_layout, y_layout; + int x_local, y_local; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_text)); if (widget == NULL) @@ -1054,9 +1054,9 @@ add_attribute (AtkAttributeSet *attributes, static AtkAttributeSet* gtk_label_accessible_get_run_attributes (AtkText *text, - gint offset, - gint *start_offset, - gint *end_offset) + int offset, + int *start_offset, + int *end_offset) { GtkWidget *widget; AtkAttributeSet *attributes; @@ -1102,7 +1102,7 @@ gtk_label_accessible_get_default_attributes (AtkText *text) static gunichar gtk_label_accessible_get_character_at_offset (AtkText *atk_text, - gint offset) + int offset) { GtkWidget *widget; const gchar *text; @@ -1147,7 +1147,7 @@ atk_text_interface_init (AtkTextIface *iface) static AtkHyperlink * gtk_label_accessible_get_link (AtkHypertext *hypertext, - gint idx) + int idx) { GtkLabelAccessible *label = GTK_LABEL_ACCESSIBLE (hypertext); GtkLabelAccessibleLinkImpl *impl; @@ -1160,7 +1160,7 @@ gtk_label_accessible_get_link (AtkHypertext *hypertext, return NULL; } -static gint +static int gtk_label_accessible_get_n_links (AtkHypertext *hypertext) { GtkWidget *widget; @@ -1170,9 +1170,9 @@ gtk_label_accessible_get_n_links (AtkHypertext *hypertext) return _gtk_label_get_n_links (GTK_LABEL (widget)); } -static gint +static int gtk_label_accessible_get_link_index (AtkHypertext *hypertext, - gint char_index) + int char_index) { GtkWidget *widget; diff --git a/gtk/a11y/gtklinkbuttonaccessible.c b/gtk/a11y/gtklinkbuttonaccessible.c index 6953cef85e..1a218940a1 100644 --- a/gtk/a11y/gtklinkbuttonaccessible.c +++ b/gtk/a11y/gtklinkbuttonaccessible.c @@ -60,7 +60,7 @@ gtk_link_button_accessible_link_new (GtkLinkButtonAccessible *button) static gchar * gtk_link_button_accessible_link_get_uri (AtkHyperlink *atk_link, - gint i) + int i) { GtkLinkButtonAccessibleLink *l = (GtkLinkButtonAccessibleLink *)atk_link; GtkWidget *widget; @@ -72,7 +72,7 @@ gtk_link_button_accessible_link_get_uri (AtkHyperlink *atk_link, return g_strdup (uri); } -static gint +static int gtk_link_button_accessible_link_get_n_anchors (AtkHyperlink *atk_link) { return 1; @@ -86,7 +86,7 @@ gtk_link_button_accessible_link_is_valid (AtkHyperlink *atk_link) static AtkObject * gtk_link_button_accessible_link_get_object (AtkHyperlink *atk_link, - gint i) + int i) { GtkLinkButtonAccessibleLink *l = (GtkLinkButtonAccessibleLink *)atk_link; @@ -111,7 +111,7 @@ _gtk_link_button_accessible_link_class_init (GtkLinkButtonAccessibleLinkClass *c static gboolean gtk_link_button_accessible_link_do_action (AtkAction *action, - gint i) + int i) { GtkLinkButtonAccessibleLink *l = (GtkLinkButtonAccessibleLink *)action; GtkWidget *widget; @@ -131,7 +131,7 @@ gtk_link_button_accessible_link_do_action (AtkAction *action, return TRUE; } -static gint +static int gtk_link_button_accessible_link_get_n_actions (AtkAction *action) { return 1; @@ -139,7 +139,7 @@ gtk_link_button_accessible_link_get_n_actions (AtkAction *action) static const gchar * gtk_link_button_accessible_link_get_name (AtkAction *action, - gint i) + int i) { if (i != 0) return NULL; diff --git a/gtk/a11y/gtklistboxaccessible.c b/gtk/a11y/gtklistboxaccessible.c index f28581fd70..6ee7801337 100644 --- a/gtk/a11y/gtklistboxaccessible.c +++ b/gtk/a11y/gtklistboxaccessible.c @@ -66,7 +66,7 @@ gtk_list_box_accessible_class_init (GtkListBoxAccessibleClass *klass) static gboolean gtk_list_box_accessible_add_selection (AtkSelection *selection, - gint idx) + int idx) { GtkWidget *box; GtkListBoxRow *row; @@ -86,7 +86,7 @@ gtk_list_box_accessible_add_selection (AtkSelection *selection, static gboolean gtk_list_box_accessible_remove_selection (AtkSelection *selection, - gint idx) + int idx) { GtkWidget *box; GtkListBoxRow *row; @@ -132,7 +132,7 @@ gtk_list_box_accessible_select_all (AtkSelection *selection) typedef struct { - gint idx; + int idx; GtkWidget *row; } FindSelectedData; @@ -154,7 +154,7 @@ find_selected_row (GtkListBox *box, static AtkObject * gtk_list_box_accessible_ref_selection (AtkSelection *selection, - gint idx) + int idx) { GtkWidget *box; AtkObject *accessible; @@ -181,15 +181,15 @@ count_selected (GtkListBox *box, GtkListBoxRow *row, gpointer data) { - gint *count = data; + int *count = data; *count += 1; } -static gint +static int gtk_list_box_accessible_get_selection_count (AtkSelection *selection) { GtkWidget *box; - gint count; + int count; box = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection)); if (box == NULL) @@ -203,7 +203,7 @@ gtk_list_box_accessible_get_selection_count (AtkSelection *selection) static gboolean gtk_list_box_accessible_is_child_selected (AtkSelection *selection, - gint idx) + int idx) { GtkWidget *box; GtkListBoxRow *row; diff --git a/gtk/a11y/gtkmenubuttonaccessible.c b/gtk/a11y/gtkmenubuttonaccessible.c index 75482cfc21..914fa704f5 100644 --- a/gtk/a11y/gtkmenubuttonaccessible.c +++ b/gtk/a11y/gtkmenubuttonaccessible.c @@ -33,11 +33,11 @@ gtk_menu_button_accessible_initialize (AtkObject *accessible, accessible->role = ATK_ROLE_TOGGLE_BUTTON; } -static gint +static int gtk_menu_button_accessible_get_n_children (AtkObject* obj) { GtkWidget *widget; - gint count = 0; + int count = 0; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); if (widget == NULL) @@ -48,7 +48,7 @@ gtk_menu_button_accessible_get_n_children (AtkObject* obj) static AtkObject * gtk_menu_button_accessible_ref_child (AtkObject *obj, - gint i) + int i) { AtkObject *accessible = NULL; GtkWidget *widget; diff --git a/gtk/a11y/gtknotebookaccessible.c b/gtk/a11y/gtknotebookaccessible.c index 468e2a4206..9fb930cd4e 100644 --- a/gtk/a11y/gtknotebookaccessible.c +++ b/gtk/a11y/gtknotebookaccessible.c @@ -33,7 +33,7 @@ struct _GtkNotebookAccessiblePrivate * need to be created */ GHashTable * pages; - gint selected_page; + int selected_page; }; static void atk_selection_interface_init (AtkSelectionIface *iface); @@ -46,7 +46,7 @@ static void create_notebook_page_accessible (GtkNotebookAccessible *accessible, GtkNotebook *notebook, GtkWidget *child, - gint page_num) + int page_num) { AtkObject *obj; @@ -96,7 +96,7 @@ gtk_notebook_accessible_initialize (AtkObject *obj, { GtkNotebookAccessible *accessible; GtkNotebook *notebook; - gint i; + int i; ATK_OBJECT_CLASS (gtk_notebook_accessible_parent_class)->initialize (obj, data); @@ -131,7 +131,7 @@ gtk_notebook_accessible_finalize (GObject *object) static AtkObject * gtk_notebook_accessible_ref_child (AtkObject *obj, - gint i) + int i) { AtkObject *child; GtkNotebookAccessible *accessible; @@ -199,7 +199,7 @@ gtk_notebook_accessible_update_page (GtkNotebookAccessible *self, */ static gboolean gtk_notebook_accessible_add_selection (AtkSelection *selection, - gint i) + int i) { GtkNotebook *notebook; GtkWidget *widget; @@ -238,12 +238,12 @@ gtk_notebook_accessible_init (GtkNotebookAccessible *notebook) static AtkObject * gtk_notebook_accessible_ref_selection (AtkSelection *selection, - gint i) + int i) { AtkObject *accessible; GtkWidget *widget; GtkNotebook *notebook; - gint pagenum; + int pagenum; if (i != 0) return NULL; @@ -264,7 +264,7 @@ gtk_notebook_accessible_ref_selection (AtkSelection *selection, /* Always return 1 because there can only be one page * selected at any time */ -static gint +static int gtk_notebook_accessible_get_selection_count (AtkSelection *selection) { GtkWidget *widget; @@ -283,11 +283,11 @@ gtk_notebook_accessible_get_selection_count (AtkSelection *selection) static gboolean gtk_notebook_accessible_is_child_selected (AtkSelection *selection, - gint i) + int i) { GtkWidget *widget; GtkNotebook *notebook; - gint pagenumber; + int pagenumber; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection)); if (widget == NULL) diff --git a/gtk/a11y/gtknotebookpageaccessible.c b/gtk/a11y/gtknotebookpageaccessible.c index 09d089ebe3..dfa199ad51 100644 --- a/gtk/a11y/gtknotebookpageaccessible.c +++ b/gtk/a11y/gtknotebookpageaccessible.c @@ -103,7 +103,7 @@ gtk_notebook_page_accessible_get_parent (AtkObject *accessible) return ATK_OBJECT (page->priv->notebook); } -static gint +static int gtk_notebook_page_accessible_get_n_children (AtkObject *accessible) { return 1; @@ -111,7 +111,7 @@ gtk_notebook_page_accessible_get_n_children (AtkObject *accessible) static AtkObject * gtk_notebook_page_accessible_ref_child (AtkObject *accessible, - gint i) + int i) { AtkObject *child_obj; GtkNotebookPageAccessible *page = NULL; @@ -185,7 +185,7 @@ gtk_notebook_page_accessible_ref_state_set (AtkObject *accessible) return merged_state_set; } -static gint +static int gtk_notebook_page_accessible_get_index_in_parent (AtkObject *accessible) { GtkNotebookPageAccessible *page; @@ -278,8 +278,8 @@ gtk_notebook_page_accessible_invalidate (GtkNotebookPageAccessible *page) static AtkObject* gtk_notebook_page_accessible_ref_accessible_at_point (AtkComponent *component, - gint x, - gint y, + int x, + int y, AtkCoordType coord_type) { /* There is only one child so we return it */ @@ -292,10 +292,10 @@ gtk_notebook_page_accessible_ref_accessible_at_point (AtkComponent *component, static void gtk_notebook_page_accessible_get_extents (AtkComponent *component, - gint *x, - gint *y, - gint *width, - gint *height, + int *x, + int *y, + int *width, + int *height, AtkCoordType coord_type) { GtkWidget *label; diff --git a/gtk/a11y/gtkpanedaccessible.c b/gtk/a11y/gtkpanedaccessible.c index ba574485d8..8d2791166a 100644 --- a/gtk/a11y/gtkpanedaccessible.c +++ b/gtk/a11y/gtkpanedaccessible.c @@ -64,7 +64,7 @@ gtk_paned_accessible_get_current_value (AtkValue *obj, GValue *value) { GtkWidget* widget; - gint current_value; + int current_value; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); if (widget == NULL) @@ -81,7 +81,7 @@ gtk_paned_accessible_get_maximum_value (AtkValue *obj, GValue *value) { GtkWidget* widget; - gint maximum_value; + int maximum_value; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); if (widget == NULL) @@ -100,7 +100,7 @@ gtk_paned_accessible_get_minimum_value (AtkValue *obj, GValue *value) { GtkWidget* widget; - gint minimum_value; + int minimum_value; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); if (widget == NULL) @@ -124,7 +124,7 @@ gtk_paned_accessible_set_current_value (AtkValue *obj, const GValue *value) { GtkWidget* widget; - gint new_value; + int new_value; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); if (widget == NULL) @@ -160,8 +160,8 @@ static AtkRange * gtk_paned_accessible_get_range (AtkValue *obj) { GtkWidget *widget; - gint minimum_value; - gint maximum_value; + int minimum_value; + int maximum_value; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); @@ -183,7 +183,7 @@ gtk_paned_accessible_set_value (AtkValue *obj, widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); paned = GTK_PANED (widget); - gtk_paned_set_position (paned, (gint)(value + 0.5)); + gtk_paned_set_position (paned, (int)(value + 0.5)); } static void diff --git a/gtk/a11y/gtkpasswordentryaccessible.c b/gtk/a11y/gtkpasswordentryaccessible.c index 3b3236767f..9cb060ad22 100644 --- a/gtk/a11y/gtkpasswordentryaccessible.c +++ b/gtk/a11y/gtkpasswordentryaccessible.c @@ -63,7 +63,7 @@ get_text_widget (GtkAccessible *accessible) static gunichar gtk_password_entry_accessible_get_character_at_offset (AtkText *atk_text, - gint offset) + int offset) { GtkText *text; char *contents, *index; @@ -89,7 +89,7 @@ gtk_password_entry_accessible_get_character_at_offset (AtkText *atk_text, return result; } -static gint +static int gtk_password_entry_accessible_get_caret_offset (AtkText *atk_text) { GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_text)); @@ -107,7 +107,7 @@ gtk_password_entry_accessible_get_caret_offset (AtkText *atk_text) static gboolean gtk_password_entry_accessible_set_caret_offset (AtkText *atk_text, - gint offset) + int offset) { GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_text)); if (widget == NULL) @@ -118,7 +118,7 @@ gtk_password_entry_accessible_set_caret_offset (AtkText *atk_text, return TRUE; } -static gint +static int gtk_password_entry_accessible_get_character_count (AtkText *atk_text) { GtkText *text = get_text_widget (GTK_ACCESSIBLE (atk_text)); @@ -137,10 +137,10 @@ gtk_password_entry_accessible_get_character_count (AtkText *atk_text) return char_count; } -static gint +static int gtk_password_entry_accessible_get_offset_at_point (AtkText *atk_text, - gint x, - gint y, + int x, + int y, AtkCoordType coords) { GtkText *text = get_text_widget (GTK_ACCESSIBLE (atk_text)); @@ -207,8 +207,8 @@ gtk_password_entry_accessible_set_text_contents (AtkEditableText *text, static void gtk_password_entry_accessible_insert_text (AtkEditableText *text, const gchar *string, - gint length, - gint *position) + int length, + int *position) { GtkWidget *widget; GtkEditable *editable; @@ -234,8 +234,8 @@ gtk_password_entry_accessible_insert_text (AtkEditableText *text, static void gtk_password_entry_accessible_delete_text (AtkEditableText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; GtkEditable *editable; @@ -278,7 +278,7 @@ paste_received_cb (GObject *clipboard, static void gtk_password_entry_accessible_paste_text (AtkEditableText *text, - gint position) + int position) { GtkWidget *widget; GtkEditable *editable; @@ -316,7 +316,7 @@ atk_editable_text_interface_init (AtkEditableTextIface *iface) static gboolean gtk_password_entry_accessible_do_action (AtkAction *action, - gint i) + int i) { GtkWidget *widget; @@ -346,7 +346,7 @@ gtk_password_entry_accessible_do_action (AtkAction *action, return FALSE; } -static gint +static int gtk_password_entry_accessible_get_n_actions (AtkAction *action) { GtkAccessible *accessible = GTK_ACCESSIBLE (action); @@ -364,7 +364,7 @@ gtk_password_entry_accessible_get_n_actions (AtkAction *action) static const gchar * gtk_password_entry_accessible_get_keybinding (AtkAction *action, - gint i) + int i) { GtkWidget *widget; GtkWidget *label; @@ -409,7 +409,7 @@ gtk_password_entry_accessible_get_keybinding (AtkAction *action, static const gchar * gtk_password_entry_accessible_action_get_name (AtkAction *action, - gint i) + int i) { switch (i) { @@ -428,7 +428,7 @@ gtk_password_entry_accessible_action_get_name (AtkAction *action, static const gchar* gtk_password_entry_accessible_action_get_localized_name (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action name", "Activate"); @@ -440,7 +440,7 @@ gtk_password_entry_accessible_action_get_localized_name (AtkAction *action, static const gchar * gtk_password_entry_accessible_action_get_description (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action description", "Activates the entry"); @@ -494,7 +494,7 @@ check_for_selection_change (GtkPasswordEntryAccessible *self, GtkEditable *editable) { gboolean ret_val = FALSE; - gint start, end; + int start, end; if (gtk_editable_get_selection_bounds (editable, &start, &end)) { @@ -552,8 +552,8 @@ on_selection_bound_changed (GObject *gobject, static void insert_text_cb (GtkEditable *editable, gchar *new_text, - gint new_text_length, - gint *position, + int new_text_length, + int *position, GtkPasswordEntryAccessible *self) { int length; @@ -571,8 +571,8 @@ insert_text_cb (GtkEditable *editable, static void delete_text_cb (GtkEditable *editable, - gint start, - gint end, + int start, + int end, GtkPasswordEntryAccessible *self) { GtkText *text; diff --git a/gtk/a11y/gtkpictureaccessible.c b/gtk/a11y/gtkpictureaccessible.c index 9f49eaf855..ce8b449557 100644 --- a/gtk/a11y/gtkpictureaccessible.c +++ b/gtk/a11y/gtkpictureaccessible.c @@ -47,8 +47,8 @@ gtk_picture_accessible_get_image_description (AtkImage *image) static void gtk_picture_accessible_get_image_position (AtkImage *image, - gint *x, - gint *y, + int *x, + int *y, AtkCoordType coord_type) { atk_component_get_extents (ATK_COMPONENT (image), x, y, NULL, NULL, @@ -57,8 +57,8 @@ gtk_picture_accessible_get_image_position (AtkImage *image, static void gtk_picture_accessible_get_image_size (AtkImage *image, - gint *width, - gint *height) + int *width, + int *height) { GtkWidget* widget; GdkPaintable *paintable; diff --git a/gtk/a11y/gtkradiobuttonaccessible.c b/gtk/a11y/gtkradiobuttonaccessible.c index df5392bb36..4670d14f7a 100644 --- a/gtk/a11y/gtkradiobuttonaccessible.c +++ b/gtk/a11y/gtkradiobuttonaccessible.c @@ -75,7 +75,7 @@ gtk_radio_button_accessible_ref_relation_set (AtkObject *obj) AtkObject **accessible_array; guint list_length; AtkRelation* relation; - gint i = 0; + int i = 0; list_length = g_slist_length (list); accessible_array = g_new (AtkObject *, list_length); diff --git a/gtk/a11y/gtkscalebuttonaccessible.c b/gtk/a11y/gtkscalebuttonaccessible.c index caf8fff4af..33e01b2150 100644 --- a/gtk/a11y/gtkscalebuttonaccessible.c +++ b/gtk/a11y/gtkscalebuttonaccessible.c @@ -128,7 +128,7 @@ gtk_scale_button_accessible_init (GtkScaleButtonAccessible *self) static gboolean gtk_scale_button_accessible_do_action (AtkAction *action, - gint i) + int i) { GtkWidget *widget; @@ -152,7 +152,7 @@ gtk_scale_button_accessible_do_action (AtkAction *action, } } -static gint +static int gtk_scale_button_accessible_get_n_actions (AtkAction *action) { return 2; @@ -160,7 +160,7 @@ gtk_scale_button_accessible_get_n_actions (AtkAction *action) static const gchar * gtk_scale_button_accessible_get_description (AtkAction *action, - gint i) + int i) { switch (i) { @@ -175,7 +175,7 @@ gtk_scale_button_accessible_get_description (AtkAction *action, static const gchar * gtk_scale_button_accessible_action_get_name (AtkAction *action, - gint i) + int i) { switch (i) { @@ -190,7 +190,7 @@ gtk_scale_button_accessible_action_get_name (AtkAction *action, static const gchar * gtk_scale_button_accessible_action_get_localized_name (AtkAction *action, - gint i) + int i) { switch (i) { diff --git a/gtk/a11y/gtkscrolledwindowaccessible.c b/gtk/a11y/gtkscrolledwindowaccessible.c index fc2822686e..9856f858b2 100644 --- a/gtk/a11y/gtkscrolledwindowaccessible.c +++ b/gtk/a11y/gtkscrolledwindowaccessible.c @@ -30,8 +30,8 @@ visibility_changed (GObject *object, { if (!g_strcmp0 (pspec->name, "visible")) { - gint index; - gint n_children; + int index; + int n_children; gboolean child_added = FALSE; AtkObject *child; GtkWidget *widget; @@ -104,7 +104,7 @@ gtk_scrolled_window_accessible_get_n_children (AtkObject *object) { GtkWidget *widget; GtkScrolledWindow *scrolled_window; - gint n_children; + int n_children; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (object)); if (widget == NULL) @@ -125,7 +125,7 @@ gtk_scrolled_window_accessible_get_n_children (AtkObject *object) static AtkObject * gtk_scrolled_window_accessible_ref_child (AtkObject *obj, - gint child) + int child) { GtkWidget *widget; GtkScrolledWindow *scrolled_window; diff --git a/gtk/a11y/gtksearchentryaccessible.c b/gtk/a11y/gtksearchentryaccessible.c index eab4012e53..47b23e1167 100644 --- a/gtk/a11y/gtksearchentryaccessible.c +++ b/gtk/a11y/gtksearchentryaccessible.c @@ -65,7 +65,7 @@ check_for_selection_change (GtkSearchEntryAccessible *self, GtkEditable *editable) { gboolean ret_val = FALSE; - gint start, end; + int start, end; if (gtk_editable_get_selection_bounds (editable, &start, &end)) { @@ -95,8 +95,8 @@ check_for_selection_change (GtkSearchEntryAccessible *self, static void insert_text_cb (GtkEditable *editable, gchar *new_text, - gint new_text_length, - gint *position, + int new_text_length, + int *position, GtkSearchEntryAccessible *self) { int length; @@ -114,8 +114,8 @@ insert_text_cb (GtkEditable *editable, static void delete_text_cb (GtkEditable *editable, - gint start, - gint end, + int start, + int end, GtkSearchEntryAccessible *self) { GtkText *text; @@ -280,8 +280,8 @@ gtk_search_entry_accessible_init (GtkSearchEntryAccessible *self) static gchar * gtk_search_entry_accessible_get_text (AtkText *atk_text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkText *text = get_text_widget (GTK_ACCESSIBLE (atk_text)); @@ -293,10 +293,10 @@ gtk_search_entry_accessible_get_text (AtkText *atk_text, static gchar * gtk_search_entry_accessible_get_text_before_offset (AtkText *atk_text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkText *text = get_text_widget (GTK_ACCESSIBLE (atk_text)); @@ -310,10 +310,10 @@ gtk_search_entry_accessible_get_text_before_offset (AtkText *atk_text, static gchar * gtk_search_entry_accessible_get_text_at_offset (AtkText *atk_text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkText *text = get_text_widget (GTK_ACCESSIBLE (atk_text)); @@ -327,10 +327,10 @@ gtk_search_entry_accessible_get_text_at_offset (AtkText *atk_text, static gchar * gtk_search_entry_accessible_get_text_after_offset (AtkText *atk_text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkText *text = get_text_widget (GTK_ACCESSIBLE (atk_text)); @@ -342,7 +342,7 @@ gtk_search_entry_accessible_get_text_after_offset (AtkText *atk_text, start_offset, end_offset); } -static gint +static int gtk_search_entry_accessible_get_character_count (AtkText *atk_text) { GtkText *text = get_text_widget (GTK_ACCESSIBLE (atk_text)); @@ -361,7 +361,7 @@ gtk_search_entry_accessible_get_character_count (AtkText *atk_text) return char_count; } -static gint +static int gtk_search_entry_accessible_get_caret_offset (AtkText *atk_text) { GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_text)); @@ -379,7 +379,7 @@ gtk_search_entry_accessible_get_caret_offset (AtkText *atk_text) static gboolean gtk_search_entry_accessible_set_caret_offset (AtkText *atk_text, - gint offset) + int offset) { GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_text)); if (widget == NULL) @@ -393,7 +393,7 @@ gtk_search_entry_accessible_set_caret_offset (AtkText *atk_text, static AtkAttributeSet * add_text_attribute (AtkAttributeSet *attributes, AtkTextAttribute attr, - gint i) + int i) { AtkAttribute *at; @@ -406,9 +406,9 @@ add_text_attribute (AtkAttributeSet *attributes, static AtkAttributeSet * gtk_search_entry_accessible_get_run_attributes (AtkText *atk_text, - gint offset, - gint *start_offset, - gint *end_offset) + int offset, + int *start_offset, + int *end_offset) { GtkText *text = get_text_widget (GTK_ACCESSIBLE (atk_text)); @@ -448,11 +448,11 @@ gtk_search_entry_accessible_get_default_attributes (AtkText *atk_text) static void gtk_search_entry_accessible_get_character_extents (AtkText *atk_text, - gint offset, - gint *x, - gint *y, - gint *width, - gint *height, + int offset, + int *x, + int *y, + int *width, + int *height, AtkCoordType coords) { GtkText *text = get_text_widget (GTK_ACCESSIBLE (atk_text)); @@ -480,10 +480,10 @@ gtk_search_entry_accessible_get_character_extents (AtkText *atk_text, *height = char_rect.height; } -static gint +static int gtk_search_entry_accessible_get_offset_at_point (AtkText *atk_text, - gint x, - gint y, + int x, + int y, AtkCoordType coords) { GtkText *text = get_text_widget (GTK_ACCESSIBLE (atk_text)); @@ -521,11 +521,11 @@ gtk_search_entry_accessible_get_offset_at_point (AtkText *atk_text, return offset; } -static gint +static int gtk_search_entry_accessible_get_n_selections (AtkText *text) { GtkWidget *widget; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -539,9 +539,9 @@ gtk_search_entry_accessible_get_n_selections (AtkText *text) static gchar * gtk_search_entry_accessible_get_selection (AtkText *text, - gint selection_num, - gint *start_pos, - gint *end_pos) + int selection_num, + int *start_pos, + int *end_pos) { GtkEditable *editable; GtkWidget *widget; @@ -570,8 +570,8 @@ gtk_search_entry_accessible_get_selection (AtkText *text, static gboolean gtk_search_entry_accessible_add_selection (AtkText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkEntry *entry; GtkWidget *widget; @@ -594,10 +594,10 @@ gtk_search_entry_accessible_add_selection (AtkText *text, static gboolean gtk_search_entry_accessible_remove_selection (AtkText *text, - gint selection_num) + int selection_num) { GtkWidget *widget; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -617,12 +617,12 @@ gtk_search_entry_accessible_remove_selection (AtkText *text, static gboolean gtk_search_entry_accessible_set_selection (AtkText *text, - gint selection_num, - gint start_pos, - gint end_pos) + int selection_num, + int start_pos, + int end_pos) { GtkWidget *widget; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -642,7 +642,7 @@ gtk_search_entry_accessible_set_selection (AtkText *text, static gunichar gtk_search_entry_accessible_get_character_at_offset (AtkText *atk_text, - gint offset) + int offset) { GtkText *text; char *contents; @@ -710,8 +710,8 @@ gtk_search_entry_accessible_set_text_contents (AtkEditableText *text, static void gtk_search_entry_accessible_insert_text (AtkEditableText *text, const gchar *string, - gint length, - gint *position) + int length, + int *position) { GtkWidget *widget; GtkEditable *editable; @@ -737,8 +737,8 @@ gtk_search_entry_accessible_insert_text (AtkEditableText *text, static void gtk_search_entry_accessible_copy_text (AtkEditableText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; GtkEditable *editable; @@ -758,8 +758,8 @@ gtk_search_entry_accessible_copy_text (AtkEditableText *text, static void gtk_search_entry_accessible_cut_text (AtkEditableText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; GtkEditable *editable; @@ -782,8 +782,8 @@ gtk_search_entry_accessible_cut_text (AtkEditableText *text, static void gtk_search_entry_accessible_delete_text (AtkEditableText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; GtkEditable *editable; @@ -826,7 +826,7 @@ paste_received_cb (GObject *clipboard, static void gtk_search_entry_accessible_paste_text (AtkEditableText *text, - gint position) + int position) { GtkWidget *widget; GtkEditable *editable; @@ -864,7 +864,7 @@ atk_editable_text_interface_init (AtkEditableTextIface *iface) static gboolean gtk_search_entry_accessible_do_action (AtkAction *action, - gint i) + int i) { GtkWidget *widget; @@ -890,7 +890,7 @@ gtk_search_entry_accessible_do_action (AtkAction *action, return FALSE; } -static gint +static int gtk_search_entry_accessible_get_n_actions (AtkAction *action) { GtkAccessible *accessible = GTK_ACCESSIBLE (action); @@ -911,7 +911,7 @@ gtk_search_entry_accessible_get_n_actions (AtkAction *action) static const gchar * gtk_search_entry_accessible_get_keybinding (AtkAction *action, - gint i) + int i) { GtkWidget *widget; GtkWidget *label; @@ -956,7 +956,7 @@ gtk_search_entry_accessible_get_keybinding (AtkAction *action, static const gchar * gtk_search_entry_accessible_action_get_name (AtkAction *action, - gint i) + int i) { switch (i) { @@ -975,7 +975,7 @@ gtk_search_entry_accessible_action_get_name (AtkAction *action, static const gchar* gtk_search_entry_accessible_action_get_localized_name (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action name", "Activate"); @@ -987,7 +987,7 @@ gtk_search_entry_accessible_action_get_localized_name (AtkAction *action, static const gchar * gtk_search_entry_accessible_action_get_description (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action description", "Activates the entry"); diff --git a/gtk/a11y/gtkspinneraccessible.c b/gtk/a11y/gtkspinneraccessible.c index 16b02e2d4f..cb055db7ad 100644 --- a/gtk/a11y/gtkspinneraccessible.c +++ b/gtk/a11y/gtkspinneraccessible.c @@ -56,8 +56,8 @@ gtk_spinner_accessible_init (GtkSpinnerAccessible *self) static void gtk_spinner_accessible_image_get_size (AtkImage *image, - gint *width, - gint *height) + int *width, + int *height) { GtkWidget *widget; diff --git a/gtk/a11y/gtkstatusbaraccessible.c b/gtk/a11y/gtkstatusbaraccessible.c index b4d2f38505..95e2f02c98 100644 --- a/gtk/a11y/gtkstatusbaraccessible.c +++ b/gtk/a11y/gtkstatusbaraccessible.c @@ -69,7 +69,7 @@ gtk_statusbar_accessible_get_name (AtkObject *obj) return gtk_statusbar_get_message (GTK_STATUSBAR (widget)); } -static gint +static int gtk_statusbar_accessible_get_n_children (AtkObject *obj) { return 0; @@ -77,7 +77,7 @@ gtk_statusbar_accessible_get_n_children (AtkObject *obj) static AtkObject* gtk_statusbar_accessible_ref_child (AtkObject *obj, - gint i) + int i) { return NULL; } diff --git a/gtk/a11y/gtkswitchaccessible.c b/gtk/a11y/gtkswitchaccessible.c index 669ba1f3ca..985321499f 100644 --- a/gtk/a11y/gtkswitchaccessible.c +++ b/gtk/a11y/gtkswitchaccessible.c @@ -66,7 +66,7 @@ gtk_switch_accessible_init (GtkSwitchAccessible *self) { } -static gint +static int gtk_switch_action_get_n_actions (AtkAction *action) { return 1; @@ -74,7 +74,7 @@ gtk_switch_action_get_n_actions (AtkAction *action) static const gchar * gtk_switch_action_get_name (AtkAction *action, - gint i) + int i) { if (i == 0) return "toggle"; @@ -83,7 +83,7 @@ gtk_switch_action_get_name (AtkAction *action, static const gchar * gtk_switch_action_get_localized_name (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action name", "Toggle"); @@ -92,7 +92,7 @@ gtk_switch_action_get_localized_name (AtkAction *action, static const gchar * gtk_switch_action_get_description (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action description", "Toggles the switch"); @@ -101,7 +101,7 @@ gtk_switch_action_get_description (AtkAction *action, static gboolean gtk_switch_action_do_action (AtkAction *action, - gint i) + int i) { GtkSwitch *sw; GtkWidget *widget; diff --git a/gtk/a11y/gtktextaccessible.c b/gtk/a11y/gtktextaccessible.c index 7a3b396b1a..d71a7869b6 100644 --- a/gtk/a11y/gtktextaccessible.c +++ b/gtk/a11y/gtktextaccessible.c @@ -31,19 +31,19 @@ struct _GtkTextAccessiblePrivate { - gint cursor_position; - gint selection_bound; + int cursor_position; + int selection_bound; }; /* Callbacks */ static void insert_text_cb (GtkEditable *editable, gchar *new_text, - gint new_text_length, - gint *position); + int new_text_length, + int *position); static void delete_text_cb (GtkEditable *editable, - gint start, - gint end); + int start, + int end); static gboolean check_for_selection_change (GtkTextAccessible *entry, GtkText *gtk_text); @@ -171,7 +171,7 @@ gtk_text_accessible_initialize (AtkObject *obj, { GtkText *entry; GtkTextAccessible *gtk_text_accessible; - gint start_pos, end_pos; + int start_pos, end_pos; ATK_OBJECT_CLASS (gtk_text_accessible_parent_class)->initialize (obj, data); @@ -197,7 +197,7 @@ gtk_text_accessible_initialize (AtkObject *obj, obj->role = ATK_ROLE_PASSWORD_TEXT; } -static gint +static int gtk_text_accessible_get_index_in_parent (AtkObject *accessible) { /* If the parent widget is a combo box then the index is 1 @@ -231,8 +231,8 @@ gtk_text_accessible_init (GtkTextAccessible *entry) static gchar * gtk_text_accessible_get_text (AtkText *atk_text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; @@ -245,10 +245,10 @@ gtk_text_accessible_get_text (AtkText *atk_text, static gchar * gtk_text_accessible_get_text_before_offset (AtkText *text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkWidget *widget; @@ -263,10 +263,10 @@ gtk_text_accessible_get_text_before_offset (AtkText *text, static gchar * gtk_text_accessible_get_text_at_offset (AtkText *text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkWidget *widget; @@ -281,10 +281,10 @@ gtk_text_accessible_get_text_at_offset (AtkText *text, static gchar * gtk_text_accessible_get_text_after_offset (AtkText *text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkWidget *widget; @@ -297,7 +297,7 @@ gtk_text_accessible_get_text_after_offset (AtkText *text, start_offset, end_offset); } -static gint +static int gtk_text_accessible_get_character_count (AtkText *atk_text) { GtkWidget *widget; @@ -320,7 +320,7 @@ gtk_text_accessible_get_character_count (AtkText *atk_text) return char_count; } -static gint +static int gtk_text_accessible_get_caret_offset (AtkText *text) { GtkWidget *widget; @@ -340,7 +340,7 @@ gtk_text_accessible_get_caret_offset (AtkText *text) static gboolean gtk_text_accessible_set_caret_offset (AtkText *text, - gint offset) + int offset) { GtkWidget *widget; @@ -356,7 +356,7 @@ gtk_text_accessible_set_caret_offset (AtkText *text, static AtkAttributeSet * add_text_attribute (AtkAttributeSet *attributes, AtkTextAttribute attr, - gint i) + int i) { AtkAttribute *at; @@ -369,9 +369,9 @@ add_text_attribute (AtkAttributeSet *attributes, static AtkAttributeSet * gtk_text_accessible_get_run_attributes (AtkText *text, - gint offset, - gint *start_offset, - gint *end_offset) + int offset, + int *start_offset, + int *end_offset) { GtkWidget *widget; AtkAttributeSet *attributes; @@ -415,18 +415,18 @@ gtk_text_accessible_get_default_attributes (AtkText *text) static void gtk_text_accessible_get_character_extents (AtkText *text, - gint offset, - gint *x, - gint *y, - gint *width, - gint *height, + int offset, + int *x, + int *y, + int *width, + int *height, AtkCoordType coords) { GtkWidget *widget; GtkText *entry; PangoRectangle char_rect; gchar *entry_text; - gint index, x_layout, y_layout; + int index, x_layout, y_layout; GtkAllocation allocation; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); @@ -451,17 +451,17 @@ gtk_text_accessible_get_character_extents (AtkText *text, *height = char_rect.height; } -static gint +static int gtk_text_accessible_get_offset_at_point (AtkText *atk_text, - gint x, - gint y, + int x, + int y, AtkCoordType coords) { GtkWidget *widget; GtkText *entry; gchar *text; - gint index, x_layout, y_layout; - gint x_local, y_local; + int index, x_layout, y_layout; + int x_local, y_local; glong offset; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_text)); @@ -497,11 +497,11 @@ gtk_text_accessible_get_offset_at_point (AtkText *atk_text, return offset; } -static gint +static int gtk_text_accessible_get_n_selections (AtkText *text) { GtkWidget *widget; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -515,9 +515,9 @@ gtk_text_accessible_get_n_selections (AtkText *text) static gchar * gtk_text_accessible_get_selection (AtkText *text, - gint selection_num, - gint *start_pos, - gint *end_pos) + int selection_num, + int *start_pos, + int *end_pos) { GtkWidget *widget; @@ -536,12 +536,12 @@ gtk_text_accessible_get_selection (AtkText *text, static gboolean gtk_text_accessible_add_selection (AtkText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkText *entry; GtkWidget *widget; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -560,10 +560,10 @@ gtk_text_accessible_add_selection (AtkText *text, static gboolean gtk_text_accessible_remove_selection (AtkText *text, - gint selection_num) + int selection_num) { GtkWidget *widget; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -583,12 +583,12 @@ gtk_text_accessible_remove_selection (AtkText *text, static gboolean gtk_text_accessible_set_selection (AtkText *text, - gint selection_num, - gint start_pos, - gint end_pos) + int selection_num, + int start_pos, + int end_pos) { GtkWidget *widget; - gint start, end; + int start, end; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -608,7 +608,7 @@ gtk_text_accessible_set_selection (AtkText *text, static gunichar gtk_text_accessible_get_character_at_offset (AtkText *atk_text, - gint offset) + int offset) { GtkWidget *widget; gchar *text; @@ -676,8 +676,8 @@ gtk_text_accessible_set_text_contents (AtkEditableText *text, static void gtk_text_accessible_insert_text (AtkEditableText *text, const gchar *string, - gint length, - gint *position) + int length, + int *position) { GtkWidget *widget; GtkEditable *editable; @@ -696,8 +696,8 @@ gtk_text_accessible_insert_text (AtkEditableText *text, static void gtk_text_accessible_copy_text (AtkEditableText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; GtkEditable *editable; @@ -717,8 +717,8 @@ gtk_text_accessible_copy_text (AtkEditableText *text, static void gtk_text_accessible_cut_text (AtkEditableText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; GtkEditable *editable; @@ -741,8 +741,8 @@ gtk_text_accessible_cut_text (AtkEditableText *text, static void gtk_text_accessible_delete_text (AtkEditableText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; GtkEditable *editable; @@ -761,7 +761,7 @@ gtk_text_accessible_delete_text (AtkEditableText *text, typedef struct { GtkText* entry; - gint position; + int position; } PasteData; static void @@ -784,7 +784,7 @@ paste_received_cb (GObject *clipboard, static void gtk_text_accessible_paste_text (AtkEditableText *text, - gint position) + int position) { GtkWidget *widget; GtkEditable *editable; @@ -823,11 +823,11 @@ atk_editable_text_interface_init (AtkEditableTextIface *iface) static void insert_text_cb (GtkEditable *editable, gchar *new_text, - gint new_text_length, - gint *position) + int new_text_length, + int *position) { GtkTextAccessible *accessible; - gint length; + int length; if (new_text_length == 0) return; @@ -848,8 +848,8 @@ insert_text_cb (GtkEditable *editable, */ static void delete_text_cb (GtkEditable *editable, - gint start, - gint end) + int start, + int end) { GtkTextAccessible *accessible; @@ -878,7 +878,7 @@ check_for_selection_change (GtkTextAccessible *accessible, GtkText *entry) { gboolean ret_val = FALSE; - gint start, end; + int start, end; if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start, &end)) { @@ -907,7 +907,7 @@ check_for_selection_change (GtkTextAccessible *accessible, static gboolean gtk_text_accessible_do_action (AtkAction *action, - gint i) + int i) { GtkWidget *widget; @@ -926,7 +926,7 @@ gtk_text_accessible_do_action (AtkAction *action, return TRUE; } -static gint +static int gtk_text_accessible_get_n_actions (AtkAction *action) { return 1; @@ -934,7 +934,7 @@ gtk_text_accessible_get_n_actions (AtkAction *action) static const gchar * gtk_text_accessible_get_keybinding (AtkAction *action, - gint i) + int i) { GtkWidget *widget; GtkWidget *label; @@ -979,7 +979,7 @@ gtk_text_accessible_get_keybinding (AtkAction *action, static const gchar* gtk_text_accessible_action_get_name (AtkAction *action, - gint i) + int i) { if (i == 0) return "activate"; @@ -988,7 +988,7 @@ gtk_text_accessible_action_get_name (AtkAction *action, static const gchar* gtk_text_accessible_action_get_localized_name (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action name", "Activate"); @@ -997,7 +997,7 @@ gtk_text_accessible_action_get_localized_name (AtkAction *action, static const gchar* gtk_text_accessible_action_get_description (AtkAction *action, - gint i) + int i) { if (i == 0) return C_("Action description", "Activates the entry"); diff --git a/gtk/a11y/gtktextcellaccessible.c b/gtk/a11y/gtktextcellaccessible.c index ea638743fc..9df1f41a20 100644 --- a/gtk/a11y/gtktextcellaccessible.c +++ b/gtk/a11y/gtktextcellaccessible.c @@ -27,8 +27,8 @@ struct _GtkTextCellAccessiblePrivate { gchar *cell_text; - gint caret_pos; - gint cell_length; + int caret_pos; + int cell_length; PangoLayout *layout; }; @@ -38,45 +38,45 @@ static const gchar* gtk_text_cell_accessible_get_name (AtkObject *atk_ob /* atktext.h */ static gchar* gtk_text_cell_accessible_get_text (AtkText *text, - gint start_pos, - gint end_pos); + int start_pos, + int end_pos); static gunichar gtk_text_cell_accessible_get_character_at_offset (AtkText *text, - gint offset); + int offset); static gchar* gtk_text_cell_accessible_get_text_before_offset (AtkText *text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset); + int *start_offset, + int *end_offset); static gchar* gtk_text_cell_accessible_get_text_at_offset (AtkText *text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset); + int *start_offset, + int *end_offset); static gchar* gtk_text_cell_accessible_get_text_after_offset (AtkText *text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset); -static gint gtk_text_cell_accessible_get_character_count (AtkText *text); -static gint gtk_text_cell_accessible_get_caret_offset (AtkText *text); + int *start_offset, + int *end_offset); +static int gtk_text_cell_accessible_get_character_count (AtkText *text); +static int gtk_text_cell_accessible_get_caret_offset (AtkText *text); static gboolean gtk_text_cell_accessible_set_caret_offset (AtkText *text, - gint offset); + int offset); static void gtk_text_cell_accessible_get_character_extents (AtkText *text, - gint offset, - gint *x, - gint *y, - gint *width, - gint *height, + int offset, + int *x, + int *y, + int *width, + int *height, AtkCoordType coords); -static gint gtk_text_cell_accessible_get_offset_at_point (AtkText *text, - gint x, - gint y, +static int gtk_text_cell_accessible_get_offset_at_point (AtkText *text, + int x, + int y, AtkCoordType coords); static AtkAttributeSet* gtk_text_cell_accessible_get_run_attributes (AtkText *text, - gint offset, - gint *start_offset, - gint *end_offset); + int offset, + int *start_offset, + int *end_offset); static AtkAttributeSet* gtk_text_cell_accessible_get_default_attributes (AtkText *text); @@ -138,7 +138,7 @@ gtk_text_cell_accessible_update_cache (GtkCellAccessible *cell, { GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (cell); AtkObject *obj = ATK_OBJECT (cell); - gint text_length; + int text_length; gchar *text; GtkCellRenderer *renderer; @@ -203,8 +203,8 @@ gtk_text_cell_accessible_init (GtkTextCellAccessible *text_cell) static gchar * gtk_text_cell_accessible_get_text (AtkText *atk_text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { gchar *text; @@ -217,10 +217,10 @@ gtk_text_cell_accessible_get_text (AtkText *atk_text, static gchar * gtk_text_cell_accessible_get_text_before_offset (AtkText *atk_text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (atk_text); gchar *text; @@ -232,10 +232,10 @@ gtk_text_cell_accessible_get_text_before_offset (AtkText *atk_text, static gchar * gtk_text_cell_accessible_get_text_at_offset (AtkText *atk_text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (atk_text); gchar *text; @@ -247,10 +247,10 @@ gtk_text_cell_accessible_get_text_at_offset (AtkText *atk_text, static gchar * gtk_text_cell_accessible_get_text_after_offset (AtkText *atk_text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (atk_text); gchar *text; @@ -260,7 +260,7 @@ gtk_text_cell_accessible_get_text_after_offset (AtkText *atk_text, return text; } -static gint +static int gtk_text_cell_accessible_get_character_count (AtkText *text) { if (GTK_TEXT_CELL_ACCESSIBLE (text)->priv->cell_text != NULL) @@ -269,7 +269,7 @@ gtk_text_cell_accessible_get_character_count (AtkText *text) return 0; } -static gint +static int gtk_text_cell_accessible_get_caret_offset (AtkText *text) { return GTK_TEXT_CELL_ACCESSIBLE (text)->priv->caret_pos; @@ -277,7 +277,7 @@ gtk_text_cell_accessible_get_caret_offset (AtkText *text) static gboolean gtk_text_cell_accessible_set_caret_offset (AtkText *text, - gint offset) + int offset) { GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (text); @@ -303,9 +303,9 @@ gtk_text_cell_accessible_set_caret_offset (AtkText *text, static AtkAttributeSet * gtk_text_cell_accessible_get_run_attributes (AtkText *text, - gint offset, - gint *start_offset, - gint *end_offset) + int offset, + int *start_offset, + int *end_offset) { AtkAttributeSet *attrib_set = NULL; GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (text); @@ -378,7 +378,7 @@ create_pango_layout (GtkTextCellAccessible *text) gboolean scale_set, underline_set, rise_set; gchar *renderer_text; gdouble scale; - gint rise; + int rise; GtkRendererCellAccessible *gail_renderer; GtkCellRendererText *gtk_renderer; @@ -479,11 +479,11 @@ add_attr (PangoAttrList *attr_list, static void gtk_text_cell_accessible_get_character_extents (AtkText *text, - gint offset, - gint *x, - gint *y, - gint *width, - gint *height, + int offset, + int *x, + int *y, + int *width, + int *height, AtkCoordType coords) { GtkRendererCellAccessible *gail_renderer; @@ -496,8 +496,8 @@ gtk_text_cell_accessible_get_character_extents (AtkText *text, GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (text); gchar *renderer_text; gfloat xalign, yalign; - gint x_offset, y_offset, index; - gint xpad, ypad; + int x_offset, y_offset, index; + int xpad, ypad; if (!GTK_TEXT_CELL_ACCESSIBLE (text)->priv->cell_text) { @@ -559,10 +559,10 @@ gtk_text_cell_accessible_get_character_extents (AtkText *text, g_object_unref (gtk_renderer); } -static gint +static int gtk_text_cell_accessible_get_offset_at_point (AtkText *text, - gint x, - gint y, + int x, + int y, AtkCoordType coords) { AtkObject *parent; @@ -574,9 +574,9 @@ gtk_text_cell_accessible_get_offset_at_point (AtkText *text, GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (text); gchar *renderer_text; gfloat xalign, yalign; - gint x_offset, y_offset, index; - gint xpad, ypad; - gint x_temp, y_temp; + int x_offset, y_offset, index; + int xpad, ypad; + int x_temp, y_temp; gboolean ret; if (!GTK_TEXT_CELL_ACCESSIBLE (text)->priv->cell_text) @@ -665,7 +665,7 @@ gtk_text_cell_accessible_get_offset_at_point (AtkText *text, static gunichar gtk_text_cell_accessible_get_character_at_offset (AtkText *text, - gint offset) + int offset) { gchar *index; gchar *string; diff --git a/gtk/a11y/gtktextviewaccessible.c b/gtk/a11y/gtktextviewaccessible.c index 9962c23607..a937d88ab5 100644 --- a/gtk/a11y/gtktextviewaccessible.c +++ b/gtk/a11y/gtktextviewaccessible.c @@ -35,14 +35,14 @@ struct _GtkTextViewAccessiblePrivate { - gint insert_offset; - gint selection_bound; + int insert_offset; + int selection_bound; }; static void insert_text_cb (GtkTextBuffer *buffer, GtkTextIter *arg1, gchar *arg2, - gint arg3, + int arg3, gpointer user_data); static void delete_range_cb (GtkTextBuffer *buffer, GtkTextIter *arg1, @@ -180,8 +180,8 @@ gtk_text_view_accessible_init (GtkTextViewAccessible *accessible) static gchar * gtk_text_view_accessible_get_text (AtkText *text, - gint start_offset, - gint end_offset) + int start_offset, + int end_offset) { GtkTextView *view; GtkTextBuffer *buffer; @@ -202,10 +202,10 @@ gtk_text_view_accessible_get_text (AtkText *text, static gchar * gtk_text_view_accessible_get_text_after_offset (AtkText *text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkWidget *widget; GtkTextView *view; @@ -245,10 +245,10 @@ gtk_text_view_accessible_get_text_after_offset (AtkText *text, static gchar * gtk_text_view_accessible_get_text_at_offset (AtkText *text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkWidget *widget; GtkTextView *view; @@ -290,10 +290,10 @@ gtk_text_view_accessible_get_text_at_offset (AtkText *text, static gchar * gtk_text_view_accessible_get_text_before_offset (AtkText *text, - gint offset, + int offset, AtkTextBoundary boundary_type, - gint *start_offset, - gint *end_offset) + int *start_offset, + int *end_offset) { GtkWidget *widget; GtkTextView *view; @@ -347,7 +347,7 @@ gtk_text_view_accessible_get_text_before_offset (AtkText *text, static gunichar gtk_text_view_accessible_get_character_at_offset (AtkText *text, - gint offset) + int offset) { GtkWidget *widget; GtkTextIter start, end; @@ -373,7 +373,7 @@ gtk_text_view_accessible_get_character_at_offset (AtkText *text, return unichar; } -static gint +static int gtk_text_view_accessible_get_character_count (AtkText *text) { GtkWidget *widget; @@ -387,7 +387,7 @@ gtk_text_view_accessible_get_character_count (AtkText *text) return gtk_text_buffer_get_char_count (buffer); } -static gint +static int get_insert_offset (GtkTextBuffer *buffer) { GtkTextMark *insert; @@ -398,7 +398,7 @@ get_insert_offset (GtkTextBuffer *buffer) return gtk_text_iter_get_offset (&iter); } -static gint +static int gtk_text_view_accessible_get_caret_offset (AtkText *text) { GtkWidget *widget; @@ -414,7 +414,7 @@ gtk_text_view_accessible_get_caret_offset (AtkText *text) static gboolean gtk_text_view_accessible_set_caret_offset (AtkText *text, - gint offset) + int offset) { GtkTextView *view; GtkWidget *widget; @@ -435,15 +435,15 @@ gtk_text_view_accessible_set_caret_offset (AtkText *text, return TRUE; } -static gint +static int gtk_text_view_accessible_get_offset_at_point (AtkText *text, - gint x, - gint y, + int x, + int y, AtkCoordType coords) { GtkTextView *view; GtkTextIter iter; - gint buff_x, buff_y; + int buff_x, buff_y; GtkWidget *widget; GdkRectangle rect; @@ -477,11 +477,11 @@ gtk_text_view_accessible_get_offset_at_point (AtkText *text, static void gtk_text_view_accessible_get_character_extents (AtkText *text, - gint offset, - gint *x, - gint *y, - gint *width, - gint *height, + int offset, + int *x, + int *y, + int *width, + int *height, AtkCoordType coords) { GtkTextView *view; @@ -535,7 +535,7 @@ add_text_attribute (AtkAttributeSet *attributes, static AtkAttributeSet * add_text_int_attribute (AtkAttributeSet *attributes, AtkTextAttribute attr, - gint i) + int i) { gchar *value; @@ -547,9 +547,9 @@ add_text_int_attribute (AtkAttributeSet *attributes, static AtkAttributeSet * gtk_text_view_accessible_get_run_attributes (AtkText *text, - gint offset, - gint *start_offset, - gint *end_offset) + int offset, + int *start_offset, + int *end_offset) { GtkTextView *view; GtkTextBuffer *buffer; @@ -766,7 +766,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { - gint weight; + int weight; gchar *value; g_object_get (tag, "weight", &weight, NULL); value = g_strdup_printf ("%d", weight); @@ -811,7 +811,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, g_object_get (tag, "size-set", &val_set, NULL); if (val_set) { - gint size; + int size; gchar *value; g_object_get (tag, "size", &size, NULL); value = g_strdup_printf ("%i", size); @@ -861,7 +861,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, g_object_get (tag, "rise-set", &val_set, NULL); if (val_set) { - gint rise; + int rise; gchar *value; g_object_get (tag, "rise", &rise, NULL); value = g_strdup_printf ("%i", rise); @@ -895,7 +895,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, g_object_get (tag, "pixels-inside-wrap-set", &val_set, NULL); if (val_set) { - gint pixels; + int pixels; gchar *value; g_object_get (tag, "pixels-inside-wrap", &pixels, NULL); value = g_strdup_printf ("%i", pixels); @@ -913,7 +913,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, g_object_get (tag, "pixels-below-lines-set", &val_set, NULL); if (val_set) { - gint pixels; + int pixels; gchar *value; g_object_get (tag, "pixels-below-lines", &pixels, NULL); value = g_strdup_printf ("%i", pixels); @@ -931,7 +931,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, g_object_get (tag, "pixels-above-lines-set", &val_set, NULL); if (val_set) { - gint pixels; + int pixels; gchar *value; g_object_get (tag, "pixels-above-lines", &pixels, NULL); value = g_strdup_printf ("%i", pixels); @@ -981,7 +981,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, g_object_get (tag, "indent-set", &val_set, NULL); if (val_set) { - gint indent; + int indent; gchar *value; g_object_get (tag, "indent", &indent, NULL); value = g_strdup_printf ("%i", indent); @@ -999,7 +999,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, g_object_get (tag, "right-margin-set", &val_set, NULL); if (val_set) { - gint margin; + int margin; gchar *value; g_object_get (tag, "right-margin", &margin, NULL); value = g_strdup_printf ("%i", margin); @@ -1017,7 +1017,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, g_object_get (tag, "left-margin-set", &val_set, NULL); if (val_set) { - gint margin; + int margin; gchar *value; g_object_get (tag, "left-margin", &margin, NULL); value = g_strdup_printf ("%i", margin); @@ -1128,7 +1128,7 @@ gtk_text_view_accessible_get_default_attributes (AtkText *text) return attributes; } -static gint +static int gtk_text_view_accessible_get_n_selections (AtkText *text) { GtkWidget *widget; @@ -1147,9 +1147,9 @@ gtk_text_view_accessible_get_n_selections (AtkText *text) static gchar * gtk_text_view_accessible_get_selection (AtkText *atk_text, - gint selection_num, - gint *start_pos, - gint *end_pos) + int selection_num, + int *start_pos, + int *end_pos) { GtkTextView *view; GtkWidget *widget; @@ -1180,8 +1180,8 @@ gtk_text_view_accessible_get_selection (AtkText *atk_text, static gboolean gtk_text_view_accessible_add_selection (AtkText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; GtkTextBuffer *buffer; @@ -1207,7 +1207,7 @@ gtk_text_view_accessible_add_selection (AtkText *text, static gboolean gtk_text_view_accessible_remove_selection (AtkText *text, - gint selection_num) + int selection_num) { GtkWidget *widget; GtkTextBuffer *buffer; @@ -1237,9 +1237,9 @@ gtk_text_view_accessible_remove_selection (AtkText *text, static gboolean gtk_text_view_accessible_set_selection (AtkText *text, - gint selection_num, - gint start_pos, - gint end_pos) + int selection_num, + int start_pos, + int end_pos) { GtkWidget *widget; GtkTextBuffer *buffer; @@ -1293,8 +1293,8 @@ atk_text_interface_init (AtkTextIface *iface) static gboolean gtk_text_view_accessible_set_run_attributes (AtkEditableText *text, AtkAttributeSet *attributes, - gint start_offset, - gint end_offset) + int start_offset, + int end_offset) { GtkTextView *view; GtkTextBuffer *buffer; @@ -1302,7 +1302,7 @@ gtk_text_view_accessible_set_run_attributes (AtkEditableText *text, GtkTextTag *tag; GtkTextIter start; GtkTextIter end; - gint j; + int j; GdkRGBA *color; gchar** RGB_vals; GSList *l; @@ -1533,8 +1533,8 @@ gtk_text_view_accessible_set_text_contents (AtkEditableText *text, static void gtk_text_view_accessible_insert_text (AtkEditableText *text, const gchar *string, - gint length, - gint *position) + int length, + int *position) { GtkTextView *view; GtkWidget *widget; @@ -1556,8 +1556,8 @@ gtk_text_view_accessible_insert_text (AtkEditableText *text, static void gtk_text_view_accessible_copy_text (AtkEditableText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkWidget *widget; GtkTextBuffer *buffer; @@ -1581,8 +1581,8 @@ gtk_text_view_accessible_copy_text (AtkEditableText *text, static void gtk_text_view_accessible_cut_text (AtkEditableText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkTextView *view; GtkWidget *widget; @@ -1610,8 +1610,8 @@ gtk_text_view_accessible_cut_text (AtkEditableText *text, static void gtk_text_view_accessible_delete_text (AtkEditableText *text, - gint start_pos, - gint end_pos) + int start_pos, + int end_pos) { GtkTextView *view; GtkWidget *widget; @@ -1636,7 +1636,7 @@ gtk_text_view_accessible_delete_text (AtkEditableText *text, typedef struct { GtkTextBuffer* buffer; - gint position; + int position; } PasteData; static void @@ -1661,7 +1661,7 @@ paste_received (GObject *clipboard, static void gtk_text_view_accessible_paste_text (AtkEditableText *text, - gint position) + int position) { GtkTextView *view; GtkWidget *widget; @@ -1733,12 +1733,12 @@ static void insert_text_cb (GtkTextBuffer *buffer, GtkTextIter *iter, gchar *text, - gint len, + int len, gpointer data) { GtkTextViewAccessible *accessible = data; - gint position; - gint length; + int position; + int length; position = gtk_text_iter_get_offset (iter); length = g_utf8_strlen (text, len); @@ -1755,7 +1755,7 @@ delete_range_cb (GtkTextBuffer *buffer, gpointer data) { GtkTextViewAccessible *accessible = data; - gint offset, length; + int offset, length; offset = gtk_text_iter_get_offset (start); length = gtk_text_iter_get_offset (end) - offset; diff --git a/gtk/a11y/gtktoplevelaccessible.c b/gtk/a11y/gtktoplevelaccessible.c index a7d07fec2f..f010bea86e 100644 --- a/gtk/a11y/gtktoplevelaccessible.c +++ b/gtk/a11y/gtktoplevelaccessible.c @@ -55,7 +55,7 @@ gtk_toplevel_accessible_object_finalize (GObject *obj) G_OBJECT_CLASS (gtk_toplevel_accessible_parent_class)->finalize (obj); } -static gint +static int gtk_toplevel_accessible_get_n_children (AtkObject *obj) { GtkToplevelAccessible *toplevel = GTK_TOPLEVEL_ACCESSIBLE (obj); @@ -65,7 +65,7 @@ gtk_toplevel_accessible_get_n_children (AtkObject *obj) static AtkObject * gtk_toplevel_accessible_ref_child (AtkObject *obj, - gint i) + int i) { GtkToplevelAccessible *toplevel; GtkWidget *widget; @@ -147,7 +147,7 @@ show_event_watcher (GSignalInvocationHint *ihint, AtkObject *atk_obj = ATK_OBJECT (toplevel); GObject *object; GtkWidget *widget; - gint n_children; + int n_children; AtkObject *child; object = g_value_get_object (param_values + 0); diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c index 3ea1daca19..8956dfa1bc 100644 --- a/gtk/a11y/gtktreeviewaccessible.c +++ b/gtk/a11y/gtktreeviewaccessible.c @@ -59,11 +59,11 @@ static void cell_info_new (GtkTreeViewAccessible GtkTreeRBNode *node, GtkTreeViewColumn *tv_col, GtkCellAccessible *cell); -static gint get_column_number (GtkTreeView *tree_view, +static int get_column_number (GtkTreeView *tree_view, GtkTreeViewColumn *column); static gboolean get_rbtree_column_from_index (GtkTreeView *tree_view, - gint index, + int index, GtkTreeRBTree **tree, GtkTreeRBNode **node, GtkTreeViewColumn **column); @@ -216,7 +216,7 @@ gtk_tree_view_accessible_widget_unset (GtkAccessible *gtkaccessible) GTK_ACCESSIBLE_CLASS (gtk_tree_view_accessible_parent_class)->widget_unset (gtkaccessible); } -static gint +static int get_n_rows (GtkTreeView *tree_view) { GtkTreeRBTree *tree; @@ -229,7 +229,7 @@ get_n_rows (GtkTreeView *tree_view) return tree->root->total_count; } -static gint +static int get_n_columns (GtkTreeView *tree_view) { guint i, visible_columns; @@ -247,7 +247,7 @@ get_n_columns (GtkTreeView *tree_view) return visible_columns; } -static gint +static int gtk_tree_view_accessible_get_n_children (AtkObject *obj) { GtkWidget *widget; @@ -421,7 +421,7 @@ create_cell (GtkTreeView *treeview, static AtkObject * gtk_tree_view_accessible_ref_child (AtkObject *obj, - gint i) + int i) { GtkWidget *widget; GtkTreeViewAccessible *accessible; @@ -502,16 +502,16 @@ gtk_tree_view_accessible_init (GtkTreeViewAccessible *view) static AtkObject * gtk_tree_view_accessible_ref_accessible_at_point (AtkComponent *component, - gint x, - gint y, + int x, + int y, AtkCoordType coord_type) { GtkWidget *widget; GtkTreeView *tree_view; GtkTreePath *path; GtkTreeViewColumn *column; - gint x_pos, y_pos; - gint bx, by; + int x_pos, y_pos; + int bx, by; GtkCellAccessible *cell; GtkTreeRBTree *tree; GtkTreeRBNode *node; @@ -550,13 +550,13 @@ atk_component_interface_init (AtkComponentIface *iface) /* atktable.h */ -static gint +static int gtk_tree_view_accessible_get_index_at (AtkTable *table, - gint row, - gint column) + int row, + int column) { GtkWidget *widget; - gint n_cols, n_rows; + int n_cols, n_rows; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table)); if (widget == NULL) @@ -571,12 +571,12 @@ gtk_tree_view_accessible_get_index_at (AtkTable *table, return (row + 1) * n_cols + column; } -static gint +static int gtk_tree_view_accessible_get_column_at_index (AtkTable *table, - gint index) + int index) { GtkWidget *widget; - gint n_columns; + int n_columns; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table)); if (widget == NULL) @@ -593,9 +593,9 @@ gtk_tree_view_accessible_get_column_at_index (AtkTable *table, return index % n_columns; } -static gint +static int gtk_tree_view_accessible_get_row_at_index (AtkTable *table, - gint index) + int index) { GtkWidget *widget; GtkTreeView *tree_view; @@ -616,10 +616,10 @@ gtk_tree_view_accessible_get_row_at_index (AtkTable *table, static AtkObject * gtk_tree_view_accessible_table_ref_at (AtkTable *table, - gint row, - gint column) + int row, + int column) { - gint index; + int index; index = gtk_tree_view_accessible_get_index_at (table, row, column); if (index == -1) @@ -628,7 +628,7 @@ gtk_tree_view_accessible_table_ref_at (AtkTable *table, return gtk_tree_view_accessible_ref_child (ATK_OBJECT (table), index); } -static gint +static int gtk_tree_view_accessible_get_n_rows (AtkTable *table) { GtkWidget *widget; @@ -640,7 +640,7 @@ gtk_tree_view_accessible_get_n_rows (AtkTable *table) return get_n_rows (GTK_TREE_VIEW (widget)); } -static gint +static int gtk_tree_view_accessible_get_n_columns (AtkTable *table) { GtkWidget *widget; @@ -654,7 +654,7 @@ gtk_tree_view_accessible_get_n_columns (AtkTable *table) static gboolean gtk_tree_view_accessible_is_row_selected (AtkTable *table, - gint row) + int row) { GtkWidget *widget; GtkTreeRBTree *tree; @@ -678,8 +678,8 @@ gtk_tree_view_accessible_is_row_selected (AtkTable *table, static gboolean gtk_tree_view_accessible_is_selected (AtkTable *table, - gint row, - gint column) + int row, + int column) { return gtk_tree_view_accessible_is_row_selected (table, row); } @@ -712,13 +712,13 @@ get_selected_rows (GtkTreeModel *model, g_array_append_val (data->array, id); } -static gint +static int gtk_tree_view_accessible_get_selected_rows (AtkTable *table, - gint **rows_selected) + int **rows_selected) { SelectedRowsData data; GtkWidget *widget; - gint n_rows; + int n_rows; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table)); if (widget == NULL) @@ -729,7 +729,7 @@ gtk_tree_view_accessible_get_selected_rows (AtkTable *table, } data.treeview = GTK_TREE_VIEW (widget); - data.array = g_array_new (FALSE, FALSE, sizeof (gint)); + data.array = g_array_new (FALSE, FALSE, sizeof (int)); gtk_tree_selection_selected_foreach (gtk_tree_view_get_selection (data.treeview), get_selected_rows, @@ -737,7 +737,7 @@ gtk_tree_view_accessible_get_selected_rows (AtkTable *table, n_rows = data.array->len; if (rows_selected) - *rows_selected = (gint *) g_array_free (data.array, FALSE); + *rows_selected = (int *) g_array_free (data.array, FALSE); else g_array_free (data.array, TRUE); @@ -746,7 +746,7 @@ gtk_tree_view_accessible_get_selected_rows (AtkTable *table, static gboolean gtk_tree_view_accessible_add_row_selection (AtkTable *table, - gint row) + int row) { GtkTreeView *treeview; GtkTreePath *path; @@ -778,7 +778,7 @@ gtk_tree_view_accessible_add_row_selection (AtkTable *table, static gboolean gtk_tree_view_accessible_remove_row_selection (AtkTable *table, - gint row) + int row) { GtkTreeView *treeview; GtkTreePath *path; @@ -810,7 +810,7 @@ gtk_tree_view_accessible_remove_row_selection (AtkTable *table, static AtkObject * gtk_tree_view_accessible_get_column_header (AtkTable *table, - gint in_col) + int in_col) { GtkWidget *widget; GtkTreeView *tree_view; @@ -830,7 +830,7 @@ gtk_tree_view_accessible_get_column_header (AtkTable *table, static const gchar * gtk_tree_view_accessible_get_column_description (AtkTable *table, - gint in_col) + int in_col) { GtkWidget *widget; GtkTreeView *tree_view; @@ -872,11 +872,11 @@ atk_table_interface_init (AtkTableIface *iface) static gboolean gtk_tree_view_accessible_add_selection (AtkSelection *selection, - gint i) + int i) { AtkTable *table; - gint n_columns; - gint row; + int n_columns; + int row; table = ATK_TABLE (selection); n_columns = gtk_tree_view_accessible_get_n_columns (table); @@ -907,13 +907,13 @@ gtk_tree_view_accessible_clear_selection (AtkSelection *selection) static AtkObject * gtk_tree_view_accessible_ref_selection (AtkSelection *selection, - gint i) + int i) { AtkTable *table; - gint row; - gint n_selected; - gint n_columns; - gint *selected; + int row; + int n_selected; + int n_columns; + int *selected; table = ATK_TABLE (selection); n_columns = gtk_tree_view_accessible_get_n_columns (table); @@ -927,11 +927,11 @@ gtk_tree_view_accessible_ref_selection (AtkSelection *selection, return gtk_tree_view_accessible_table_ref_at (table, row, i % n_columns); } -static gint +static int gtk_tree_view_accessible_get_selection_count (AtkSelection *selection) { AtkTable *table; - gint n_selected; + int n_selected; table = ATK_TABLE (selection); n_selected = gtk_tree_view_accessible_get_selected_rows (table, NULL); @@ -942,10 +942,10 @@ gtk_tree_view_accessible_get_selection_count (AtkSelection *selection) static gboolean gtk_tree_view_accessible_is_child_selected (AtkSelection *selection, - gint i) + int i) { GtkWidget *widget; - gint row; + int row; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection)); if (widget == NULL) @@ -1012,7 +1012,7 @@ gtk_tree_view_accessible_get_cell_area (GtkCellAccessibleParent *parent, /* Values from gtktreeview.c ... */ #define _TREE_VIEW_EXPANDER_SIZE 16 #define _TREE_VIEW_HORIZONTAL_SEPARATOR 4 - gint expander_size = _TREE_VIEW_EXPANDER_SIZE + (_TREE_VIEW_HORIZONTAL_SEPARATOR / 2); + int expander_size = _TREE_VIEW_EXPANDER_SIZE + (_TREE_VIEW_HORIZONTAL_SEPARATOR / 2); cell_rect->x += expander_size + EXTRA_EXPANDER_PADDING; cell_rect->width -= expander_size + EXTRA_EXPANDER_PADDING; } @@ -1024,10 +1024,10 @@ gtk_tree_view_accessible_get_cell_area (GtkCellAccessibleParent *parent, */ if (top_cell != cell) { - gint cell_index; + int cell_index; gboolean found; - gint cell_start; - gint cell_width; + int cell_start; + int cell_width; GList *renderers; GtkCellRenderer *renderer; @@ -1050,16 +1050,16 @@ gtk_tree_view_accessible_get_cell_area (GtkCellAccessibleParent *parent, static void gtk_tree_view_accessible_get_cell_extents (GtkCellAccessibleParent *parent, GtkCellAccessible *cell, - gint *x, - gint *y, - gint *width, - gint *height, + int *x, + int *y, + int *width, + int *height, AtkCoordType coord_type) { GtkWidget *widget; GtkTreeView *tree_view; GdkRectangle cell_rect; - gint w_x, w_y; + int w_x, w_y; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)); if (widget == NULL) @@ -1098,7 +1098,7 @@ gtk_tree_view_accessible_grab_cell_focus (GtkCellAccessibleParent *parent, GtkTreeViewAccessibleCellInfo *cell_info; GtkCellRenderer *renderer = NULL; GtkWidget *toplevel; - gint index; + int index; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)); if (widget == NULL) @@ -1356,8 +1356,8 @@ gtk_tree_view_accessible_update_relationset (GtkCellAccessibleParent *parent, static void gtk_tree_view_accessible_get_cell_position (GtkCellAccessibleParent *parent, GtkCellAccessible *cell, - gint *row, - gint *column) + int *row, + int *column) { GtkWidget *widget; GtkTreeView *tree_view; @@ -1437,7 +1437,7 @@ is_cell_showing (GtkTreeView *tree_view, { GdkRectangle rect, *visible_rect; GdkRectangle rect1, *tree_cell_rect; - gint bx, by; + int bx, by; gboolean is_showing; /* A cell is considered "SHOWING" if any part of the cell is @@ -1514,7 +1514,7 @@ cell_info_new (GtkTreeViewAccessible *self, /* Returns the column number of the specified GtkTreeViewColumn * The column must be visible. */ -static gint +static int get_column_number (GtkTreeView *treeview, GtkTreeViewColumn *column) { @@ -1543,7 +1543,7 @@ get_column_number (GtkTreeView *treeview, static gboolean get_rbtree_column_from_index (GtkTreeView *tree_view, - gint index, + int index, GtkTreeRBTree **tree, GtkTreeRBNode **node, GtkTreeViewColumn **column) diff --git a/gtk/a11y/gtkwidgetaccessible.c b/gtk/a11y/gtkwidgetaccessible.c index fe334e3d8b..1941952e79 100644 --- a/gtk/a11y/gtkwidgetaccessible.c +++ b/gtk/a11y/gtkwidgetaccessible.c @@ -230,7 +230,7 @@ gtk_widget_accessible_get_parent (AtkObject *accessible) */ if (GTK_IS_NOTEBOOK (parent_widget)) { - gint page_num; + int page_num; GtkWidget *child; GtkNotebook *notebook; @@ -465,12 +465,12 @@ gtk_widget_accessible_ref_state_set (AtkObject *accessible) return state_set; } -static gint +static int gtk_widget_accessible_get_index_in_parent (AtkObject *accessible) { GtkWidget *widget; GtkWidget *parent_widget; - gint index; + int index; GtkWidget *ch; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)); @@ -488,7 +488,7 @@ gtk_widget_accessible_get_index_in_parent (AtkObject *accessible) return 0; else { - gint n_children, i; + int n_children, i; gboolean found = FALSE; n_children = atk_object_get_n_accessible_children (parent); @@ -592,10 +592,10 @@ gtk_widget_accessible_init (GtkWidgetAccessible *accessible) static void gtk_widget_accessible_get_extents (AtkComponent *component, - gint *x, - gint *y, - gint *width, - gint *height, + int *x, + int *y, + int *width, + int *height, AtkCoordType coord_type) { GtkWidget *widget; @@ -663,10 +663,10 @@ gtk_widget_accessible_grab_focus (AtkComponent *component) static gboolean gtk_widget_accessible_set_extents (AtkComponent *component, - gint x, - gint y, - gint width, - gint height, + int x, + int y, + int width, + int height, AtkCoordType coord_type) { return FALSE; @@ -674,8 +674,8 @@ gtk_widget_accessible_set_extents (AtkComponent *component, static gboolean gtk_widget_accessible_set_position (AtkComponent *component, - gint x, - gint y, + int x, + int y, AtkCoordType coord_type) { return FALSE; @@ -683,8 +683,8 @@ gtk_widget_accessible_set_position (AtkComponent *component, static gboolean gtk_widget_accessible_set_size (AtkComponent *component, - gint width, - gint height) + int width, + int height) { return FALSE; } diff --git a/gtk/a11y/gtkwindowaccessible.c b/gtk/a11y/gtkwindowaccessible.c index 6485cf8e69..594ad6ca57 100644 --- a/gtk/a11y/gtkwindowaccessible.c +++ b/gtk/a11y/gtkwindowaccessible.c @@ -32,14 +32,14 @@ /* atkcomponent.h */ static void gtk_window_accessible_get_extents (AtkComponent *component, - gint *x, - gint *y, - gint *width, - gint *height, + int *x, + int *y, + int *width, + int *height, AtkCoordType coord_type); static void gtk_window_accessible_get_size (AtkComponent *component, - gint *width, - gint *height); + int *width, + int *height); static void atk_component_interface_init (AtkComponentIface *iface); static void atk_window_interface_init (AtkWindowIface *iface); @@ -94,12 +94,12 @@ gtk_window_accessible_get_name (AtkObject *accessible) return name; } -static gint +static int gtk_window_accessible_get_index_in_parent (AtkObject *accessible) { GtkWidget* widget; AtkObject* atk_obj; - gint index = -1; + int index = -1; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)); if (widget == NULL) @@ -121,7 +121,7 @@ gtk_window_accessible_get_index_in_parent (AtkObject *accessible) } else { - gint i, sibling_count; + int i, sibling_count; sibling_count = atk_object_get_n_accessible_children (atk_obj); for (i = 0; i < sibling_count && index == -1; ++i) @@ -204,12 +204,12 @@ gtk_window_accessible_ref_state_set (AtkObject *accessible) return state_set; } -static gint +static int gtk_window_accessible_get_n_children (AtkObject *object) { GtkWidget *window; GtkWidget *child; - gint count = 0; + int count = 0; window = gtk_accessible_get_widget (GTK_ACCESSIBLE (object)); for (child = gtk_widget_get_first_child (GTK_WIDGET (window)); @@ -222,7 +222,7 @@ gtk_window_accessible_get_n_children (AtkObject *object) static AtkObject * gtk_window_accessible_ref_child (AtkObject *object, - gint i) + int i) { GtkWidget *window, *child; int pos; @@ -270,10 +270,10 @@ gtk_window_accessible_init (GtkWindowAccessible *accessible) static void gtk_window_accessible_get_extents (AtkComponent *component, - gint *x, - gint *y, - gint *width, - gint *height, + int *x, + int *y, + int *width, + int *height, AtkCoordType coord_type) { GtkWidget *widget; @@ -301,8 +301,8 @@ gtk_window_accessible_get_extents (AtkComponent *component, static void gtk_window_accessible_get_size (AtkComponent *component, - gint *width, - gint *height) + int *width, + int *height) { GtkWidget *widget; GdkSurface *surface; diff --git a/gtk/css/gtkcsssection.c b/gtk/css/gtkcsssection.c index 02ab970b61..3bdee6359e 100644 --- a/gtk/css/gtkcsssection.c +++ b/gtk/css/gtkcsssection.c @@ -23,7 +23,7 @@ struct _GtkCssSection { - gint ref_count; + int ref_count; GtkCssSection *parent; GFile *file; GtkCssLocation start_location; diff --git a/gtk/css/gtkcsstokenizer.c b/gtk/css/gtkcsstokenizer.c index fa0cb9f083..754c84ecb1 100644 --- a/gtk/css/gtkcsstokenizer.c +++ b/gtk/css/gtkcsstokenizer.c @@ -28,7 +28,7 @@ struct _GtkCssTokenizer { - gint ref_count; + int ref_count; GBytes *bytes; const gchar *data; diff --git a/gtk/gen-paper-names.c b/gtk/gen-paper-names.c index b1023b8fbf..afec5796d8 100644 --- a/gtk/gen-paper-names.c +++ b/gtk/gen-paper-names.c @@ -23,18 +23,18 @@ #include "paper_names.c" -static const gint n_infos = G_N_ELEMENTS (standard_names); -static const gint n_extra = G_N_ELEMENTS (extra_ppd_names); +static const int n_infos = G_N_ELEMENTS (standard_names); +static const int n_extra = G_N_ELEMENTS (extra_ppd_names); typedef struct { const gchar *s; - gint len; - gint suffix; - gint offset; + int len; + int suffix; + int offset; } NameInfo; static NameInfo *names = NULL; -static gint n_names = 0; +static int n_names = 0; static void add_name (const gchar *name) @@ -47,10 +47,10 @@ add_name (const gchar *name) n_names++; } -static gint +static int find_name (const gchar *name) { - gint i; + int i; if (!name) return -1; @@ -113,7 +113,7 @@ parse_media_size (const gchar *size, int main (int argc, char *argv[]) { - gint i, j, offset; + int i, j, offset; gdouble width, height; names = (NameInfo *) malloc (sizeof (NameInfo) * (4 + n_infos + 2 * n_extra)); diff --git a/gtk/gsettings-mapping.c b/gtk/gsettings-mapping.c index 8c64b02a50..d7d69b139c 100644 --- a/gtk/gsettings-mapping.c +++ b/gtk/gsettings-mapping.c @@ -48,7 +48,7 @@ g_settings_set_mapping_int (const GValue *value, else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_INT32)) { if (G_MININT32 <= l && l <= G_MAXINT32) - variant = g_variant_new_int32 ((gint) l); + variant = g_variant_new_int32 ((int) l); } else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_UINT32)) { @@ -103,7 +103,7 @@ g_settings_set_mapping_float (const GValue *value, else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_INT32)) { if (G_MININT32 <= l && l <= G_MAXINT32) - variant = g_variant_new_int32 ((gint) l); + variant = g_variant_new_int32 ((int) l); } else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_UINT32)) { @@ -157,7 +157,7 @@ g_settings_set_mapping_unsigned_int (const GValue *value, else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_INT32)) { if (u <= G_MAXINT32) - variant = g_variant_new_int32 ((gint) u); + variant = g_variant_new_int32 ((int) u); } else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_UINT32)) { diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c index 473cf71b46..7aa62b5072 100644 --- a/gtk/gtkaboutdialog.c +++ b/gtk/gtkaboutdialog.c @@ -249,8 +249,8 @@ static void follow_if_link (GtkAboutDialog GtkTextIter *iter); static void set_cursor_if_appropriate (GtkAboutDialog *about, GtkTextView *text_view, - gint x, - gint y); + int x, + int y); static void populate_credits_page (GtkAboutDialog *about); static void populate_license_page (GtkAboutDialog *about); static void populate_system_page (GtkAboutDialog *about); @@ -1728,8 +1728,8 @@ gtk_about_dialog_set_logo_icon_name (GtkAboutDialog *about, if (icon_name) { GtkIconTheme *icon_theme = gtk_icon_theme_get_for_display (gtk_widget_get_display (GTK_WIDGET (about))); - gint *sizes = gtk_icon_theme_get_icon_sizes (icon_theme, icon_name); - gint i, best_size = 0; + int *sizes = gtk_icon_theme_get_icon_sizes (icon_theme, icon_name); + int i, best_size = 0; for (i = 0; sizes[i]; i++) { @@ -1842,7 +1842,7 @@ text_view_released (GtkGestureClick *gesture, GtkWidget *text_view; GtkTextIter start, end, iter; GtkTextBuffer *buffer; - gint tx, ty; + int tx, ty; if (gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture)) != GDK_BUTTON_PRIMARY) return; @@ -1867,8 +1867,8 @@ text_view_released (GtkGestureClick *gesture, static void set_cursor_if_appropriate (GtkAboutDialog *about, GtkTextView *text_view, - gint x, - gint y) + int x, + int y) { GSList *tags = NULL, *tagp = NULL; GtkTextIter iter; @@ -1908,7 +1908,7 @@ text_view_motion (GtkEventControllerMotion *motion, double y, GtkAboutDialog *about) { - gint tx, ty; + int tx, ty; GtkWidget *widget; widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (motion)); @@ -2045,7 +2045,7 @@ text_buffer_new (GtkAboutDialog *about, static void add_credits_section (GtkAboutDialog *about, GtkGrid *grid, - gint *row, + int *row, gchar *title, gchar **people) { @@ -2173,7 +2173,7 @@ add_credits_section (GtkAboutDialog *about, static void populate_credits_page (GtkAboutDialog *about) { - gint row; + int row; row = 0; diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c index 2a861d23d6..0e45b3635a 100644 --- a/gtk/gtkaccelgroup.c +++ b/gtk/gtkaccelgroup.c @@ -275,7 +275,7 @@ gtk_accelerator_parse_with_keycode (const gchar *accelerator, { guint keyval; GdkModifierType mods; - gint len; + int len; gboolean error; if (accelerator_key) @@ -377,7 +377,7 @@ gtk_accelerator_parse_with_keycode (const gchar *accelerator, { char keystring[5]; gchar *endptr; - gint tmp_keycode; + int tmp_keycode; memcpy (keystring, accelerator, 4); keystring [4] = '\000'; @@ -424,7 +424,7 @@ gtk_accelerator_parse_with_keycode (const gchar *accelerator, if (keyval && accelerator_codes != NULL) { GdkKeymapKey *keys; - gint n_keys, i, j; + int n_keys, i, j; if (!gdk_display_map_keyval (display, keyval, &keys, &n_keys)) { diff --git a/gtk/gtkactionhelper.c b/gtk/gtkactionhelper.c index 7de1740dc5..99a0b796d5 100644 --- a/gtk/gtkactionhelper.c +++ b/gtk/gtkactionhelper.c @@ -70,7 +70,7 @@ struct _GtkActionHelper GtkButtonRole role; - gint reporting; + int reporting; }; enum diff --git a/gtk/gtkactionmuxer.c b/gtk/gtkactionmuxer.c index 31800680c2..2ad00251ad 100644 --- a/gtk/gtkactionmuxer.c +++ b/gtk/gtkactionmuxer.c @@ -990,7 +990,7 @@ static void gtk_action_muxer_free_group (gpointer data) { Group *group = data; - gint i; + int i; /* 'for loop' or 'four loop'? */ for (i = 0; i < 4; i++) @@ -1230,7 +1230,7 @@ gtk_action_muxer_insert (GtkActionMuxer *muxer, { gchar **actions; Group *group; - gint i; + int i; /* TODO: diff instead of ripout and replace */ gtk_action_muxer_remove (muxer, prefix); @@ -1284,7 +1284,7 @@ gtk_action_muxer_remove (GtkActionMuxer *muxer, if (group != NULL) { gchar **actions; - gint i; + int i; g_hash_table_steal (muxer->groups, prefix); diff --git a/gtk/gtkadjustment.c b/gtk/gtkadjustment.c index c25ceb3f9b..097a7bac14 100644 --- a/gtk/gtkadjustment.c +++ b/gtk/gtkadjustment.c @@ -335,7 +335,7 @@ gtk_adjustment_dispatch_properties_changed (GObject *object, GParamSpec **pspecs) { gboolean changed = FALSE; - gint i; + int i; G_OBJECT_CLASS (gtk_adjustment_parent_class)->dispatch_properties_changed (object, n_pspecs, pspecs); diff --git a/gtk/gtkappchooserbutton.c b/gtk/gtkappchooserbutton.c index 96559596ee..e86873f14d 100644 --- a/gtk/gtkappchooserbutton.c +++ b/gtk/gtkappchooserbutton.c @@ -117,7 +117,7 @@ struct _GtkAppChooserButton { gchar *content_type; gchar *heading; - gint last_active; + int last_active; gboolean show_dialog_item; gboolean show_default_item; gboolean modal; @@ -172,7 +172,7 @@ get_first_iter (GtkListStore *store, typedef struct { GtkAppChooserButton *self; GAppInfo *info; - gint active_index; + int active_index; } SelectAppData; static void @@ -238,7 +238,7 @@ gtk_app_chooser_button_select_application (GtkAppChooserButton *self, static void other_application_dialog_response_cb (GtkDialog *dialog, - gint response_id, + int response_id, gpointer user_data) { GtkAppChooserButton *self = user_data; diff --git a/gtk/gtkappchooserdialog.c b/gtk/gtkappchooserdialog.c index 3a6d5a97e3..3444af1174 100644 --- a/gtk/gtkappchooserdialog.c +++ b/gtk/gtkappchooserdialog.c @@ -124,7 +124,7 @@ add_or_find_application (GtkAppChooserDialog *self) static void gtk_app_chooser_dialog_response (GtkDialog *dialog, - gint response_id, + int response_id, gpointer user_data) { GtkAppChooserDialog *self = GTK_APP_CHOOSER_DIALOG (dialog); diff --git a/gtk/gtkappchooserwidget.c b/gtk/gtkappchooserwidget.c index 2f790c72c9..746fcf75d7 100644 --- a/gtk/gtkappchooserwidget.c +++ b/gtk/gtkappchooserwidget.c @@ -230,7 +230,7 @@ program_list_selection_activated (GtkTreeView *view, static gboolean gtk_app_chooser_search_equal_func (GtkTreeModel *model, - gint column, + int column, const gchar *key, GtkTreeIter *iter, gpointer user_data) @@ -263,7 +263,7 @@ gtk_app_chooser_search_equal_func (GtkTreeModel *model, } } -static gint +static int gtk_app_chooser_sort_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, @@ -274,7 +274,7 @@ gtk_app_chooser_sort_func (GtkTreeModel *model, gboolean a_heading, b_heading; gboolean a_default, b_default; gchar *a_name, *b_name, *a_casefold, *b_casefold; - gint retval = 0; + int retval = 0; /* this returns: * - <0 if a should show before b @@ -415,7 +415,7 @@ gtk_app_chooser_selection_func (GtkTreeSelection *selection, return !heading; } -static gint +static int compare_apps_func (gconstpointer a, gconstpointer b) { diff --git a/gtk/gtkapplication-dbus.c b/gtk/gtkapplication-dbus.c index a58112a503..99e7d0c832 100644 --- a/gtk/gtkapplication-dbus.c +++ b/gtk/gtkapplication-dbus.c @@ -593,7 +593,7 @@ gtk_application_impl_dbus_publish_menu (GtkApplicationImplDBus *dbus, guint *id, gchar **path) { - gint i; + int i; if (dbus->session == NULL) return; diff --git a/gtk/gtkapplication-quartz-menu.c b/gtk/gtkapplication-quartz-menu.c index 9b72b8e3c2..2f6402a044 100644 --- a/gtk/gtkapplication-quartz-menu.c +++ b/gtk/gtkapplication-quartz-menu.c @@ -107,7 +107,7 @@ icon_loaded (GObject *object, GNSMenuItem *item = user_data; GError *error = NULL; GdkPixbuf *pixbuf; - gint scale = 1; + int scale = 1; #ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER /* we need a run-time check for the backingScaleFactor selector because we @@ -279,7 +279,7 @@ icon_loaded (GObject *object, GtkIconTheme *theme; GtkIconPaintable *icon; - gint scale = 1; + int scale = 1; if (!parsed) { @@ -380,7 +380,7 @@ icon_loaded (GObject *object, static void menu_item_inserted (GtkMenuTrackerItem *item, - gint position, + int position, gpointer user_data) { GNSMenu *menu = user_data; @@ -389,7 +389,7 @@ menu_item_inserted (GtkMenuTrackerItem *item, } static void -menu_item_removed (gint position, +menu_item_removed (int position, gpointer user_data) { GNSMenu *menu = user_data; diff --git a/gtk/gtkapplication-quartz.c b/gtk/gtkapplication-quartz.c index d59a19b1e2..f80497f547 100644 --- a/gtk/gtkapplication-quartz.c +++ b/gtk/gtkapplication-quartz.c @@ -50,7 +50,7 @@ typedef struct GMenu *combined; GSList *inhibitors; - gint quit_inhibit; + int quit_inhibit; guint next_cookie; NSObject *delegate; } GtkApplicationImplQuartz; @@ -89,7 +89,7 @@ G_DEFINE_TYPE (GtkApplicationImplQuartz, gtk_application_impl_quartz, GTK_TYPE_A -(void)application:(NSApplication *)theApplication openFiles:(NSArray *)filenames { GFile **files; - gint i; + int i; GApplicationFlags flags; flags = g_application_get_flags (G_APPLICATION (quartz->impl.application)); diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c index 357491a9eb..d736e34a8b 100644 --- a/gtk/gtkapplication.c +++ b/gtk/gtkapplication.c @@ -296,7 +296,7 @@ gtk_application_shutdown (GApplication *g_application) static gboolean gtk_application_local_command_line (GApplication *application, gchar ***arguments, - gint *exit_status) + int *exit_status) { return G_APPLICATION_CLASS (gtk_application_parent_class)->local_command_line (application, arguments, exit_status); } diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c index 07dc9ba812..bc711301e2 100644 --- a/gtk/gtkapplicationwindow.c +++ b/gtk/gtkapplicationwindow.c @@ -465,7 +465,7 @@ gtk_application_window_real_size_allocate (GtkWidget *widget, { GtkAllocation menubar_allocation; GtkAllocation child_allocation; - gint menubar_height; + int menubar_height; GtkWidget *child; _gtk_window_set_allocation (GTK_WINDOW (widget), width, height, &child_allocation); diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c index c5da702416..af8365a1c5 100644 --- a/gtk/gtkassistant.c +++ b/gtk/gtkassistant.c @@ -125,7 +125,7 @@ struct _GtkAssistant GtkWidget *content; GtkWidget *action_area; GtkWidget *headerbar; - gint use_header_bar; + int use_header_bar; gboolean constructed; GList *pages; @@ -141,7 +141,7 @@ struct _GtkAssistant GListModel *model; - gint extra_buttons; + int extra_buttons; guint committed : 1; }; @@ -204,7 +204,7 @@ static void on_assistant_last (GtkWidget *wi static int gtk_assistant_add_page (GtkAssistant *assistant, GtkAssistantPage *page_info, - gint position); + int position); GType _gtk_assistant_accessible_get_type (void); @@ -320,7 +320,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkAssistant, gtk_assistant, GTK_TYPE_WINDOW, static void set_use_header_bar (GtkAssistant *assistant, - gint use_header_bar) + int use_header_bar) { if (use_header_bar == -1) return; @@ -633,8 +633,8 @@ gtk_assistant_class_init (GtkAssistantClass *class) gtk_widget_class_bind_template_callback (widget_class, on_assistant_last); } -static gint -default_forward_function (gint current_page, gpointer data) +static int +default_forward_function (int current_page, gpointer data) { GtkAssistant *assistant = GTK_ASSISTANT (data); GtkAssistantPage *page_info; @@ -663,7 +663,7 @@ static gboolean last_button_visible (GtkAssistant *assistant, GtkAssistantPage *page) { GtkAssistantPage *page_info; - gint count, page_num, n_pages; + int count, page_num, n_pages; if (page == NULL) return FALSE; @@ -703,7 +703,7 @@ update_actions_size (GtkAssistant *assistant) { GList *l; GtkAssistantPage *page; - gint buttons, page_buttons; + int buttons, page_buttons; if (!assistant->current_page) return; @@ -749,7 +749,7 @@ compute_last_button_state (GtkAssistant *assistant) static void compute_progress_state (GtkAssistant *assistant) { - gint page_num, n_pages; + int page_num, n_pages; n_pages = gtk_assistant_get_n_pages (assistant); page_num = gtk_assistant_get_current_page (assistant); @@ -919,7 +919,7 @@ update_title_state (GtkAssistant *assistant) static void set_current_page (GtkAssistant *assistant, - gint page_num) + int page_num) { assistant->current_page = (GtkAssistantPage *)g_list_nth_data (assistant->pages, page_num); @@ -942,7 +942,7 @@ set_current_page (GtkAssistant *assistant, if (!gtk_widget_child_focus (assistant->current_page->page, GTK_DIR_TAB_FORWARD)) { GtkWidget *button[6]; - gint i; + int i; /* find the best button to focus */ button[0] = assistant->apply; @@ -963,11 +963,11 @@ set_current_page (GtkAssistant *assistant, } } -static gint +static int compute_next_step (GtkAssistant *assistant) { GtkAssistantPage *page_info; - gint current_page, n_pages, next_page; + int current_page, n_pages, next_page; current_page = gtk_assistant_get_current_page (assistant); page_info = assistant->current_page; @@ -1348,7 +1348,7 @@ gtk_assistant_map (GtkWidget *widget) GtkAssistant *assistant = GTK_ASSISTANT (widget); GList *page_node; GtkAssistantPage *page; - gint page_num; + int page_num; /* if there's no default page, pick the first one */ page = NULL; @@ -1430,7 +1430,7 @@ gtk_assistant_new (void) * page in the @assistant, or -1 if the @assistant has no pages, * or no current page. */ -gint +int gtk_assistant_get_current_page (GtkAssistant *assistant) { g_return_val_if_fail (GTK_IS_ASSISTANT (assistant), -1); @@ -1457,7 +1457,7 @@ gtk_assistant_get_current_page (GtkAssistant *assistant) */ void gtk_assistant_set_current_page (GtkAssistant *assistant, - gint page_num) + int page_num) { GtkAssistantPage *page; @@ -1555,7 +1555,7 @@ gtk_assistant_previous_page (GtkAssistant *assistant) * * Returns: the number of pages in the @assistant */ -gint +int gtk_assistant_get_n_pages (GtkAssistant *assistant) { g_return_val_if_fail (GTK_IS_ASSISTANT (assistant), 0); @@ -1576,7 +1576,7 @@ gtk_assistant_get_n_pages (GtkAssistant *assistant) */ GtkWidget* gtk_assistant_get_nth_page (GtkAssistant *assistant, - gint page_num) + int page_num) { GtkAssistantPage *page; GList *elem; @@ -1606,7 +1606,7 @@ gtk_assistant_get_nth_page (GtkAssistant *assistant, * * Returns: the index (starting at 0) of the inserted page */ -gint +int gtk_assistant_prepend_page (GtkAssistant *assistant, GtkWidget *page) { @@ -1625,7 +1625,7 @@ gtk_assistant_prepend_page (GtkAssistant *assistant, * * Returns: the index (starting at 0) of the inserted page */ -gint +int gtk_assistant_append_page (GtkAssistant *assistant, GtkWidget *page) { @@ -1646,10 +1646,10 @@ gtk_assistant_append_page (GtkAssistant *assistant, * * Returns: the index (starting from 0) of the inserted page */ -gint +int gtk_assistant_insert_page (GtkAssistant *assistant, GtkWidget *page, - gint position) + int position) { GtkAssistantPage *page_info; @@ -1668,9 +1668,9 @@ gtk_assistant_insert_page (GtkAssistant *assistant, static int gtk_assistant_add_page (GtkAssistant *assistant, GtkAssistantPage *page_info, - gint position) + int position) { - gint n_pages; + int n_pages; GtkWidget *sibling; char *name; @@ -1743,7 +1743,7 @@ gtk_assistant_add_page (GtkAssistant *assistant, */ void gtk_assistant_remove_page (GtkAssistant *assistant, - gint page_num) + int page_num) { GtkWidget *page; @@ -2100,7 +2100,7 @@ typedef GtkWindowAccessibleClass GtkAssistantAccessibleClass; G_DEFINE_TYPE (GtkAssistantAccessible, _gtk_assistant_accessible, GTK_TYPE_WINDOW_ACCESSIBLE); -static gint +static int gtk_assistant_accessible_get_n_children (AtkObject *accessible) { GtkWidget *widget; @@ -2116,11 +2116,11 @@ gtk_assistant_accessible_get_n_children (AtkObject *accessible) static AtkObject * gtk_assistant_accessible_ref_child (AtkObject *accessible, - gint index) + int index) { GtkAssistant *assistant; GtkWidget *widget, *child; - gint n_pages; + int n_pages; AtkObject *obj; const gchar *title; diff --git a/gtk/gtkassistant.h b/gtk/gtkassistant.h index 16ed2d7b16..753703f93c 100644 --- a/gtk/gtkassistant.h +++ b/gtk/gtkassistant.h @@ -94,7 +94,7 @@ typedef struct _GtkAssistantPage GtkAssistantPage; * * Returns: The next page number. */ -typedef gint (*GtkAssistantPageFunc) (gint current_page, gpointer data); +typedef int (*GtkAssistantPageFunc) (int current_page, gpointer data); GDK_AVAILABLE_IN_ALL GType gtk_assistant_page_get_type (void) G_GNUC_CONST; @@ -107,28 +107,28 @@ void gtk_assistant_next_page (GtkAssistant GDK_AVAILABLE_IN_ALL void gtk_assistant_previous_page (GtkAssistant *assistant); GDK_AVAILABLE_IN_ALL -gint gtk_assistant_get_current_page (GtkAssistant *assistant); +int gtk_assistant_get_current_page (GtkAssistant *assistant); GDK_AVAILABLE_IN_ALL void gtk_assistant_set_current_page (GtkAssistant *assistant, - gint page_num); + int page_num); GDK_AVAILABLE_IN_ALL -gint gtk_assistant_get_n_pages (GtkAssistant *assistant); +int gtk_assistant_get_n_pages (GtkAssistant *assistant); GDK_AVAILABLE_IN_ALL GtkWidget *gtk_assistant_get_nth_page (GtkAssistant *assistant, - gint page_num); + int page_num); GDK_AVAILABLE_IN_ALL -gint gtk_assistant_prepend_page (GtkAssistant *assistant, +int gtk_assistant_prepend_page (GtkAssistant *assistant, GtkWidget *page); GDK_AVAILABLE_IN_ALL -gint gtk_assistant_append_page (GtkAssistant *assistant, +int gtk_assistant_append_page (GtkAssistant *assistant, GtkWidget *page); GDK_AVAILABLE_IN_ALL -gint gtk_assistant_insert_page (GtkAssistant *assistant, +int gtk_assistant_insert_page (GtkAssistant *assistant, GtkWidget *page, - gint position); + int position); GDK_AVAILABLE_IN_ALL void gtk_assistant_remove_page (GtkAssistant *assistant, - gint page_num); + int page_num); GDK_AVAILABLE_IN_ALL void gtk_assistant_set_forward_page_func (GtkAssistant *assistant, GtkAssistantPageFunc page_func, diff --git a/gtk/gtkbookmarksmanager.c b/gtk/gtkbookmarksmanager.c index a944e91294..42ec6b1296 100644 --- a/gtk/gtkbookmarksmanager.c +++ b/gtk/gtkbookmarksmanager.c @@ -89,7 +89,7 @@ parse_bookmarks (const char *contents) { gchar **lines, *space; GSList *bookmarks = NULL; - gint i; + int i; lines = g_strsplit (contents, "\n", -1); @@ -379,7 +379,7 @@ _gtk_bookmarks_manager_has_bookmark (GtkBookmarksManager *manager, gboolean _gtk_bookmarks_manager_insert_bookmark (GtkBookmarksManager *manager, GFile *file, - gint position, + int position, GError **error) { GSList *link; @@ -463,7 +463,7 @@ _gtk_bookmarks_manager_remove_bookmark (GtkBookmarksManager *manager, gboolean _gtk_bookmarks_manager_reorder_bookmark (GtkBookmarksManager *manager, GFile *file, - gint new_position, + int new_position, GError **error) { GSList *link; diff --git a/gtk/gtkbookmarksmanagerprivate.h b/gtk/gtkbookmarksmanagerprivate.h index b876511a98..e61c713a46 100644 --- a/gtk/gtkbookmarksmanagerprivate.h +++ b/gtk/gtkbookmarksmanagerprivate.h @@ -56,7 +56,7 @@ GSList *_gtk_bookmarks_manager_list_bookmarks (GtkBookmarksManager *manager); gboolean _gtk_bookmarks_manager_insert_bookmark (GtkBookmarksManager *manager, GFile *file, - gint position, + int position, GError **error); gboolean _gtk_bookmarks_manager_remove_bookmark (GtkBookmarksManager *manager, @@ -65,7 +65,7 @@ gboolean _gtk_bookmarks_manager_remove_bookmark (GtkBookmarksManager *manager, gboolean _gtk_bookmarks_manager_reorder_bookmark (GtkBookmarksManager *manager, GFile *file, - gint new_position, + int new_position, GError **error); gboolean _gtk_bookmarks_manager_has_bookmark (GtkBookmarksManager *manager, diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c index d4c296e7df..4e6a228cb3 100644 --- a/gtk/gtkbox.c +++ b/gtk/gtkbox.c @@ -323,7 +323,7 @@ gtk_box_buildable_iface_init (GtkBuildableIface *iface) **/ GtkWidget* gtk_box_new (GtkOrientation orientation, - gint spacing) + int spacing) { return g_object_new (GTK_TYPE_BOX, "orientation", orientation, @@ -390,7 +390,7 @@ gtk_box_get_homogeneous (GtkBox *box) */ void gtk_box_set_spacing (GtkBox *box, - gint spacing) + int spacing) { GtkBoxLayout *box_layout; @@ -412,7 +412,7 @@ gtk_box_set_spacing (GtkBox *box, * * Returns: spacing between children **/ -gint +int gtk_box_get_spacing (GtkBox *box) { GtkLayoutManager *box_layout; diff --git a/gtk/gtkbox.h b/gtk/gtkbox.h index 01f191c97e..3d74fb73ce 100644 --- a/gtk/gtkbox.h +++ b/gtk/gtkbox.h @@ -70,7 +70,7 @@ GDK_AVAILABLE_IN_ALL GType gtk_box_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkWidget* gtk_box_new (GtkOrientation orientation, - gint spacing); + int spacing); GDK_AVAILABLE_IN_ALL void gtk_box_set_homogeneous (GtkBox *box, gboolean homogeneous); @@ -78,9 +78,9 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_box_get_homogeneous (GtkBox *box); GDK_AVAILABLE_IN_ALL void gtk_box_set_spacing (GtkBox *box, - gint spacing); + int spacing); GDK_AVAILABLE_IN_ALL -gint gtk_box_get_spacing (GtkBox *box); +int gtk_box_get_spacing (GtkBox *box); GDK_AVAILABLE_IN_ALL void gtk_box_set_baseline_position (GtkBox *box, GtkBaselinePosition position); diff --git a/gtk/gtkboxlayout.c b/gtk/gtkboxlayout.c index 042d4084e1..cb9bf024a0 100644 --- a/gtk/gtkboxlayout.c +++ b/gtk/gtkboxlayout.c @@ -162,8 +162,8 @@ gtk_box_layout_get_property (GObject *gobject, static void count_expand_children (GtkWidget *widget, GtkOrientation orientation, - gint *visible_children, - gint *expand_children) + int *visible_children, + int *expand_children) { GtkWidget *child; @@ -183,13 +183,13 @@ count_expand_children (GtkWidget *widget, } } -static gint +static int get_spacing (GtkBoxLayout *self, GtkCssNode *node) { GtkCssStyle *style = gtk_css_node_get_style (node); GtkCssValue *border_spacing; - gint css_spacing; + int css_spacing; border_spacing = style->size->border_spacing; if (self->orientation == GTK_ORIENTATION_HORIZONTAL) @@ -457,22 +457,22 @@ gtk_box_layout_allocate (GtkLayoutManager *layout_manager, { GtkBoxLayout *self = GTK_BOX_LAYOUT (layout_manager); GtkWidget *child; - gint nvis_children; - gint nexpand_children; + int nvis_children; + int nexpand_children; GtkTextDirection direction; GtkAllocation child_allocation; GtkRequestedSize *sizes; - gint child_minimum_baseline, child_natural_baseline; - gint minimum_above, natural_above; - gint minimum_below, natural_below; + int child_minimum_baseline, child_natural_baseline; + int minimum_above, natural_above; + int minimum_below, natural_below; gboolean have_baseline; - gint extra_space; - gint children_minimum_size = 0; - gint size_given_to_child; - gint n_extra_widgets = 0; /* Number of widgets that receive 1 extra px */ - gint x = 0, y = 0, i; - gint child_size; - gint spacing; + int extra_space; + int children_minimum_size = 0; + int size_given_to_child; + int n_extra_widgets = 0; /* Number of widgets that receive 1 extra px */ + int x = 0, y = 0, i; + int child_size; + int spacing; count_expand_children (widget, self->orientation, &nvis_children, &nexpand_children); diff --git a/gtk/gtkbuildable.h b/gtk/gtkbuildable.h index 1dc1b08171..560fe9dcce 100644 --- a/gtk/gtkbuildable.h +++ b/gtk/gtkbuildable.h @@ -226,8 +226,8 @@ GDK_AVAILABLE_IN_ALL GPtrArray *gtk_buildable_parse_context_get_element_stack (GtkBuildableParseContext *context); GDK_AVAILABLE_IN_ALL void gtk_buildable_parse_context_get_position (GtkBuildableParseContext *context, - gint *line_number, - gint *char_number); + int *line_number, + int *char_number); G_END_DECLS diff --git a/gtk/gtkbuilder-menus.c b/gtk/gtkbuilder-menus.c index a1783629b5..14d54cc832 100644 --- a/gtk/gtkbuilder-menus.c +++ b/gtk/gtkbuilder-menus.c @@ -305,7 +305,7 @@ gtk_builder_menu_text (GtkBuildableParseContext *context, GError **error) { GtkBuilderMenuState *state = user_data; - gint i; + int i; for (i = 0; i < text_len; i++) if (!g_ascii_isspace (text[i])) diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index b97f0bdb27..705bc52ec4 100644 --- a/gtk/gtkbuilder.c +++ b/gtk/gtkbuilder.c @@ -450,8 +450,8 @@ typedef struct gchar *object; GParamSpec *pspec; gchar *value; - gint line; - gint col; + int line; + int col; } DelayedProperty; typedef struct @@ -919,7 +919,7 @@ _gtk_builder_apply_properties (GtkBuilder *builder, GtkBuildableIface *iface; GtkBuildable *buildable; gboolean custom_set_property; - gint i; + int i; g_assert (info->object != NULL); g_assert (info->type != G_TYPE_INVALID); @@ -2108,7 +2108,7 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, } case G_TYPE_ENUM: { - gint enum_value; + int enum_value; if (!_gtk_builder_enum_from_string (type, string, &enum_value, error)) { ret = FALSE; @@ -2408,13 +2408,13 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, gboolean _gtk_builder_enum_from_string (GType type, const gchar *string, - gint *enum_value, + int *enum_value, GError **error) { GEnumClass *eclass; GEnumValue *ev; gchar *endptr; - gint value; + int value; gboolean ret; g_return_val_if_fail (G_TYPE_IS_ENUM (type), FALSE); @@ -2847,7 +2847,7 @@ _gtk_builder_prefix_error (GtkBuilder *builder, GError **error) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); - gint line, col; + int line, col; gtk_buildable_parse_context_get_position (context, &line, &col); g_prefix_error (error, "%s:%d:%d ", priv->filename, line, col); @@ -2874,7 +2874,7 @@ _gtk_builder_error_unhandled_tag (GtkBuilder *builder, GError **error) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); - gint line, col; + int line, col; gtk_buildable_parse_context_get_position (context, &line, &col); g_set_error (error, @@ -2907,7 +2907,7 @@ _gtk_builder_check_parent (GtkBuilder *builder, { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); GPtrArray *stack; - gint line, col; + int line, col; const gchar *parent; const gchar *element; @@ -2933,8 +2933,8 @@ _gtk_builder_check_parent (GtkBuilder *builder, GObject * gtk_builder_lookup_object (GtkBuilder *builder, const gchar *name, - gint line, - gint col, + int line, + int col, GError **error) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); @@ -2970,8 +2970,8 @@ gtk_builder_lookup_object (GtkBuilder *builder, GObject * _gtk_builder_lookup_object (GtkBuilder *builder, const gchar *name, - gint line, - gint col) + int line, + int col) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); GObject *obj; diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c index 5014b161f4..345cfb0f30 100644 --- a/gtk/gtkbuilderparser.c +++ b/gtk/gtkbuilderparser.c @@ -343,8 +343,8 @@ gtk_buildable_parse_context_get_element_stack (GtkBuildableParseContext *context */ void gtk_buildable_parse_context_get_position (GtkBuildableParseContext *context, - gint *line_number, - gint *char_number) + int *line_number, + int *char_number) { if (context->ctx) @@ -397,7 +397,7 @@ error_missing_attribute (ParserData *data, const gchar *attribute, GError **error) { - gint line, col; + int line, col; gtk_buildable_parse_context_get_position (&data->ctx, &line, &col); @@ -414,7 +414,7 @@ error_invalid_tag (ParserData *data, const gchar *expected, GError **error) { - gint line, col; + int line, col; gtk_buildable_parse_context_get_position (&data->ctx, &line, &col); @@ -437,7 +437,7 @@ error_unhandled_tag (ParserData *data, const gchar *tag, GError **error) { - gint line, col; + int line, col; gtk_buildable_parse_context_get_position (&data->ctx, &line, &col); g_set_error (error, @@ -496,8 +496,8 @@ parse_requires (ParserData *data, const gchar *library = NULL; const gchar *version = NULL; gchar **split; - gint version_major = 0; - gint version_minor = 0; + int version_major = 0; + int version_minor = 0; if (!g_markup_collect_attributes (element_name, names, values, error, G_MARKUP_COLLECT_STRING, "lib", &library, @@ -560,7 +560,7 @@ parse_object (GtkBuildableParseContext *context, const gchar *type_func = NULL; const gchar *object_id = NULL; gchar *internal_id = NULL; - gint line; + int line; child_info = state_peek_info (data, ChildInfo); if (child_info && child_info->tag_type == TAG_OBJECT) @@ -688,7 +688,7 @@ parse_template (GtkBuildableParseContext *context, ObjectInfo *object_info; const gchar *object_class = NULL; const gchar *parent_class = NULL; - gint line; + int line; GType template_type; GType parsed_type; @@ -860,7 +860,7 @@ parse_property (ParserData *data, gboolean translatable = FALSE; ObjectInfo *object_info; GParamSpec *pspec = NULL; - gint line, col; + int line, col; object_info = state_peek_info (data, ObjectInfo); if (!object_info || diff --git a/gtk/gtkbuilderprecompile.c b/gtk/gtkbuilderprecompile.c index 198806e6fc..647d478114 100644 --- a/gtk/gtkbuilderprecompile.c +++ b/gtk/gtkbuilderprecompile.c @@ -178,7 +178,7 @@ static const GMarkupParser record_parser = NULL, // error, fails immediately }; -static gint +static int compare_string (gconstpointer _a, gconstpointer _b) { diff --git a/gtk/gtkbuilderprivate.h b/gtk/gtkbuilderprivate.h index 1bee1bda81..a401f69a33 100644 --- a/gtk/gtkbuilderprivate.h +++ b/gtk/gtkbuilderprivate.h @@ -72,8 +72,8 @@ typedef struct { gboolean translatable:1; gboolean bound:1; gchar *context; - gint line; - gint col; + int line; + int col; } PropertyInfo; typedef struct _ExpressionInfo ExpressionInfo; @@ -124,8 +124,8 @@ typedef struct gchar *source; gchar *source_property; GBindingFlags flags; - gint line; - gint col; + int line; + int col; } BindingInfo; typedef struct @@ -135,15 +135,15 @@ typedef struct GParamSpec *target_pspec; char *object_name; ExpressionInfo *expr; - gint line; - gint col; + int line; + int col; } BindingExpressionInfo; typedef struct { guint tag_type; gchar *library; - gint major; - gint minor; + int major; + int minor; } RequiresInfo; struct _GtkBuildableParseContext { @@ -182,10 +182,10 @@ typedef struct { const char **requested_objects; /* NULL if all the objects are requested */ gboolean inside_requested_object; - gint requested_object_level; - gint cur_object_level; + int requested_object_level; + int cur_object_level; - gint object_counter; + int object_counter; GHashTable *object_ids; } ParserData; @@ -238,7 +238,7 @@ gboolean _gtk_builder_boolean_from_string (const gchar *string, GError **error); gboolean _gtk_builder_enum_from_string (GType type, const gchar *string, - gint *enum_value, + int *enum_value, GError **error); gboolean _gtk_builder_flags_from_string (GType type, GFlagsValue *aliases, @@ -276,13 +276,13 @@ gboolean _gtk_builder_check_parent (GtkBuilder *builder, GError **error); GObject *gtk_builder_lookup_object (GtkBuilder *builder, const gchar *name, - gint line, - gint col, + int line, + int col, GError **error); GObject *_gtk_builder_lookup_object (GtkBuilder *builder, const gchar *name, - gint line, - gint col); + int line, + int col); gboolean _gtk_builder_lookup_failed (GtkBuilder *builder, GError **error); GModule *gtk_builder_get_module (GtkBuilder *builder); diff --git a/gtk/gtkbuilderscope.c b/gtk/gtkbuilderscope.c index de6003b7d5..4b121568a2 100644 --- a/gtk/gtkbuilderscope.c +++ b/gtk/gtkbuilderscope.c @@ -197,7 +197,7 @@ type_name_mangle (const gchar *name, gboolean split_first_cap) { GString *symbol_name = g_string_new (""); - gint i; + int i; for (i = 0; name[i] != '\0'; i++) { diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 40f022f991..0c727174d1 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -218,16 +218,16 @@ struct _GtkCalendar GDateTime *date; - gint day_month[6][7]; - gint day[6][7]; + int day_month[6][7]; + int day[6][7]; - gint num_marked_dates; - gint marked_date[31]; + int num_marked_dates; + int marked_date[31]; - gint focus_row; - gint focus_col; + int focus_row; + int focus_col; - gint week_start; + int week_start; }; struct _GtkCalendarClass @@ -264,10 +264,10 @@ static void gtk_calendar_focus_controller_focus (GtkEventController * GtkWidget *widget); static void calendar_invalidate_day (GtkCalendar *widget, - gint row, - gint col); + int row, + int col); static void calendar_invalidate_day_num (GtkCalendar *widget, - gint day); + int day); static gboolean gtk_calendar_scroll_controller_scroll (GtkEventControllerScroll *scroll, gdouble dx, @@ -551,7 +551,7 @@ gtk_calendar_init (GtkCalendar *calendar) GtkGesture *gesture; GtkDragSource *source; GtkDropTarget *target; - gint i; + int i; #ifdef G_OS_WIN32 wchar_t wbuffer[100]; #else @@ -562,8 +562,8 @@ gtk_calendar_init (GtkCalendar *calendar) gchar *year_before; #ifdef HAVE__NL_TIME_FIRST_WEEKDAY union { unsigned int word; char *string; } langinfo; - gint week_1stday = 0; - gint first_weekday = 1; + int week_1stday = 0; + int first_weekday = 1; guint week_origin; #else gchar *week_start; @@ -961,8 +961,8 @@ calendar_select_and_focus_day (GtkCalendar *calendar, int day) { GDateTime *new_date; - gint row; - gint col; + int row; + int col; for (row = 0; row < 6; row ++) for (col = 0; col < 7; col++) @@ -1080,15 +1080,15 @@ gtk_calendar_get_property (GObject *object, static void calendar_invalidate_day_num (GtkCalendar *calendar, - gint day) + int day) { gtk_widget_queue_draw (GTK_WIDGET (calendar)); } static void calendar_invalidate_day (GtkCalendar *calendar, - gint row, - gint col) + int row, + int col) { gtk_widget_queue_draw (GTK_WIDGET (calendar)); } @@ -1237,10 +1237,10 @@ gtk_calendar_key_controller_key_pressed (GtkEventControllerKey *controller, GtkWidget *widget) { GtkCalendar *calendar = GTK_CALENDAR (widget); - gint return_val; - gint old_focus_row; - gint old_focus_col; - gint row, col, day; + int return_val; + int old_focus_row; + int old_focus_col; + int row, col, day; return_val = FALSE; diff --git a/gtk/gtkcellarea.c b/gtk/gtkcellarea.c index 1a161db23f..8eb34534cf 100644 --- a/gtk/gtkcellarea.c +++ b/gtk/gtkcellarea.c @@ -75,8 +75,8 @@ * * |[ * GtkTreeIter iter; - * gint minimum_width; - * gint natural_width; + * int minimum_width; + * int natural_width; * * valid = gtk_tree_model_get_iter_first (model, &iter); * while (valid) @@ -111,8 +111,8 @@ * |[ * static void * foo_get_preferred_width (GtkWidget *widget, - * gint *minimum_size, - * gint *natural_size) + * int *minimum_size, + * int *natural_size) * { * Foo *foo = FOO (widget); * FooPrivate *priv = foo->priv; @@ -141,10 +141,10 @@ * * |[ * GtkTreeIter iter; - * gint minimum_height; - * gint natural_height; - * gint full_minimum_height = 0; - * gint full_natural_height = 0; + * int minimum_height; + * int natural_height; + * int full_minimum_height = 0; + * int full_natural_height = 0; * * valid = gtk_tree_model_get_iter_first (model, &iter); * while (valid) @@ -197,8 +197,8 @@ * GtkAllocation allocation; * GdkRectangle cell_area = { 0, }; * GtkTreeIter iter; - * gint minimum_width; - * gint natural_width; + * int minimum_width; + * int natural_width; * * gtk_widget_get_allocation (widget, &allocation); * cell_area.width = allocation.width; @@ -262,7 +262,7 @@ * { * Foo *foo = FOO (widget); * FooPrivate *priv = foo->priv; - * gint focus_row; + * int focus_row; * gboolean have_focus = FALSE; * * focus_row = priv->focus_row; @@ -385,7 +385,7 @@ static void gtk_cell_area_real_foreach_alloc (GtkCellArea const GdkRectangle *background_area, GtkCellAllocCallback callback, gpointer callback_data); -static gint gtk_cell_area_real_event (GtkCellArea *area, +static int gtk_cell_area_real_event (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, GdkEvent *event, @@ -412,25 +412,25 @@ static GtkSizeRequestMode gtk_cell_area_real_get_request_mode (GtkCellArea static void gtk_cell_area_real_get_preferred_width (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_width, - gint *natural_width); + int *minimum_width, + int *natural_width); static void gtk_cell_area_real_get_preferred_height (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_height, - gint *natural_height); + int *minimum_height, + int *natural_height); static void gtk_cell_area_real_get_preferred_height_for_width (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height); + int width, + int *minimum_height, + int *natural_height); static void gtk_cell_area_real_get_preferred_width_for_height (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint height, - gint *minimum_width, - gint *natural_width); + int height, + int *minimum_width, + int *natural_width); static gboolean gtk_cell_area_real_is_activatable (GtkCellArea *area); static gboolean gtk_cell_area_real_activate (GtkCellArea *area, GtkCellAreaContext *context, @@ -450,7 +450,7 @@ static void gtk_cell_area_clear (GtkCellLayout static void gtk_cell_area_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *renderer, const gchar *attribute, - gint column); + int column); static void gtk_cell_area_set_cell_data_func (GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkCellLayoutDataFunc func, @@ -460,7 +460,7 @@ static void gtk_cell_area_clear_attributes (GtkCellLayout GtkCellRenderer *renderer); static void gtk_cell_area_reorder (GtkCellLayout *cell_layout, GtkCellRenderer *cell, - gint position); + int position); static GList *gtk_cell_area_get_cells (GtkCellLayout *cell_layout); static GtkCellArea *gtk_cell_area_get_area (GtkCellLayout *cell_layout); @@ -498,8 +498,8 @@ typedef struct { /* Used in foreach loop to get a cell by position */ typedef struct { - gint x; - gint y; + int x; + int y; GtkCellRenderer *renderer; GdkRectangle cell_area; } CellByPositionData; @@ -507,7 +507,7 @@ typedef struct { /* Attribute/Cell metadata */ typedef struct { const gchar *attribute; - gint column; + int column; } CellAttribute; typedef struct { @@ -525,9 +525,9 @@ static CellInfo *cell_info_new (GtkCellLayoutDataFunc func, static void cell_info_free (CellInfo *info); static CellAttribute *cell_attribute_new (GtkCellRenderer *renderer, const gchar *attribute, - gint column); + int column); static void cell_attribute_free (CellAttribute *attribute); -static gint cell_attribute_find (CellAttribute *cell_attribute, +static int cell_attribute_find (CellAttribute *cell_attribute, const gchar *attribute); /* Internal functions/signal emissions */ @@ -850,7 +850,7 @@ cell_info_free (CellInfo *info) static CellAttribute * cell_attribute_new (GtkCellRenderer *renderer, const gchar *attribute, - gint column) + int column) { GParamSpec *pspec; @@ -880,7 +880,7 @@ cell_attribute_free (CellAttribute *attribute) } /* GCompareFunc for g_slist_find_custom() */ -static gint +static int cell_attribute_find (CellAttribute *cell_attribute, const gchar *attribute) { @@ -1011,7 +1011,7 @@ gtk_cell_area_real_foreach_alloc (GtkCellArea *area, g_type_name (G_TYPE_FROM_INSTANCE (area))); } -static gint +static int gtk_cell_area_real_event (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, @@ -1306,8 +1306,8 @@ static void gtk_cell_area_real_get_preferred_width (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_width, - gint *natural_width) + int *minimum_width, + int *natural_width) { g_warning ("GtkCellAreaClass::get_preferred_width not implemented for '%s'", g_type_name (G_TYPE_FROM_INSTANCE (area))); @@ -1317,8 +1317,8 @@ static void gtk_cell_area_real_get_preferred_height (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_height, - gint *natural_height) + int *minimum_height, + int *natural_height) { g_warning ("GtkCellAreaClass::get_preferred_height not implemented for '%s'", g_type_name (G_TYPE_FROM_INSTANCE (area))); @@ -1328,9 +1328,9 @@ static void gtk_cell_area_real_get_preferred_height_for_width (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height) + int width, + int *minimum_height, + int *natural_height) { /* If the area doesnt do height-for-width, fallback on base preferred height */ GTK_CELL_AREA_GET_CLASS (area)->get_preferred_height (area, context, widget, minimum_height, natural_height); @@ -1340,9 +1340,9 @@ static void gtk_cell_area_real_get_preferred_width_for_height (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint height, - gint *minimum_width, - gint *natural_width) + int height, + int *minimum_width, + int *natural_width) { /* If the area doesnt do width-for-height, fallback on base preferred width */ GTK_CELL_AREA_GET_CLASS (area)->get_preferred_width (area, context, widget, minimum_width, natural_width); @@ -1493,7 +1493,7 @@ static void gtk_cell_area_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *renderer, const gchar *attribute, - gint column) + int column) { gtk_cell_area_attribute_connect (GTK_CELL_AREA (cell_layout), renderer, attribute, column); @@ -1531,7 +1531,7 @@ gtk_cell_area_clear_attributes (GtkCellLayout *cell_layout, static void gtk_cell_area_reorder (GtkCellLayout *cell_layout, GtkCellRenderer *cell, - gint position) + int position) { g_warning ("GtkCellLayout::reorder not implemented for '%s'", g_type_name (G_TYPE_FROM_INSTANCE (cell_layout))); @@ -1747,7 +1747,7 @@ gtk_cell_area_foreach_alloc (GtkCellArea *area, * * Returns: %TRUE if the event was handled by @area. */ -gint +int gtk_cell_area_event (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, @@ -1901,8 +1901,8 @@ gtk_cell_area_get_cell_at_position (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, const GdkRectangle *cell_area, - gint x, - gint y, + int x, + int y, GdkRectangle *alloc_area) { CellByPositionData data = { x, y, NULL, { 0, } }; @@ -2014,8 +2014,8 @@ void gtk_cell_area_get_preferred_width (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_width, - gint *natural_width) + int *minimum_width, + int *natural_width) { g_return_if_fail (GTK_IS_CELL_AREA (area)); g_return_if_fail (GTK_IS_WIDGET (widget)); @@ -2052,9 +2052,9 @@ void gtk_cell_area_get_preferred_height_for_width (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height) + int width, + int *minimum_height, + int *natural_height) { GtkCellAreaClass *class; @@ -2086,8 +2086,8 @@ void gtk_cell_area_get_preferred_height (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_height, - gint *natural_height) + int *minimum_height, + int *natural_height) { g_return_if_fail (GTK_IS_CELL_AREA (area)); g_return_if_fail (GTK_IS_WIDGET (widget)); @@ -2124,9 +2124,9 @@ void gtk_cell_area_get_preferred_width_for_height (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint height, - gint *minimum_width, - gint *natural_width) + int height, + int *minimum_width, + int *natural_width) { GtkCellAreaClass *class; @@ -2155,7 +2155,7 @@ void gtk_cell_area_attribute_connect (GtkCellArea *area, GtkCellRenderer *renderer, const gchar *attribute, - gint column) + int column) { GtkCellAreaPrivate *priv = gtk_cell_area_get_instance_private (area); CellInfo *info; @@ -2260,7 +2260,7 @@ gtk_cell_area_attribute_disconnect (GtkCellArea *area, * * Returns: the model column, or -1 */ -gint +int gtk_cell_area_attribute_get_column (GtkCellArea *area, GtkCellRenderer *renderer, const gchar *attribute) @@ -3454,9 +3454,9 @@ gtk_cell_area_request_renderer (GtkCellArea *area, GtkCellRenderer *renderer, GtkOrientation orientation, GtkWidget *widget, - gint for_size, - gint *minimum_size, - gint *natural_size) + int for_size, + int *minimum_size, + int *natural_size) { GtkBorder border; GtkStyleContext *context; diff --git a/gtk/gtkcellarea.h b/gtk/gtkcellarea.h index 4a3d98e8dc..eecb6b3e36 100644 --- a/gtk/gtkcellarea.h +++ b/gtk/gtkcellarea.h @@ -189,7 +189,7 @@ struct _GtkCellAreaClass const GdkRectangle *background_area, GtkCellAllocCallback callback, gpointer callback_data); - gint (* event) (GtkCellArea *area, + int (* event) (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, GdkEvent *event, @@ -217,25 +217,25 @@ struct _GtkCellAreaClass void (* get_preferred_width) (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_width, - gint *natural_width); + int *minimum_width, + int *natural_width); void (* get_preferred_height_for_width) (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height); + int width, + int *minimum_height, + int *natural_height); void (* get_preferred_height) (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_height, - gint *natural_height); + int *minimum_height, + int *natural_height); void (* get_preferred_width_for_height) (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint height, - gint *minimum_width, - gint *natural_width); + int height, + int *minimum_width, + int *natural_width); /* Cell Properties */ void (* set_cell_property) (GtkCellArea *area, @@ -291,7 +291,7 @@ void gtk_cell_area_foreach_alloc (GtkCellArea GtkCellAllocCallback callback, gpointer callback_data); GDK_AVAILABLE_IN_ALL -gint gtk_cell_area_event (GtkCellArea *area, +int gtk_cell_area_event (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, GdkEvent *event, @@ -319,8 +319,8 @@ GtkCellRenderer *gtk_cell_area_get_cell_at_position (GtkCellArea GtkCellAreaContext *context, GtkWidget *widget, const GdkRectangle *cell_area, - gint x, - gint y, + int x, + int y, GdkRectangle *alloc_area); /* Geometry */ @@ -335,28 +335,28 @@ GDK_AVAILABLE_IN_ALL void gtk_cell_area_get_preferred_width (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_width, - gint *natural_width); + int *minimum_width, + int *natural_width); GDK_AVAILABLE_IN_ALL void gtk_cell_area_get_preferred_height_for_width (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height); + int width, + int *minimum_height, + int *natural_height); GDK_AVAILABLE_IN_ALL void gtk_cell_area_get_preferred_height (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_height, - gint *natural_height); + int *minimum_height, + int *natural_height); GDK_AVAILABLE_IN_ALL void gtk_cell_area_get_preferred_width_for_height (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint height, - gint *minimum_width, - gint *natural_width); + int height, + int *minimum_width, + int *natural_width); GDK_AVAILABLE_IN_ALL const gchar * gtk_cell_area_get_current_path_string (GtkCellArea *area); @@ -372,13 +372,13 @@ GDK_AVAILABLE_IN_ALL void gtk_cell_area_attribute_connect (GtkCellArea *area, GtkCellRenderer *renderer, const gchar *attribute, - gint column); + int column); GDK_AVAILABLE_IN_ALL void gtk_cell_area_attribute_disconnect (GtkCellArea *area, GtkCellRenderer *renderer, const gchar *attribute); GDK_AVAILABLE_IN_ALL -gint gtk_cell_area_attribute_get_column (GtkCellArea *area, +int gtk_cell_area_attribute_get_column (GtkCellArea *area, GtkCellRenderer *renderer, const gchar *attribute); @@ -501,9 +501,9 @@ void gtk_cell_area_request_renderer (GtkCellArea GtkCellRenderer *renderer, GtkOrientation orientation, GtkWidget *widget, - gint for_size, - gint *minimum_size, - gint *natural_size); + int for_size, + int *minimum_size, + int *natural_size); /* For api stability, this is called from gtkcelllayout.c in order to ensure the correct * object is passed to the user function in gtk_cell_layout_set_cell_data_func. diff --git a/gtk/gtkcellareabox.c b/gtk/gtkcellareabox.c index 78dae26ba1..5d82fd95ea 100644 --- a/gtk/gtkcellareabox.c +++ b/gtk/gtkcellareabox.c @@ -104,25 +104,25 @@ static GtkSizeRequestMode gtk_cell_area_box_get_request_mode (GtkCellArea static void gtk_cell_area_box_get_preferred_width (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_width, - gint *natural_width); + int *minimum_width, + int *natural_width); static void gtk_cell_area_box_get_preferred_height (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_height, - gint *natural_height); + int *minimum_height, + int *natural_height); static void gtk_cell_area_box_get_preferred_height_for_width (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height); + int width, + int *minimum_height, + int *natural_height); static void gtk_cell_area_box_get_preferred_width_for_height (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint height, - gint *minimum_width, - gint *natural_width); + int height, + int *minimum_width, + int *natural_width); static gboolean gtk_cell_area_box_focus (GtkCellArea *area, GtkDirectionType direction); @@ -136,7 +136,7 @@ static void gtk_cell_area_box_layout_pack_end (GtkCellLayout gboolean expand); static void gtk_cell_area_box_layout_reorder (GtkCellLayout *cell_layout, GtkCellRenderer *renderer, - gint position); + int position); static void gtk_cell_area_box_focus_changed (GtkCellArea *area, GParamSpec *pspec, GtkCellAreaBox *box); @@ -165,8 +165,8 @@ typedef struct { typedef struct { GtkCellRenderer *renderer; - gint position; - gint size; + int position; + int size; } AllocatedCell; static CellInfo *cell_info_new (GtkCellRenderer *renderer, @@ -175,15 +175,15 @@ static CellInfo *cell_info_new (GtkCellRenderer *renderer, gboolean align, gboolean fixed); static void cell_info_free (CellInfo *info); -static gint cell_info_find (CellInfo *info, +static int cell_info_find (CellInfo *info, GtkCellRenderer *renderer); static AllocatedCell *allocated_cell_new (GtkCellRenderer *renderer, - gint position, - gint size); + int position, + int size); static void allocated_cell_free (AllocatedCell *cell); static GList *list_consecutive_cells (GtkCellAreaBox *box); -static gint count_expand_groups (GtkCellAreaBox *box); +static int count_expand_groups (GtkCellAreaBox *box); static void context_weak_notify (GtkCellAreaBox *box, GtkCellAreaBoxContext *dead_context); static void reset_contexts (GtkCellAreaBox *box); @@ -193,8 +193,8 @@ static void init_context_group (GtkCellAreaBox *box, static GSList *get_allocated_cells (GtkCellAreaBox *box, GtkCellAreaBoxContext *context, GtkWidget *widget, - gint width, - gint height); + int width, + int height); typedef struct _GtkCellAreaBoxClass GtkCellAreaBoxClass; typedef struct _GtkCellAreaBoxPrivate GtkCellAreaBoxPrivate; @@ -224,7 +224,7 @@ struct _GtkCellAreaBoxPrivate GSList *contexts; GtkOrientation orientation; - gint spacing; + int spacing; /* We hold on to the rtl state from a widget we are requested for * so that we can navigate focus correctly @@ -413,7 +413,7 @@ cell_info_free (CellInfo *info) g_slice_free (CellInfo, info); } -static gint +static int cell_info_find (CellInfo *info, GtkCellRenderer *renderer) { @@ -422,8 +422,8 @@ cell_info_find (CellInfo *info, static AllocatedCell * allocated_cell_new (GtkCellRenderer *renderer, - gint position, - gint size) + int position, + int size) { AllocatedCell *cell = g_slice_new (AllocatedCell); @@ -476,7 +476,7 @@ static void cell_groups_clear (GtkCellAreaBox *box) { GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); - gint i; + int i; for (i = 0; i < priv->groups->len; i++) { @@ -553,13 +553,13 @@ cell_groups_rebuild (GtkCellAreaBox *box) init_context_groups (box); } -static gint +static int count_visible_cells (CellGroup *group, - gint *expand_cells) + int *expand_cells) { GList *l; - gint visible_cells = 0; - gint n_expand_cells = 0; + int visible_cells = 0; + int n_expand_cells = 0; for (l = group->cells; l; l = l->next) { @@ -580,12 +580,12 @@ count_visible_cells (CellGroup *group, return visible_cells; } -static gint +static int count_expand_groups (GtkCellAreaBox *box) { GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); - gint i; - gint expand_groups = 0; + int i; + int expand_groups = 0; for (i = 0; i < priv->groups->len; i++) { @@ -612,7 +612,7 @@ init_context_group (GtkCellAreaBox *box, GtkCellAreaBoxContext *context) { GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); - gint *expand_groups, *align_groups, i; + int *expand_groups, *align_groups, i; expand_groups = g_new (gboolean, priv->groups->len); align_groups = g_new (gboolean, priv->groups->len); @@ -673,17 +673,17 @@ reset_contexts (GtkCellAreaBox *box) static GSList * allocate_cells_manually (GtkCellAreaBox *box, GtkWidget *widget, - gint width, - gint height) + int width, + int height) { GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); GList *cells, *l; GSList *allocated_cells = NULL; GtkRequestedSize *sizes; - gint i; - gint nvisible = 0, nexpand = 0, group_expand; - gint avail_size, extra_size, extra_extra, full_size; - gint position = 0, for_size; + int i; + int nvisible = 0, nexpand = 0, group_expand; + int avail_size, extra_size, extra_extra, full_size; + int position = 0, for_size; gboolean rtl; if (!priv->cells) @@ -807,16 +807,16 @@ static GSList * get_allocated_cells (GtkCellAreaBox *box, GtkCellAreaBoxContext *context, GtkWidget *widget, - gint width, - gint height) + int width, + int height) { GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); GtkCellAreaBoxAllocation *group_allocs; GtkCellArea *area = GTK_CELL_AREA (box); GList *cell_list; GSList *allocated_cells = NULL; - gint i, j, n_allocs, position; - gint for_size, full_size; + int i, j, n_allocs, position; + int for_size, full_size; gboolean rtl; group_allocs = _gtk_cell_area_box_context_get_orientation_allocs (context, &n_allocs); @@ -853,7 +853,7 @@ get_allocated_cells (GtkCellAreaBox *box, { CellInfo *info = group->cells->data; AllocatedCell *cell; - gint cell_position, cell_size; + int cell_position, cell_size; if (!gtk_cell_renderer_get_visible (info->renderer)) continue; @@ -869,7 +869,7 @@ get_allocated_cells (GtkCellAreaBox *box, cell_size = group_allocs[i].size; else { - gint dummy; + int dummy; gtk_cell_area_request_renderer (area, info->renderer, priv->orientation, widget, for_size, @@ -892,9 +892,9 @@ get_allocated_cells (GtkCellAreaBox *box, else { GtkRequestedSize *sizes; - gint avail_size, cell_position; - gint visible_cells, expand_cells; - gint extra_size, extra_extra; + int avail_size, cell_position; + int visible_cells, expand_cells; + int extra_size, extra_extra; visible_cells = count_visible_cells (group, &expand_cells); @@ -1307,7 +1307,7 @@ gtk_cell_area_box_apply_attributes (GtkCellArea *area, { GtkCellAreaBox *box = GTK_CELL_AREA_BOX (area); GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); - gint i; + int i; /* Call the parent class to apply the attributes */ GTK_CELL_AREA_CLASS @@ -1500,27 +1500,27 @@ compute_size (GtkCellAreaBox *box, GtkOrientation orientation, GtkCellAreaBoxContext *context, GtkWidget *widget, - gint for_size, - gint *minimum_size, - gint *natural_size) + int for_size, + int *minimum_size, + int *natural_size) { GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); GtkCellArea *area = GTK_CELL_AREA (box); GList *list; - gint i; - gint min_size = 0; - gint nat_size = 0; + int i; + int min_size = 0; + int nat_size = 0; for (i = 0; i < priv->groups->len; i++) { CellGroup *group = &g_array_index (priv->groups, CellGroup, i); - gint group_min_size = 0; - gint group_nat_size = 0; + int group_min_size = 0; + int group_nat_size = 0; for (list = group->cells; list; list = list->next) { CellInfo *info = list->data; - gint renderer_min_size, renderer_nat_size; + int renderer_min_size, renderer_nat_size; if (!gtk_cell_renderer_get_visible (info->renderer)) continue; @@ -1587,11 +1587,11 @@ get_group_sizes (GtkCellArea *area, CellGroup *group, GtkOrientation orientation, GtkWidget *widget, - gint *n_sizes) + int *n_sizes) { GtkRequestedSize *sizes; GList *l; - gint i; + int i; *n_sizes = count_visible_cells (group, NULL); sizes = g_new (GtkRequestedSize, *n_sizes); @@ -1620,9 +1620,9 @@ static void compute_group_size_for_opposing_orientation (GtkCellAreaBox *box, CellGroup *group, GtkWidget *widget, - gint for_size, - gint *minimum_size, - gint *natural_size) + int for_size, + int *minimum_size, + int *natural_size) { GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); GtkCellArea *area = GTK_CELL_AREA (box); @@ -1640,10 +1640,10 @@ compute_group_size_for_opposing_orientation (GtkCellAreaBox *box, { GtkRequestedSize *orientation_sizes; CellInfo *info; - gint n_sizes, i; - gint avail_size = for_size; - gint extra_size, extra_extra; - gint min_size = 0, nat_size = 0; + int n_sizes, i; + int avail_size = for_size; + int extra_size, extra_extra; + int min_size = 0, nat_size = 0; orientation_sizes = get_group_sizes (area, group, priv->orientation, widget, &n_sizes); @@ -1668,7 +1668,7 @@ compute_group_size_for_opposing_orientation (GtkCellAreaBox *box, for (i = 0; i < n_sizes; i++) { - gint cell_min, cell_nat; + int cell_min, cell_nat; info = orientation_sizes[i].data; @@ -1703,17 +1703,17 @@ static void compute_size_for_opposing_orientation (GtkCellAreaBox *box, GtkCellAreaBoxContext *context, GtkWidget *widget, - gint for_size, - gint *minimum_size, - gint *natural_size) + int for_size, + int *minimum_size, + int *natural_size) { GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); CellGroup *group; GtkRequestedSize *orientation_sizes; - gint n_groups, n_expand_groups, i; - gint avail_size = for_size; - gint extra_size, extra_extra; - gint min_size = 0, nat_size = 0; + int n_groups, n_expand_groups, i; + int avail_size = for_size; + int extra_size, extra_extra; + int min_size = 0, nat_size = 0; n_expand_groups = count_expand_groups (box); @@ -1747,8 +1747,8 @@ compute_size_for_opposing_orientation (GtkCellAreaBox *box, */ for (i = 0; i < n_groups; i++) { - gint group_min, group_nat; - gint group_idx = GPOINTER_TO_INT (orientation_sizes[i].data); + int group_min, group_nat; + int group_idx = GPOINTER_TO_INT (orientation_sizes[i].data); group = &g_array_index (priv->groups, CellGroup, group_idx); @@ -1800,12 +1800,12 @@ static void gtk_cell_area_box_get_preferred_width (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_width, - gint *natural_width) + int *minimum_width, + int *natural_width) { GtkCellAreaBox *box = GTK_CELL_AREA_BOX (area); GtkCellAreaBoxContext *box_context; - gint min_width, nat_width; + int min_width, nat_width; g_return_if_fail (GTK_IS_CELL_AREA_BOX_CONTEXT (context)); @@ -1828,12 +1828,12 @@ static void gtk_cell_area_box_get_preferred_height (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint *minimum_height, - gint *natural_height) + int *minimum_height, + int *natural_height) { GtkCellAreaBox *box = GTK_CELL_AREA_BOX (area); GtkCellAreaBoxContext *box_context; - gint min_height, nat_height; + int min_height, nat_height; g_return_if_fail (GTK_IS_CELL_AREA_BOX_CONTEXT (context)); @@ -1856,14 +1856,14 @@ static void gtk_cell_area_box_get_preferred_height_for_width (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height) + int width, + int *minimum_height, + int *natural_height) { GtkCellAreaBox *box = GTK_CELL_AREA_BOX (area); GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); GtkCellAreaBoxContext *box_context = GTK_CELL_AREA_BOX_CONTEXT (context); - gint min_height, nat_height; + int min_height, nat_height; g_return_if_fail (GTK_IS_CELL_AREA_BOX_CONTEXT (context)); @@ -1894,14 +1894,14 @@ static void gtk_cell_area_box_get_preferred_width_for_height (GtkCellArea *area, GtkCellAreaContext *context, GtkWidget *widget, - gint height, - gint *minimum_width, - gint *natural_width) + int height, + int *minimum_width, + int *natural_width) { GtkCellAreaBox *box = GTK_CELL_AREA_BOX (area); GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); GtkCellAreaBoxContext *box_context = GTK_CELL_AREA_BOX_CONTEXT (context); - gint min_width, nat_width; + int min_width, nat_width; g_return_if_fail (GTK_IS_CELL_AREA_BOX_CONTEXT (context)); @@ -1941,7 +1941,7 @@ gtk_cell_area_box_focus (GtkCellArea *area, { GtkCellAreaBox *box = GTK_CELL_AREA_BOX (area); GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); - gint cycle = FOCUS_NONE; + int cycle = FOCUS_NONE; gboolean cycled_focus = FALSE; GtkCellRenderer *focus_cell; @@ -2002,7 +2002,7 @@ gtk_cell_area_box_focus (GtkCellArea *area, { gboolean found_cell = FALSE; GList *list; - gint i; + int i; /* If there is no focused cell, focus on the first (or last) one */ if (!focus_cell) @@ -2068,7 +2068,7 @@ gtk_cell_area_box_layout_pack_end (GtkCellLayout *cell_layout, static void gtk_cell_area_box_layout_reorder (GtkCellLayout *cell_layout, GtkCellRenderer *renderer, - gint position) + int position) { GtkCellAreaBox *box = GTK_CELL_AREA_BOX (cell_layout); GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); @@ -2094,7 +2094,7 @@ gtk_cell_area_box_layout_reorder (GtkCellLayout *cell_layout, *************************************************************/ gboolean _gtk_cell_area_box_group_visible (GtkCellAreaBox *box, - gint group_idx) + int group_idx) { GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); CellGroup *group; @@ -2213,7 +2213,7 @@ gtk_cell_area_box_pack_end (GtkCellAreaBox *box, * * Returns: the space added between cell renderers in @box. */ -gint +int gtk_cell_area_box_get_spacing (GtkCellAreaBox *box) { GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); @@ -2232,7 +2232,7 @@ gtk_cell_area_box_get_spacing (GtkCellAreaBox *box) */ void gtk_cell_area_box_set_spacing (GtkCellAreaBox *box, - gint spacing) + int spacing) { GtkCellAreaBoxPrivate *priv = gtk_cell_area_box_get_instance_private (box); diff --git a/gtk/gtkcellareabox.h b/gtk/gtkcellareabox.h index e70dd5539c..2c1ab869f6 100644 --- a/gtk/gtkcellareabox.h +++ b/gtk/gtkcellareabox.h @@ -54,14 +54,14 @@ void gtk_cell_area_box_pack_end (GtkCellAreaBox *box, gboolean align, gboolean fixed); GDK_AVAILABLE_IN_ALL -gint gtk_cell_area_box_get_spacing (GtkCellAreaBox *box); +int gtk_cell_area_box_get_spacing (GtkCellAreaBox *box); GDK_AVAILABLE_IN_ALL void gtk_cell_area_box_set_spacing (GtkCellAreaBox *box, - gint spacing); + int spacing); /* Private interaction with GtkCellAreaBoxContext */ gboolean _gtk_cell_area_box_group_visible (GtkCellAreaBox *box, - gint group_idx); + int group_idx); G_END_DECLS diff --git a/gtk/gtkcellareaboxcontext.c b/gtk/gtkcellareaboxcontext.c index 00aad38f1b..9ad1ba6e7c 100644 --- a/gtk/gtkcellareaboxcontext.c +++ b/gtk/gtkcellareaboxcontext.c @@ -31,36 +31,36 @@ static void _gtk_cell_area_box_context_finalize (GObject /* GtkCellAreaContextClass */ static void _gtk_cell_area_box_context_reset (GtkCellAreaContext *context); static void _gtk_cell_area_box_context_get_preferred_height_for_width (GtkCellAreaContext *context, - gint width, - gint *minimum_height, - gint *natural_height); + int width, + int *minimum_height, + int *natural_height); static void _gtk_cell_area_box_context_get_preferred_width_for_height (GtkCellAreaContext *context, - gint height, - gint *minimum_width, - gint *natural_width); + int height, + int *minimum_width, + int *natural_width); /* Internal functions */ static void _gtk_cell_area_box_context_sum (GtkCellAreaBoxContext *context, GtkOrientation orientation, - gint for_size, - gint *minimum_size, - gint *natural_size); + int for_size, + int *minimum_size, + int *natural_size); static void free_cache_array (GArray *array); static GArray *group_array_new (GtkCellAreaBoxContext *context); static GArray *get_array (GtkCellAreaBoxContext *context, GtkOrientation orientation, - gint for_size); + int for_size); static gboolean group_expands (GtkCellAreaBoxContext *context, - gint group_idx); -static gint count_expand_groups (GtkCellAreaBoxContext *context); + int group_idx); +static int count_expand_groups (GtkCellAreaBoxContext *context); /* CachedSize management */ typedef struct { - gint min_size; - gint nat_size; + int min_size; + int nat_size; } CachedSize; struct _GtkCellAreaBoxContextPrivate @@ -103,7 +103,7 @@ group_array_new (GtkCellAreaBoxContext *context) static GArray * get_array (GtkCellAreaBoxContext *context, GtkOrientation orientation, - gint for_size) + int for_size) { GtkCellAreaBoxContextPrivate *priv = context->priv; GArray *array; @@ -138,7 +138,7 @@ get_array (GtkCellAreaBoxContext *context, static gboolean group_expands (GtkCellAreaBoxContext *context, - gint group_idx) + int group_idx) { GtkCellAreaBoxContextPrivate *priv = context->priv; @@ -147,11 +147,11 @@ group_expands (GtkCellAreaBoxContext *context, return priv->expand[group_idx]; } -static gint +static int count_expand_groups (GtkCellAreaBoxContext *context) { GtkCellAreaBoxContextPrivate *priv = context->priv; - gint i, expand = 0; + int i, expand = 0; for (i = 0; i < priv->base_widths->len; i++) { @@ -222,7 +222,7 @@ _gtk_cell_area_box_context_reset (GtkCellAreaContext *context) GtkCellAreaBoxContext *box_context = GTK_CELL_AREA_BOX_CONTEXT (context); GtkCellAreaBoxContextPrivate *priv = box_context->priv; CachedSize *size; - gint i; + int i; for (i = 0; i < priv->base_widths->len; i++) { @@ -248,16 +248,16 @@ _gtk_cell_area_box_context_reset (GtkCellAreaContext *context) static void _gtk_cell_area_box_context_sum (GtkCellAreaBoxContext *context, GtkOrientation orientation, - gint for_size, - gint *minimum_size, - gint *natural_size) + int for_size, + int *minimum_size, + int *natural_size) { GtkCellAreaBoxContextPrivate *priv = context->priv; GtkCellAreaBox *area; GtkOrientation box_orientation; GArray *array; - gint spacing, i, last_aligned_group_idx; - gint min_size = 0, nat_size = 0; + int spacing, i, last_aligned_group_idx; + int min_size = 0, nat_size = 0; area = (GtkCellAreaBox *)gtk_cell_area_context_get_area (GTK_CELL_AREA_CONTEXT (context)); spacing = gtk_cell_area_box_get_spacing (area); @@ -319,9 +319,9 @@ _gtk_cell_area_box_context_sum (GtkCellAreaBoxContext *context, static void _gtk_cell_area_box_context_get_preferred_height_for_width (GtkCellAreaContext *context, - gint width, - gint *minimum_height, - gint *natural_height) + int width, + int *minimum_height, + int *natural_height) { _gtk_cell_area_box_context_sum (GTK_CELL_AREA_BOX_CONTEXT (context), GTK_ORIENTATION_VERTICAL, width, minimum_height, natural_height); @@ -329,9 +329,9 @@ _gtk_cell_area_box_context_get_preferred_height_for_width (GtkCellAreaContext *c static void _gtk_cell_area_box_context_get_preferred_width_for_height (GtkCellAreaContext *context, - gint height, - gint *minimum_width, - gint *natural_width) + int height, + int *minimum_width, + int *natural_width) { _gtk_cell_area_box_context_sum (GTK_CELL_AREA_BOX_CONTEXT (context), GTK_ORIENTATION_HORIZONTAL, height, minimum_width, natural_width); @@ -344,7 +344,7 @@ static void copy_size_array (GArray *src_array, GArray *dest_array) { - gint i; + int i; for (i = 0; i < src_array->len; i++) { @@ -429,9 +429,9 @@ _gtk_cell_area_box_init_groups (GtkCellAreaBoxContext *box_context, void _gtk_cell_area_box_context_push_group_width (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint minimum_width, - gint natural_width) + int group_idx, + int minimum_width, + int natural_width) { GtkCellAreaBoxContextPrivate *priv; CachedSize *size; @@ -460,10 +460,10 @@ _gtk_cell_area_box_context_push_group_width (GtkCellAreaBoxContext *box_context, void _gtk_cell_area_box_context_push_group_height_for_width (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint for_width, - gint minimum_height, - gint natural_height) + int group_idx, + int for_width, + int minimum_height, + int natural_height) { GtkCellAreaBoxContextPrivate *priv; GArray *group_array; @@ -488,9 +488,9 @@ _gtk_cell_area_box_context_push_group_height_for_width (GtkCellAreaBoxContext * void _gtk_cell_area_box_context_push_group_height (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint minimum_height, - gint natural_height) + int group_idx, + int minimum_height, + int natural_height) { GtkCellAreaBoxContextPrivate *priv; CachedSize *size; @@ -519,10 +519,10 @@ _gtk_cell_area_box_context_push_group_height (GtkCellAreaBoxContext *box_context void _gtk_cell_area_box_context_push_group_width_for_height (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint for_height, - gint minimum_width, - gint natural_width) + int group_idx, + int for_height, + int minimum_width, + int natural_width) { GtkCellAreaBoxContextPrivate *priv; GArray *group_array; @@ -547,9 +547,9 @@ _gtk_cell_area_box_context_push_group_width_for_height (GtkCellAreaBoxContext *b void _gtk_cell_area_box_context_get_group_width (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint *minimum_width, - gint *natural_width) + int group_idx, + int *minimum_width, + int *natural_width) { GtkCellAreaBoxContextPrivate *priv; CachedSize *size; @@ -570,10 +570,10 @@ _gtk_cell_area_box_context_get_group_width (GtkCellAreaBoxContext *box_context, void _gtk_cell_area_box_context_get_group_height_for_width (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint for_width, - gint *minimum_height, - gint *natural_height) + int group_idx, + int for_width, + int *minimum_height, + int *natural_height) { GtkCellAreaBoxContextPrivate *priv; GArray *group_array; @@ -607,9 +607,9 @@ _gtk_cell_area_box_context_get_group_height_for_width (GtkCellAreaBoxContext *bo void _gtk_cell_area_box_context_get_group_height (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint *minimum_height, - gint *natural_height) + int group_idx, + int *minimum_height, + int *natural_height) { GtkCellAreaBoxContextPrivate *priv; CachedSize *size; @@ -630,10 +630,10 @@ _gtk_cell_area_box_context_get_group_height (GtkCellAreaBoxContext *box_context, void _gtk_cell_area_box_context_get_group_width_for_height (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint for_height, - gint *minimum_width, - gint *natural_width) + int group_idx, + int for_height, + int *minimum_width, + int *natural_width) { GtkCellAreaBoxContextPrivate *priv; GArray *group_array; @@ -669,16 +669,16 @@ static GtkRequestedSize * _gtk_cell_area_box_context_get_requests (GtkCellAreaBoxContext *box_context, GtkCellAreaBox *area, GtkOrientation orientation, - gint for_size, - gint *n_requests) + int for_size, + int *n_requests) { GtkCellAreaBoxContextPrivate *priv = box_context->priv; GtkRequestedSize *requests; GArray *array; CachedSize *size; - gint visible_groups = 0; - gint last_aligned_group_idx = 0; - gint i, j; + int visible_groups = 0; + int last_aligned_group_idx = 0; + int i, j; /* Get the last visible aligned group * (we need to get space at least up till this group) */ @@ -730,18 +730,18 @@ static GtkCellAreaBoxAllocation * allocate_for_orientation (GtkCellAreaBoxContext *context, GtkCellAreaBox *area, GtkOrientation orientation, - gint spacing, - gint size, - gint for_size, - gint *n_allocs) + int spacing, + int size, + int for_size, + int *n_allocs) { GtkCellAreaBoxContextPrivate *priv = context->priv; GtkCellAreaBoxAllocation *allocs; GtkRequestedSize *sizes; - gint n_expand_groups = 0; - gint i, n_groups, position, vis_position; - gint extra_size, extra_extra; - gint avail_size = size; + int n_expand_groups = 0; + int i, n_groups, position, vis_position; + int extra_size, extra_extra; + int avail_size = size; sizes = _gtk_cell_area_box_context_get_requests (context, area, orientation, for_size, &n_groups); n_expand_groups = count_expand_groups (context); @@ -807,7 +807,7 @@ allocate_for_orientation (GtkCellAreaBoxContext *context, GtkRequestedSize * _gtk_cell_area_box_context_get_widths (GtkCellAreaBoxContext *box_context, - gint *n_widths) + int *n_widths) { GtkCellAreaBox *area = (GtkCellAreaBox *)gtk_cell_area_context_get_area (GTK_CELL_AREA_CONTEXT (box_context)); @@ -816,7 +816,7 @@ _gtk_cell_area_box_context_get_widths (GtkCellAreaBoxContext *box_context, GtkRequestedSize * _gtk_cell_area_box_context_get_heights (GtkCellAreaBoxContext *box_context, - gint *n_heights) + int *n_heights) { GtkCellAreaBox *area = (GtkCellAreaBox *)gtk_cell_area_context_get_area (GTK_CELL_AREA_CONTEXT (box_context)); @@ -825,12 +825,12 @@ _gtk_cell_area_box_context_get_heights (GtkCellAreaBoxContext *box_context, GtkCellAreaBoxAllocation * _gtk_cell_area_box_context_get_orientation_allocs (GtkCellAreaBoxContext *context, - gint *n_allocs) + int *n_allocs) { GtkCellAreaContext *ctx = GTK_CELL_AREA_CONTEXT (context); GtkCellAreaBox *area; GtkOrientation orientation; - gint spacing, width, height, alloc_count = 0; + int spacing, width, height, alloc_count = 0; GtkCellAreaBoxAllocation *allocs = NULL; area = (GtkCellAreaBox *)gtk_cell_area_context_get_area (ctx); diff --git a/gtk/gtkcellareaboxcontextprivate.h b/gtk/gtkcellareaboxcontextprivate.h index 5feb7e6313..104a0218be 100644 --- a/gtk/gtkcellareaboxcontextprivate.h +++ b/gtk/gtkcellareaboxcontextprivate.h @@ -72,65 +72,65 @@ void _gtk_cell_area_box_init_groups (GtkCellAreaBoxCo /* Update cell-group sizes */ void _gtk_cell_area_box_context_push_group_width (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint minimum_width, - gint natural_width); + int group_idx, + int minimum_width, + int natural_width); void _gtk_cell_area_box_context_push_group_height_for_width (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint for_width, - gint minimum_height, - gint natural_height); + int group_idx, + int for_width, + int minimum_height, + int natural_height); void _gtk_cell_area_box_context_push_group_height (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint minimum_height, - gint natural_height); + int group_idx, + int minimum_height, + int natural_height); void _gtk_cell_area_box_context_push_group_width_for_height (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint for_height, - gint minimum_width, - gint natural_width); + int group_idx, + int for_height, + int minimum_width, + int natural_width); /* Fetch cell-group sizes */ void _gtk_cell_area_box_context_get_group_width (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint *minimum_width, - gint *natural_width); + int group_idx, + int *minimum_width, + int *natural_width); void _gtk_cell_area_box_context_get_group_height_for_width (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint for_width, - gint *minimum_height, - gint *natural_height); + int group_idx, + int for_width, + int *minimum_height, + int *natural_height); void _gtk_cell_area_box_context_get_group_height (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint *minimum_height, - gint *natural_height); + int group_idx, + int *minimum_height, + int *natural_height); void _gtk_cell_area_box_context_get_group_width_for_height (GtkCellAreaBoxContext *box_context, - gint group_idx, - gint for_height, - gint *minimum_width, - gint *natural_width); + int group_idx, + int for_height, + int *minimum_width, + int *natural_width); GtkRequestedSize *_gtk_cell_area_box_context_get_widths (GtkCellAreaBoxContext *box_context, - gint *n_widths); + int *n_widths); GtkRequestedSize *_gtk_cell_area_box_context_get_heights (GtkCellAreaBoxContext *box_context, - gint *n_heights); + int *n_heights); /* Private context/area interaction */ typedef struct { - gint group_idx; /* Groups containing only invisible cells are not allocated */ - gint position; /* Relative group allocation position in the orientation of the box */ - gint size; /* Full allocated size of the cells in this group spacing inclusive */ + int group_idx; /* Groups containing only invisible cells are not allocated */ + int position; /* Relative group allocation position in the orientation of the box */ + int size; /* Full allocated size of the cells in this group spacing inclusive */ } GtkCellAreaBoxAllocation; GtkCellAreaBoxAllocation * _gtk_cell_area_box_context_get_orientation_allocs (GtkCellAreaBoxContext *context, - gint *n_allocs); + int *n_allocs); G_END_DECLS diff --git a/gtk/gtkcellareacontext.c b/gtk/gtkcellareacontext.c index 64b54f78f0..d0c189aec6 100644 --- a/gtk/gtkcellareacontext.c +++ b/gtk/gtkcellareacontext.c @@ -56,20 +56,20 @@ static void gtk_cell_area_context_set_property (GObject *object, /* GtkCellAreaContextClass */ static void gtk_cell_area_context_real_reset (GtkCellAreaContext *context); static void gtk_cell_area_context_real_allocate (GtkCellAreaContext *context, - gint width, - gint height); + int width, + int height); typedef struct _GtkCellAreaContextPrivate GtkCellAreaContextPrivate; struct _GtkCellAreaContextPrivate { GtkCellArea *cell_area; - gint min_width; - gint nat_width; - gint min_height; - gint nat_height; - gint alloc_width; - gint alloc_height; + int min_width; + int nat_width; + int min_height; + int nat_height; + int alloc_width; + int alloc_height; }; enum { @@ -289,8 +289,8 @@ gtk_cell_area_context_real_reset (GtkCellAreaContext *context) static void gtk_cell_area_context_real_allocate (GtkCellAreaContext *context, - gint width, - gint height) + int width, + int height) { GtkCellAreaContextPrivate *priv = gtk_cell_area_context_get_instance_private (context); @@ -384,8 +384,8 @@ gtk_cell_area_context_reset (GtkCellAreaContext *context) */ void gtk_cell_area_context_allocate (GtkCellAreaContext *context, - gint width, - gint height) + int width, + int height) { g_return_if_fail (GTK_IS_CELL_AREA_CONTEXT (context)); @@ -408,8 +408,8 @@ gtk_cell_area_context_allocate (GtkCellAreaContext *context, */ void gtk_cell_area_context_get_preferred_width (GtkCellAreaContext *context, - gint *minimum_width, - gint *natural_width) + int *minimum_width, + int *natural_width) { GtkCellAreaContextPrivate *priv = gtk_cell_area_context_get_instance_private (context); @@ -438,8 +438,8 @@ gtk_cell_area_context_get_preferred_width (GtkCellAreaContext *context, */ void gtk_cell_area_context_get_preferred_height (GtkCellAreaContext *context, - gint *minimum_height, - gint *natural_height) + int *minimum_height, + int *natural_height) { GtkCellAreaContextPrivate *priv = gtk_cell_area_context_get_instance_private (context); @@ -469,9 +469,9 @@ gtk_cell_area_context_get_preferred_height (GtkCellAreaContext *context, */ void gtk_cell_area_context_get_preferred_height_for_width (GtkCellAreaContext *context, - gint width, - gint *minimum_height, - gint *natural_height) + int width, + int *minimum_height, + int *natural_height) { g_return_if_fail (GTK_IS_CELL_AREA_CONTEXT (context)); @@ -499,9 +499,9 @@ gtk_cell_area_context_get_preferred_height_for_width (GtkCellAreaContext *contex */ void gtk_cell_area_context_get_preferred_width_for_height (GtkCellAreaContext *context, - gint height, - gint *minimum_width, - gint *natural_width) + int height, + int *minimum_width, + int *natural_width) { g_return_if_fail (GTK_IS_CELL_AREA_CONTEXT (context)); @@ -526,8 +526,8 @@ gtk_cell_area_context_get_preferred_width_for_height (GtkCellAreaContext *contex */ void gtk_cell_area_context_get_allocation (GtkCellAreaContext *context, - gint *width, - gint *height) + int *width, + int *height) { GtkCellAreaContextPrivate *priv = gtk_cell_area_context_get_instance_private (context); @@ -556,8 +556,8 @@ gtk_cell_area_context_get_allocation (GtkCellAreaContext *context, */ void gtk_cell_area_context_push_preferred_width (GtkCellAreaContext *context, - gint minimum_width, - gint natural_width) + int minimum_width, + int natural_width) { GtkCellAreaContextPrivate *priv = gtk_cell_area_context_get_instance_private (context); @@ -598,8 +598,8 @@ gtk_cell_area_context_push_preferred_width (GtkCellAreaContext *context, */ void gtk_cell_area_context_push_preferred_height (GtkCellAreaContext *context, - gint minimum_height, - gint natural_height) + int minimum_height, + int natural_height) { GtkCellAreaContextPrivate *priv = gtk_cell_area_context_get_instance_private (context); diff --git a/gtk/gtkcellareacontext.h b/gtk/gtkcellareacontext.h index bc3e7fb7dd..6a856613cb 100644 --- a/gtk/gtkcellareacontext.h +++ b/gtk/gtkcellareacontext.h @@ -66,17 +66,17 @@ struct _GtkCellAreaContextClass /*< public >*/ void (* allocate) (GtkCellAreaContext *context, - gint width, - gint height); + int width, + int height); void (* reset) (GtkCellAreaContext *context); void (* get_preferred_height_for_width) (GtkCellAreaContext *context, - gint width, - gint *minimum_height, - gint *natural_height); + int width, + int *minimum_height, + int *natural_height); void (* get_preferred_width_for_height) (GtkCellAreaContext *context, - gint height, - gint *minimum_width, - gint *natural_width); + int height, + int *minimum_width, + int *natural_width); /*< private >*/ @@ -91,8 +91,8 @@ GDK_AVAILABLE_IN_ALL GtkCellArea *gtk_cell_area_context_get_area (GtkCellAreaContext *context); GDK_AVAILABLE_IN_ALL void gtk_cell_area_context_allocate (GtkCellAreaContext *context, - gint width, - gint height); + int width, + int height); GDK_AVAILABLE_IN_ALL void gtk_cell_area_context_reset (GtkCellAreaContext *context); @@ -101,38 +101,38 @@ void gtk_cell_area_context_reset (GtkCellAreaC */ GDK_AVAILABLE_IN_ALL void gtk_cell_area_context_get_preferred_width (GtkCellAreaContext *context, - gint *minimum_width, - gint *natural_width); + int *minimum_width, + int *natural_width); GDK_AVAILABLE_IN_ALL void gtk_cell_area_context_get_preferred_height (GtkCellAreaContext *context, - gint *minimum_height, - gint *natural_height); + int *minimum_height, + int *natural_height); GDK_AVAILABLE_IN_ALL void gtk_cell_area_context_get_preferred_height_for_width (GtkCellAreaContext *context, - gint width, - gint *minimum_height, - gint *natural_height); + int width, + int *minimum_height, + int *natural_height); GDK_AVAILABLE_IN_ALL void gtk_cell_area_context_get_preferred_width_for_height (GtkCellAreaContext *context, - gint height, - gint *minimum_width, - gint *natural_width); + int height, + int *minimum_width, + int *natural_width); GDK_AVAILABLE_IN_ALL void gtk_cell_area_context_get_allocation (GtkCellAreaContext *context, - gint *width, - gint *height); + int *width, + int *height); /* Apis for GtkCellArea implementations to update cached values * for multiple GtkTreeModel rows */ GDK_AVAILABLE_IN_ALL void gtk_cell_area_context_push_preferred_width (GtkCellAreaContext *context, - gint minimum_width, - gint natural_width); + int minimum_width, + int natural_width); GDK_AVAILABLE_IN_ALL void gtk_cell_area_context_push_preferred_height (GtkCellAreaContext *context, - gint minimum_height, - gint natural_height); + int minimum_height, + int natural_height); G_END_DECLS diff --git a/gtk/gtkcelllayout.c b/gtk/gtkcelllayout.c index 4f7329895c..b146f42da9 100644 --- a/gtk/gtkcelllayout.c +++ b/gtk/gtkcelllayout.c @@ -149,7 +149,7 @@ static void gtk_cell_layout_default_clear (GtkCellLayout static void gtk_cell_layout_default_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *cell, const gchar *attribute, - gint column); + int column); static void gtk_cell_layout_default_set_cell_data_func (GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkCellLayoutDataFunc func, @@ -159,7 +159,7 @@ static void gtk_cell_layout_default_clear_attributes (GtkCellLayout GtkCellRenderer *cell); static void gtk_cell_layout_default_reorder (GtkCellLayout *cell_layout, GtkCellRenderer *cell, - gint position); + int position); static GList *gtk_cell_layout_default_get_cells (GtkCellLayout *cell_layout); @@ -242,7 +242,7 @@ static void gtk_cell_layout_default_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *cell, const gchar *attribute, - gint column) + int column) { GtkCellLayoutIface *iface; GtkCellArea *area; @@ -308,7 +308,7 @@ gtk_cell_layout_default_clear_attributes (GtkCellLayout *cell_layout, static void gtk_cell_layout_default_reorder (GtkCellLayout *cell_layout, GtkCellRenderer *cell, - gint position) + int position) { GtkCellLayoutIface *iface; GtkCellArea *area; @@ -414,7 +414,7 @@ gtk_cell_layout_set_attributesv (GtkCellLayout *cell_layout, va_list args) { gchar *attribute; - gint column; + int column; attribute = va_arg (args, gchar *); @@ -422,7 +422,7 @@ gtk_cell_layout_set_attributesv (GtkCellLayout *cell_layout, while (attribute != NULL) { - column = va_arg (args, gint); + column = va_arg (args, int); gtk_cell_layout_add_attribute (cell_layout, cell, attribute, column); @@ -475,7 +475,7 @@ void gtk_cell_layout_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *cell, const gchar *attribute, - gint column) + int column) { g_return_if_fail (GTK_IS_CELL_LAYOUT (cell_layout)); g_return_if_fail (GTK_IS_CELL_RENDERER (cell)); @@ -547,7 +547,7 @@ gtk_cell_layout_clear_attributes (GtkCellLayout *cell_layout, void gtk_cell_layout_reorder (GtkCellLayout *cell_layout, GtkCellRenderer *cell, - gint position) + int position) { g_return_if_fail (GTK_IS_CELL_LAYOUT (cell_layout)); g_return_if_fail (GTK_IS_CELL_RENDERER (cell)); diff --git a/gtk/gtkcelllayout.h b/gtk/gtkcelllayout.h index ccad30c6a3..4eab78ab22 100644 --- a/gtk/gtkcelllayout.h +++ b/gtk/gtkcelllayout.h @@ -92,7 +92,7 @@ struct _GtkCellLayoutIface void (* add_attribute) (GtkCellLayout *cell_layout, GtkCellRenderer *cell, const gchar *attribute, - gint column); + int column); void (* set_cell_data_func) (GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkCellLayoutDataFunc func, @@ -102,7 +102,7 @@ struct _GtkCellLayoutIface GtkCellRenderer *cell); void (* reorder) (GtkCellLayout *cell_layout, GtkCellRenderer *cell, - gint position); + int position); GList* (* get_cells) (GtkCellLayout *cell_layout); GtkCellArea *(* get_area) (GtkCellLayout *cell_layout); @@ -130,7 +130,7 @@ GDK_AVAILABLE_IN_ALL void gtk_cell_layout_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *cell, const gchar *attribute, - gint column); + int column); GDK_AVAILABLE_IN_ALL void gtk_cell_layout_set_cell_data_func (GtkCellLayout *cell_layout, GtkCellRenderer *cell, @@ -143,7 +143,7 @@ void gtk_cell_layout_clear_attributes (GtkCellLayout *cell_layout, GDK_AVAILABLE_IN_ALL void gtk_cell_layout_reorder (GtkCellLayout *cell_layout, GtkCellRenderer *cell, - gint position); + int position); GDK_AVAILABLE_IN_ALL GtkCellArea *gtk_cell_layout_get_area (GtkCellLayout *cell_layout); diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c index 544880a45b..df98722ec4 100644 --- a/gtk/gtkcellrenderer.c +++ b/gtk/gtkcellrenderer.c @@ -93,22 +93,22 @@ static void set_cell_bg_color (GtkCellRenderer *cell, static GtkSizeRequestMode gtk_cell_renderer_real_get_request_mode(GtkCellRenderer *cell); static void gtk_cell_renderer_real_get_preferred_width (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size); + int *minimum_size, + int *natural_size); static void gtk_cell_renderer_real_get_preferred_height (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size); + int *minimum_size, + int *natural_size); static void gtk_cell_renderer_real_get_preferred_height_for_width(GtkCellRenderer *cell, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height); + int width, + int *minimum_height, + int *natural_height); static void gtk_cell_renderer_real_get_preferred_width_for_height(GtkCellRenderer *cell, GtkWidget *widget, - gint height, - gint *minimum_width, - gint *natural_width); + int height, + int *minimum_width, + int *natural_width); static void gtk_cell_renderer_real_get_aligned_area (GtkCellRenderer *cell, GtkWidget *widget, GtkCellRendererState flags, @@ -121,8 +121,8 @@ struct _GtkCellRendererPrivate gfloat xalign; gfloat yalign; - gint width; - gint height; + int width; + int height; guint16 xpad; guint16 ypad; @@ -169,7 +169,7 @@ enum { LAST_SIGNAL }; -static gint GtkCellRenderer_private_offset; +static int GtkCellRenderer_private_offset; static guint cell_renderer_signals[LAST_SIGNAL] = { 0 }; static inline gpointer @@ -866,8 +866,8 @@ gtk_cell_renderer_start_editing (GtkCellRenderer *cell, **/ void gtk_cell_renderer_set_fixed_size (GtkCellRenderer *cell, - gint width, - gint height) + int width, + int height) { GtkCellRendererPrivate *priv; @@ -906,8 +906,8 @@ gtk_cell_renderer_set_fixed_size (GtkCellRenderer *cell, **/ void gtk_cell_renderer_get_fixed_size (GtkCellRenderer *cell, - gint *width, - gint *height) + int *width, + int *height) { GtkCellRendererPrivate *priv; @@ -997,8 +997,8 @@ gtk_cell_renderer_get_alignment (GtkCellRenderer *cell, **/ void gtk_cell_renderer_set_padding (GtkCellRenderer *cell, - gint xpad, - gint ypad) + int xpad, + int ypad) { GtkCellRendererPrivate *priv; @@ -1037,8 +1037,8 @@ gtk_cell_renderer_set_padding (GtkCellRenderer *cell, **/ void gtk_cell_renderer_get_padding (GtkCellRenderer *cell, - gint *xpad, - gint *ypad) + int *xpad, + int *ypad) { GtkCellRendererPrivate *priv; @@ -1191,8 +1191,8 @@ static void gtk_cell_renderer_real_get_preferred_size (GtkCellRenderer *cell, GtkWidget *widget, GtkOrientation orientation, - gint *minimum_size, - gint *natural_size) + int *minimum_size, + int *natural_size) { GtkRequisition min_req; @@ -1234,8 +1234,8 @@ gtk_cell_renderer_real_get_request_mode (GtkCellRenderer *cell) static void gtk_cell_renderer_real_get_preferred_width (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size) + int *minimum_size, + int *natural_size) { gtk_cell_renderer_real_get_preferred_size (cell, widget, GTK_ORIENTATION_HORIZONTAL, minimum_size, natural_size); @@ -1244,8 +1244,8 @@ gtk_cell_renderer_real_get_preferred_width (GtkCellRenderer *cell, static void gtk_cell_renderer_real_get_preferred_height (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size) + int *minimum_size, + int *natural_size) { gtk_cell_renderer_real_get_preferred_size (cell, widget, GTK_ORIENTATION_VERTICAL, minimum_size, natural_size); @@ -1255,9 +1255,9 @@ gtk_cell_renderer_real_get_preferred_height (GtkCellRenderer *cell, static void gtk_cell_renderer_real_get_preferred_height_for_width (GtkCellRenderer *cell, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height) + int width, + int *minimum_height, + int *natural_height) { /* Fall back on the height reported from ->get_size() */ gtk_cell_renderer_get_preferred_height (cell, widget, minimum_height, natural_height); @@ -1266,9 +1266,9 @@ gtk_cell_renderer_real_get_preferred_height_for_width (GtkCellRenderer *cell, static void gtk_cell_renderer_real_get_preferred_width_for_height (GtkCellRenderer *cell, GtkWidget *widget, - gint height, - gint *minimum_width, - gint *natural_width) + int height, + int *minimum_width, + int *natural_width) { /* Fall back on the width reported from ->get_size() */ gtk_cell_renderer_get_preferred_width (cell, widget, minimum_width, natural_width); @@ -1285,8 +1285,8 @@ gtk_cell_renderer_real_get_aligned_area (GtkCellRenderer *cell, const GdkRectangle *cell_area, GdkRectangle *aligned_area) { - gint opposite_size, x_offset, y_offset; - gint natural_size; + int opposite_size, x_offset, y_offset; + int natural_size; g_return_if_fail (GTK_IS_CELL_RENDERER (cell)); g_return_if_fail (GTK_IS_WIDGET (widget)); @@ -1345,10 +1345,10 @@ void _gtk_cell_renderer_calc_offset (GtkCellRenderer *cell, const GdkRectangle *cell_area, GtkTextDirection direction, - gint width, - gint height, - gint *x_offset, - gint *y_offset) + int width, + int height, + int *x_offset, + int *y_offset) { GtkCellRendererPrivate *priv; @@ -1402,11 +1402,11 @@ gtk_cell_renderer_get_request_mode (GtkCellRenderer *cell) void gtk_cell_renderer_get_preferred_width (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size) + int *minimum_size, + int *natural_size) { GtkCellRendererClass *klass; - gint width; + int width; g_return_if_fail (GTK_IS_CELL_RENDERER (cell)); g_return_if_fail (GTK_IS_WIDGET (widget)); @@ -1448,11 +1448,11 @@ gtk_cell_renderer_get_preferred_width (GtkCellRenderer *cell, void gtk_cell_renderer_get_preferred_height (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size) + int *minimum_size, + int *natural_size) { GtkCellRendererClass *klass; - gint height; + int height; g_return_if_fail (GTK_IS_CELL_RENDERER (cell)); g_return_if_fail (GTK_IS_WIDGET (widget)); @@ -1496,12 +1496,12 @@ gtk_cell_renderer_get_preferred_height (GtkCellRenderer *cell, void gtk_cell_renderer_get_preferred_width_for_height (GtkCellRenderer *cell, GtkWidget *widget, - gint height, - gint *minimum_width, - gint *natural_width) + int height, + int *minimum_width, + int *natural_width) { GtkCellRendererClass *klass; - gint width; + int width; g_return_if_fail (GTK_IS_CELL_RENDERER (cell)); g_return_if_fail (GTK_IS_WIDGET (widget)); @@ -1544,12 +1544,12 @@ gtk_cell_renderer_get_preferred_width_for_height (GtkCellRenderer *cell, void gtk_cell_renderer_get_preferred_height_for_width (GtkCellRenderer *cell, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height) + int width, + int *minimum_height, + int *natural_height) { GtkCellRendererClass *klass; - gint height; + int height; g_return_if_fail (GTK_IS_CELL_RENDERER (cell)); g_return_if_fail (GTK_IS_WIDGET (widget)); @@ -1594,8 +1594,8 @@ gtk_cell_renderer_get_preferred_size (GtkCellRenderer *cell, GtkRequisition *minimum_size, GtkRequisition *natural_size) { - gint min_width, nat_width; - gint min_height, nat_height; + int min_width, nat_width; + int min_height, nat_height; g_return_if_fail (GTK_IS_CELL_RENDERER (cell)); diff --git a/gtk/gtkcellrenderer.h b/gtk/gtkcellrenderer.h index cfc68ff79d..6fb00ec9fc 100644 --- a/gtk/gtkcellrenderer.h +++ b/gtk/gtkcellrenderer.h @@ -117,22 +117,22 @@ struct _GtkCellRendererClass GtkSizeRequestMode (* get_request_mode) (GtkCellRenderer *cell); void (* get_preferred_width) (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size); + int *minimum_size, + int *natural_size); void (* get_preferred_height_for_width) (GtkCellRenderer *cell, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height); + int width, + int *minimum_height, + int *natural_height); void (* get_preferred_height) (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size); + int *minimum_size, + int *natural_size); void (* get_preferred_width_for_height) (GtkCellRenderer *cell, GtkWidget *widget, - gint height, - gint *minimum_width, - gint *natural_width); + int height, + int *minimum_width, + int *natural_width); void (* get_aligned_area) (GtkCellRenderer *cell, GtkWidget *widget, GtkCellRendererState flags, @@ -141,10 +141,10 @@ struct _GtkCellRendererClass void (* get_size) (GtkCellRenderer *cell, GtkWidget *widget, const GdkRectangle *cell_area, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height); + int *x_offset, + int *y_offset, + int *width, + int *height); void (* snapshot) (GtkCellRenderer *cell, GtkSnapshot *snapshot, GtkWidget *widget, @@ -187,25 +187,25 @@ GtkSizeRequestMode gtk_cell_renderer_get_request_mode (GtkCellRend GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_get_preferred_width (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size); + int *minimum_size, + int *natural_size); GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_get_preferred_height_for_width (GtkCellRenderer *cell, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height); + int width, + int *minimum_height, + int *natural_height); GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_get_preferred_height (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size); + int *minimum_size, + int *natural_size); GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_get_preferred_width_for_height (GtkCellRenderer *cell, GtkWidget *widget, - gint height, - gint *minimum_width, - gint *natural_width); + int height, + int *minimum_width, + int *natural_width); GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_get_preferred_size (GtkCellRenderer *cell, GtkWidget *widget, @@ -243,12 +243,12 @@ GtkCellEditable *gtk_cell_renderer_start_editing (GtkCellRenderer *cell, GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_set_fixed_size (GtkCellRenderer *cell, - gint width, - gint height); + int width, + int height); GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_get_fixed_size (GtkCellRenderer *cell, - gint *width, - gint *height); + int *width, + int *height); GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_set_alignment (GtkCellRenderer *cell, @@ -261,12 +261,12 @@ void gtk_cell_renderer_get_alignment (GtkCellRenderer *cell, GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_set_padding (GtkCellRenderer *cell, - gint xpad, - gint ypad); + int xpad, + int ypad); GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_get_padding (GtkCellRenderer *cell, - gint *xpad, - gint *ypad); + int *xpad, + int *ypad); GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_set_visible (GtkCellRenderer *cell, @@ -307,10 +307,10 @@ void gtk_cell_renderer_stop_editing (GtkCellRenderer *cell, void _gtk_cell_renderer_calc_offset (GtkCellRenderer *cell, const GdkRectangle *cell_area, GtkTextDirection direction, - gint width, - gint height, - gint *x_offset, - gint *y_offset); + int width, + int height, + int *x_offset, + int *y_offset); GDK_AVAILABLE_IN_ALL GtkStateFlags gtk_cell_renderer_get_state (GtkCellRenderer *cell, diff --git a/gtk/gtkcellrendereraccel.c b/gtk/gtkcellrendereraccel.c index 3c806270c6..451924fd0b 100644 --- a/gtk/gtkcellrendereraccel.c +++ b/gtk/gtkcellrendereraccel.c @@ -56,8 +56,8 @@ static void gtk_cell_renderer_accel_set_property (GObject *object, static void gtk_cell_renderer_accel_get_preferred_width (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size); + int *minimum_size, + int *natural_size); static GtkCellEditable * gtk_cell_renderer_accel_start_editing (GtkCellRenderer *cell, GdkEvent *event, @@ -427,8 +427,8 @@ gtk_cell_renderer_accel_set_property (GObject *object, static void gtk_cell_renderer_accel_get_preferred_width (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size) + int *minimum_size, + int *natural_size) { GtkCellRendererAccelPrivate *priv = gtk_cell_renderer_accel_get_instance_private (GTK_CELL_RENDERER_ACCEL (cell)); diff --git a/gtk/gtkcellrenderercombo.c b/gtk/gtkcellrenderercombo.c index 15c8b649f2..8272857e44 100644 --- a/gtk/gtkcellrenderercombo.c +++ b/gtk/gtkcellrenderercombo.c @@ -69,7 +69,7 @@ struct _GtkCellRendererComboPrivate gboolean has_entry; - gint text_column; + int text_column; gulong focus_out_id; }; diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c index bb240bae91..8616478b0a 100644 --- a/gtk/gtkcellrendererpixbuf.c +++ b/gtk/gtkcellrendererpixbuf.c @@ -63,10 +63,10 @@ static void gtk_cell_renderer_pixbuf_set_property (GObject * static void gtk_cell_renderer_pixbuf_get_size (GtkCellRenderer *cell, GtkWidget *widget, const GdkRectangle *rectangle, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height); + int *x_offset, + int *y_offset, + int *width, + int *height); static void gtk_cell_renderer_pixbuf_snapshot (GtkCellRenderer *cell, GtkSnapshot *snapshot, GtkWidget *widget, @@ -412,18 +412,18 @@ static void gtk_cell_renderer_pixbuf_get_size (GtkCellRenderer *cell, GtkWidget *widget, const GdkRectangle *cell_area, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height) + int *x_offset, + int *y_offset, + int *width, + int *height) { GtkCellRendererPixbuf *cellpixbuf = GTK_CELL_RENDERER_PIXBUF (cell); GtkCellRendererPixbufPrivate *priv = gtk_cell_renderer_pixbuf_get_instance_private (cellpixbuf); - gint pixbuf_width; - gint pixbuf_height; - gint calc_width; - gint calc_height; - gint xpad, ypad; + int pixbuf_width; + int pixbuf_height; + int calc_width; + int calc_height; + int xpad, ypad; GtkStyleContext *context; GtkIconHelper *icon_helper; @@ -459,8 +459,8 @@ gtk_cell_renderer_pixbuf_get_size (GtkCellRenderer *cell, } gtk_cell_renderer_get_padding (cell, &xpad, &ypad); - calc_width = (gint) xpad * 2 + pixbuf_width; - calc_height = (gint) ypad * 2 + pixbuf_height; + calc_width = (int) xpad * 2 + pixbuf_width; + calc_height = (int) ypad * 2 + pixbuf_height; if (cell_area && pixbuf_width > 0 && pixbuf_height > 0) { @@ -508,7 +508,7 @@ gtk_cell_renderer_pixbuf_snapshot (GtkCellRenderer *cell, GtkStyleContext *context; GdkRectangle pix_rect; gboolean is_expander; - gint xpad, ypad; + int xpad, ypad; GtkIconHelper *icon_helper; gtk_cell_renderer_pixbuf_get_size (cell, widget, (GdkRectangle *) cell_area, diff --git a/gtk/gtkcellrendererprogress.c b/gtk/gtkcellrendererprogress.c index bd2ae8bb01..831f5ad2e0 100644 --- a/gtk/gtkcellrendererprogress.c +++ b/gtk/gtkcellrendererprogress.c @@ -73,13 +73,13 @@ struct _GtkCellRendererProgressClass struct _GtkCellRendererProgressPrivate { - gint value; + int value; gchar *text; gchar *label; - gint min_h; - gint min_w; - gint pulse; - gint offset; + int min_h; + int min_w; + int pulse; + int offset; gfloat text_xalign; gfloat text_yalign; GtkOrientation orientation; @@ -96,23 +96,23 @@ static void gtk_cell_renderer_progress_set_property (GObject *ob const GValue *value, GParamSpec *pspec); static void gtk_cell_renderer_progress_set_value (GtkCellRendererProgress *cellprogress, - gint value); + int value); static void gtk_cell_renderer_progress_set_text (GtkCellRendererProgress *cellprogress, const gchar *text); static void gtk_cell_renderer_progress_set_pulse (GtkCellRendererProgress *cellprogress, - gint pulse); + int pulse); static void compute_dimensions (GtkCellRenderer *cell, GtkWidget *widget, const gchar *text, - gint *width, - gint *height); + int *width, + int *height); static void gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell, GtkWidget *widget, const GdkRectangle *cell_area, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height); + int *x_offset, + int *y_offset, + int *width, + int *height); static void gtk_cell_renderer_progress_snapshot (GtkCellRenderer *cell, GtkSnapshot *snapshot, GtkWidget *widget, @@ -383,7 +383,7 @@ recompute_label (GtkCellRendererProgress *cellprogress) static void gtk_cell_renderer_progress_set_value (GtkCellRendererProgress *cellprogress, - gint value) + int value) { GtkCellRendererProgressPrivate *priv = gtk_cell_renderer_progress_get_instance_private (cellprogress); @@ -411,7 +411,7 @@ gtk_cell_renderer_progress_set_text (GtkCellRendererProgress *cellprogress, static void gtk_cell_renderer_progress_set_pulse (GtkCellRendererProgress *cellprogress, - gint pulse) + int pulse) { GtkCellRendererProgressPrivate *priv = gtk_cell_renderer_progress_get_instance_private (cellprogress); @@ -432,12 +432,12 @@ static void compute_dimensions (GtkCellRenderer *cell, GtkWidget *widget, const gchar *text, - gint *width, - gint *height) + int *width, + int *height) { PangoRectangle logical_rect; PangoLayout *layout; - gint xpad, ypad; + int xpad, ypad; layout = gtk_widget_create_pango_layout (widget, text); pango_layout_get_pixel_extents (layout, NULL, &logical_rect); @@ -457,14 +457,14 @@ static void gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell, GtkWidget *widget, const GdkRectangle *cell_area, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height) + int *x_offset, + int *y_offset, + int *width, + int *height) { GtkCellRendererProgress *cellprogress = GTK_CELL_RENDERER_PROGRESS (cell); GtkCellRendererProgressPrivate *priv = gtk_cell_renderer_progress_get_instance_private (cellprogress); - gint w, h; + int w, h; gchar *text; if (priv->min_w < 0) @@ -501,12 +501,12 @@ gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell, if (y_offset) *y_offset = 0; } -static inline gint -get_bar_size (gint pulse, - gint value, - gint full_size) +static inline int +get_bar_size (int pulse, + int value, + int full_size) { - gint bar_size; + int bar_size; if (pulse < 0) bar_size = full_size * MAX (0, value) / 100; @@ -520,15 +520,15 @@ get_bar_size (gint pulse, return bar_size; } -static inline gint -get_bar_position (gint start, - gint full_size, - gint bar_size, - gint pulse, - gint offset, +static inline int +get_bar_position (int start, + int full_size, + int bar_size, + int pulse, + int offset, gboolean is_rtl) { - gint position; + int position; if (pulse < 0 || pulse == 0 || pulse == G_MAXINT) { @@ -559,8 +559,8 @@ gtk_cell_renderer_progress_snapshot (GtkCellRenderer *cell, GtkBorder padding; PangoLayout *layout; PangoRectangle logical_rect; - gint x, y, w, h, x_pos, y_pos, bar_position, bar_size, start, full_size; - gint xpad, ypad; + int x, y, w, h, x_pos, y_pos, bar_position, bar_size, start, full_size; + int xpad, ypad; GdkRectangle clip; gboolean is_rtl; diff --git a/gtk/gtkcellrendererspinner.c b/gtk/gtkcellrendererspinner.c index 3c429155a0..20c211a8ad 100644 --- a/gtk/gtkcellrendererspinner.c +++ b/gtk/gtkcellrendererspinner.c @@ -88,7 +88,7 @@ struct _GtkCellRendererSpinnerPrivate gboolean active; guint pulse; GtkIconSize icon_size; - gint size; + int size; }; @@ -103,10 +103,10 @@ static void gtk_cell_renderer_spinner_set_property (GObject *object, static void gtk_cell_renderer_spinner_get_size (GtkCellRenderer *cell, GtkWidget *widget, const GdkRectangle *cell_area, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height); + int *x_offset, + int *y_offset, + int *width, + int *height); static void gtk_cell_renderer_spinner_snapshot (GtkCellRenderer *cell, GtkSnapshot *snapshot, GtkWidget *widget, @@ -281,16 +281,16 @@ static void gtk_cell_renderer_spinner_get_size (GtkCellRenderer *cellr, GtkWidget *widget, const GdkRectangle *cell_area, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height) + int *x_offset, + int *y_offset, + int *width, + int *height) { GtkCellRendererSpinner *cell = GTK_CELL_RENDERER_SPINNER (cellr); GtkCellRendererSpinnerPrivate *priv = gtk_cell_renderer_spinner_get_instance_private (cell); gdouble align; - gint w, h; - gint xpad, ypad; + int w, h; + int xpad, ypad; gfloat xalign, yalign; gboolean rtl; @@ -339,17 +339,17 @@ static void gtk_paint_spinner (GtkStyleContext *context, cairo_t *cr, guint step, - gint x, - gint y, - gint width, - gint height) + int x, + int y, + int width, + int height) { GdkRGBA color; guint num_steps; gdouble dx, dy; gdouble radius; gdouble half; - gint i; + int i; guint real_step; num_steps = 12; @@ -372,7 +372,7 @@ gtk_paint_spinner (GtkStyleContext *context, for (i = 0; i < num_steps; i++) { - gint inset = 0.7 * radius; + int inset = 0.7 * radius; /* transparency is a function of time and initial value */ gdouble t = (gdouble) ((i + num_steps - real_step) @@ -411,7 +411,7 @@ gtk_cell_renderer_spinner_snapshot (GtkCellRenderer *cellr, GtkCellRendererSpinnerPrivate *priv = gtk_cell_renderer_spinner_get_instance_private (cell); GdkRectangle pix_rect; GdkRectangle draw_rect; - gint xpad, ypad; + int xpad, ypad; cairo_t *cr; if (!priv->active) diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index 1163616d72..8e905ab9e8 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -76,17 +76,17 @@ static GtkCellEditable *gtk_cell_renderer_text_start_editing (GtkCellRenderer static void gtk_cell_renderer_text_get_preferred_width (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimal_size, - gint *natural_size); + int *minimal_size, + int *natural_size); static void gtk_cell_renderer_text_get_preferred_height (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimal_size, - gint *natural_size); + int *minimal_size, + int *natural_size); static void gtk_cell_renderer_text_get_preferred_height_for_width (GtkCellRenderer *cell, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height); + int width, + int *minimum_height, + int *natural_height); static void gtk_cell_renderer_text_get_aligned_area (GtkCellRenderer *cell, GtkWidget *widget, GtkCellRendererState flags, @@ -183,11 +183,11 @@ struct _GtkCellRendererTextPrivate gdouble font_scale; - gint rise; - gint fixed_height_rows; - gint width_chars; - gint max_width_chars; - gint wrap_width; + int rise; + int fixed_height_rows; + int width_chars; + int max_width_chars; + int wrap_width; guint in_entry_menu : 1; guint strikethrough : 1; @@ -951,7 +951,7 @@ set_font_desc_fields (PangoFontDescription *desc, pango_font_description_set_stretch (desc, pango_font_description_get_stretch (desc)); if (to_set & PANGO_FONT_MASK_SIZE) { - gint size = pango_font_description_get_size (desc); + int size = pango_font_description_get_size (desc); if (size <= 0) { size = 10 * PANGO_SCALE; @@ -1437,7 +1437,7 @@ get_layout (GtkCellRendererText *celltext, PangoAttrList *attr_list; PangoLayout *layout; PangoUnderline uline; - gint xpad; + int xpad; gboolean placeholder_layout = show_placeholder_text (celltext); layout = gtk_widget_create_pango_layout (widget, placeholder_layout ? @@ -1562,7 +1562,7 @@ get_layout (GtkCellRendererText *celltext, if (priv->wrap_width != -1) { PangoRectangle rect; - gint width, text_width; + int width, text_width; pango_layout_get_extents (layout, NULL, &rect); text_width = rect.width; @@ -1606,10 +1606,10 @@ get_size (GtkCellRenderer *cell, GtkWidget *widget, const GdkRectangle *cell_area, PangoLayout *layout, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height) + int *x_offset, + int *y_offset, + int *width, + int *height) { GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (cell); GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext); @@ -1626,7 +1626,7 @@ get_size (GtkCellRenderer *cell, PangoContext *context; PangoFontMetrics *metrics; PangoFontDescription *font_desc; - gint row_height; + int row_height; style_context = gtk_widget_get_style_context (widget); @@ -1702,9 +1702,9 @@ gtk_cell_renderer_text_snapshot (GtkCellRenderer *cell, GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext); GtkStyleContext *context; PangoLayout *layout; - gint x_offset = 0; - gint y_offset = 0; - gint xpad, ypad; + int x_offset = 0; + int y_offset = 0; + int xpad, ypad; PangoRectangle rect; layout = get_layout (celltext, widget, cell_area, flags); @@ -1864,7 +1864,7 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell, **/ void gtk_cell_renderer_text_set_fixed_height_from_font (GtkCellRendererText *renderer, - gint number_of_rows) + int number_of_rows) { GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (renderer); GtkCellRenderer *cell = GTK_CELL_RENDERER (renderer); @@ -1874,7 +1874,7 @@ gtk_cell_renderer_text_set_fixed_height_from_font (GtkCellRendererText *renderer if (number_of_rows == -1) { - gint width, height; + int width, height; gtk_cell_renderer_get_fixed_size (cell, &width, &height); gtk_cell_renderer_set_fixed_size (cell, width, -1); @@ -1889,8 +1889,8 @@ gtk_cell_renderer_text_set_fixed_height_from_font (GtkCellRendererText *renderer static void gtk_cell_renderer_text_get_preferred_width (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size) + int *minimum_size, + int *natural_size) { GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (cell); GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext); @@ -1898,8 +1898,8 @@ gtk_cell_renderer_text_get_preferred_width (GtkCellRenderer *cell, PangoContext *context; PangoFontMetrics *metrics; PangoRectangle rect; - gint char_width, text_width, ellipsize_chars, xpad; - gint min_width, nat_width; + int char_width, text_width, ellipsize_chars, xpad; + int min_width, nat_width; /* "width-chars" Hard-coded minimum width: * - minimum size should be MAX (width-chars, strlen ("...")); @@ -1955,7 +1955,7 @@ gtk_cell_renderer_text_get_preferred_width (GtkCellRenderer *cell, if (priv->max_width_chars > 0) { - gint max_width = xpad * 2 + PANGO_PIXELS (char_width) * priv->max_width_chars; + int max_width = xpad * 2 + PANGO_PIXELS (char_width) * priv->max_width_chars; min_width = MIN (min_width, max_width); nat_width = MIN (nat_width, max_width); @@ -1971,13 +1971,13 @@ gtk_cell_renderer_text_get_preferred_width (GtkCellRenderer *cell, static void gtk_cell_renderer_text_get_preferred_height_for_width (GtkCellRenderer *cell, GtkWidget *widget, - gint width, - gint *minimum_height, - gint *natural_height) + int width, + int *minimum_height, + int *natural_height) { GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (cell); PangoLayout *layout; - gint text_height, xpad, ypad; + int text_height, xpad, ypad; gtk_cell_renderer_get_padding (cell, &xpad, &ypad); @@ -1998,10 +1998,10 @@ gtk_cell_renderer_text_get_preferred_height_for_width (GtkCellRenderer *cell, static void gtk_cell_renderer_text_get_preferred_height (GtkCellRenderer *cell, GtkWidget *widget, - gint *minimum_size, - gint *natural_size) + int *minimum_size, + int *natural_size) { - gint min_width; + int min_width; /* Thankfully cell renderers dont rotate, so they only have to do * height-for-width and not the opposite. Here we have only to return @@ -2024,8 +2024,8 @@ gtk_cell_renderer_text_get_aligned_area (GtkCellRenderer *cell, { GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (cell); PangoLayout *layout; - gint x_offset = 0; - gint y_offset = 0; + int x_offset = 0; + int y_offset = 0; layout = get_layout (celltext, widget, cell_area, flags); get_size (cell, widget, cell_area, layout, &x_offset, &y_offset, diff --git a/gtk/gtkcellrenderertext.h b/gtk/gtkcellrenderertext.h index 6ee7a97f3d..d1198aeeb0 100644 --- a/gtk/gtkcellrenderertext.h +++ b/gtk/gtkcellrenderertext.h @@ -64,7 +64,7 @@ GtkCellRenderer *gtk_cell_renderer_text_new (void); GDK_AVAILABLE_IN_ALL void gtk_cell_renderer_text_set_fixed_height_from_font (GtkCellRendererText *renderer, - gint number_of_rows); + int number_of_rows); G_END_DECLS diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c index 19e84adc63..2b580e4871 100644 --- a/gtk/gtkcellrenderertoggle.c +++ b/gtk/gtkcellrenderertoggle.c @@ -56,10 +56,10 @@ static void gtk_cell_renderer_toggle_set_property (GObject * static void gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell, GtkWidget *widget, const GdkRectangle *cell_area, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height); + int *x_offset, + int *y_offset, + int *width, + int *height); static void gtk_cell_renderer_toggle_snapshot (GtkCellRenderer *cell, GtkSnapshot *snapshot, GtkWidget *widget, @@ -352,14 +352,14 @@ static void gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell, GtkWidget *widget, const GdkRectangle *cell_area, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height) + int *x_offset, + int *y_offset, + int *width, + int *height) { - gint calc_width; - gint calc_height; - gint xpad, ypad; + int calc_width; + int calc_height; + int xpad, ypad; GtkStyleContext *context; GtkBorder border, padding; @@ -417,9 +417,9 @@ gtk_cell_renderer_toggle_snapshot (GtkCellRenderer *cell, GtkCellRendererToggle *celltoggle = GTK_CELL_RENDERER_TOGGLE (cell); GtkCellRendererTogglePrivate *priv = gtk_cell_renderer_toggle_get_instance_private (celltoggle); GtkStyleContext *context; - gint width, height; - gint x_offset, y_offset; - gint xpad, ypad; + int width, height; + int x_offset, y_offset; + int xpad, ypad; GtkStateFlags state; GtkBorder padding, border; @@ -478,7 +478,7 @@ gtk_cell_renderer_toggle_snapshot (GtkCellRenderer *cell, gtk_snapshot_pop (snapshot); } -static gint +static int gtk_cell_renderer_toggle_activate (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c index a7b5a9c3a9..d072ef6f13 100644 --- a/gtk/gtkcellview.c +++ b/gtk/gtkcellview.c @@ -492,7 +492,7 @@ gtk_cell_view_size_allocate (GtkWidget *widget, { GtkCellView *cellview = GTK_CELL_VIEW (widget); GtkCellViewPrivate *priv = gtk_cell_view_get_instance_private (cellview); - gint alloc_width, alloc_height; + int alloc_width, alloc_height; gtk_cell_area_context_get_allocation (priv->context, &alloc_width, &alloc_height); @@ -515,9 +515,9 @@ static void gtk_cell_view_request_model (GtkCellView *cellview, GtkTreeIter *parent, GtkOrientation orientation, - gint for_size, - gint *minimum_size, - gint *natural_size) + int for_size, + int *minimum_size, + int *natural_size) { GtkCellViewPrivate *priv = gtk_cell_view_get_instance_private (cellview); GtkTreeIter iter; @@ -529,7 +529,7 @@ gtk_cell_view_request_model (GtkCellView *cellview, valid = gtk_tree_model_iter_children (priv->model, &iter, parent); while (valid) { - gint min, nat; + int min, nat; gtk_cell_area_apply_attributes (priv->area, priv->model, &iter, FALSE, FALSE); @@ -589,7 +589,7 @@ gtk_cell_view_measure (GtkWidget *widget, { if (priv->fit_model) { - gint min = 0, nat = 0; + int min = 0, nat = 0; gtk_cell_view_request_model (cellview, NULL, GTK_ORIENTATION_HORIZONTAL, -1, &min, &nat); } else @@ -606,7 +606,7 @@ gtk_cell_view_measure (GtkWidget *widget, { if (priv->fit_model) { - gint min = 0, nat = 0; + int min = 0, nat = 0; gtk_cell_view_request_model (cellview, NULL, GTK_ORIENTATION_VERTICAL, -1, &min, &nat); } else @@ -623,7 +623,7 @@ gtk_cell_view_measure (GtkWidget *widget, { if (priv->fit_model) { - gint min = 0, nat = 0; + int min = 0, nat = 0; gtk_cell_view_request_model (cellview, NULL, GTK_ORIENTATION_HORIZONTAL, for_size, &min, &nat); *minimum = min; @@ -642,7 +642,7 @@ gtk_cell_view_measure (GtkWidget *widget, { if (priv->fit_model) { - gint min = 0, nat = 0; + int min = 0, nat = 0; gtk_cell_view_request_model (cellview, NULL, GTK_ORIENTATION_VERTICAL, for_size, &min, &nat); *minimum = min; diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index 2058a44951..28f6de6f7e 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -364,7 +364,7 @@ dialog_destroy (GtkWidget *widget, static void dialog_response (GtkDialog *dialog, - gint response, + int response, gpointer data) { if (response == GTK_RESPONSE_CANCEL) @@ -640,8 +640,8 @@ gtk_color_button_get_property (GObject *object, static void gtk_color_button_add_palette (GtkColorChooser *chooser, GtkOrientation orientation, - gint colors_per_line, - gint n_colors, + int colors_per_line, + int n_colors, GdkRGBA *colors) { GtkColorButton *button = GTK_COLOR_BUTTON (chooser); diff --git a/gtk/gtkcolorchooser.c b/gtk/gtkcolorchooser.c index 070f7fa20e..1f217c78b4 100644 --- a/gtk/gtkcolorchooser.c +++ b/gtk/gtkcolorchooser.c @@ -214,8 +214,8 @@ gtk_color_chooser_set_use_alpha (GtkColorChooser *chooser, void gtk_color_chooser_add_palette (GtkColorChooser *chooser, GtkOrientation orientation, - gint colors_per_line, - gint n_colors, + int colors_per_line, + int n_colors, GdkRGBA *colors) { g_return_if_fail (GTK_IS_COLOR_CHOOSER (chooser)); diff --git a/gtk/gtkcolorchooser.h b/gtk/gtkcolorchooser.h index fc9531784a..0ed0872a08 100644 --- a/gtk/gtkcolorchooser.h +++ b/gtk/gtkcolorchooser.h @@ -47,8 +47,8 @@ struct _GtkColorChooserInterface void (* add_palette) (GtkColorChooser *chooser, GtkOrientation orientation, - gint colors_per_line, - gint n_colors, + int colors_per_line, + int n_colors, GdkRGBA *colors); /* Signals */ @@ -78,8 +78,8 @@ void gtk_color_chooser_set_use_alpha (GtkColorChooser *chooser, GDK_AVAILABLE_IN_ALL void gtk_color_chooser_add_palette (GtkColorChooser *chooser, GtkOrientation orientation, - gint colors_per_line, - gint n_colors, + int colors_per_line, + int n_colors, GdkRGBA *colors); G_END_DECLS diff --git a/gtk/gtkcolorchooserdialog.c b/gtk/gtkcolorchooserdialog.c index 7e748400b7..5dd68c6532 100644 --- a/gtk/gtkcolorchooserdialog.c +++ b/gtk/gtkcolorchooserdialog.c @@ -98,7 +98,7 @@ color_activated_cb (GtkColorChooser *chooser, static void gtk_color_chooser_dialog_response (GtkDialog *dialog, - gint response_id, + int response_id, gpointer user_data) { if (response_id == GTK_RESPONSE_OK) @@ -249,8 +249,8 @@ gtk_color_chooser_dialog_set_rgba (GtkColorChooser *chooser, static void gtk_color_chooser_dialog_add_palette (GtkColorChooser *chooser, GtkOrientation orientation, - gint colors_per_line, - gint n_colors, + int colors_per_line, + int n_colors, GdkRGBA *colors) { GtkColorChooserDialog *cc = GTK_COLOR_CHOOSER_DIALOG (chooser); diff --git a/gtk/gtkcolorchooserwidget.c b/gtk/gtkcolorchooserwidget.c index 938af7632e..12c2aa85aa 100644 --- a/gtk/gtkcolorchooserwidget.c +++ b/gtk/gtkcolorchooserwidget.c @@ -319,17 +319,17 @@ remove_palette (GtkColorChooserWidget *cc) static void add_palette (GtkColorChooserWidget *cc, GtkOrientation orientation, - gint colors_per_line, - gint n_colors, + int colors_per_line, + int n_colors, GdkRGBA *colors, const gchar **names) { GtkWidget *grid; GtkWidget *p; AtkObject *atk_obj; - gint line, pos; - gint i; - gint left, right; + int line, pos; + int i; + int left, right; if (colors == NULL) { @@ -474,7 +474,7 @@ add_default_palette (GtkColorChooserWidget *cc) NC_("Color name", "White") }; GdkRGBA colors[9*3]; - gint i, j; + int i, j; for (i = 0; i < 9; i++) for (j = 0; j < 3; j++) @@ -537,7 +537,7 @@ gtk_color_chooser_widget_init (GtkColorChooserWidget *cc) GtkWidget *p; GtkWidget *button; GtkWidget *label; - gint i; + int i; double color[4]; GdkRGBA rgba; GVariant *variant; @@ -856,8 +856,8 @@ gtk_color_chooser_widget_set_rgba (GtkColorChooser *chooser, static void gtk_color_chooser_widget_add_palette (GtkColorChooser *chooser, GtkOrientation orientation, - gint colors_per_line, - gint n_colors, + int colors_per_line, + int n_colors, GdkRGBA *colors) { GtkColorChooserWidget *cc = GTK_COLOR_CHOOSER_WIDGET (chooser); diff --git a/gtk/gtkcoloreditor.c b/gtk/gtkcoloreditor.c index b9a285d823..f170fb4a73 100644 --- a/gtk/gtkcoloreditor.c +++ b/gtk/gtkcoloreditor.c @@ -70,7 +70,7 @@ struct _GtkColorEditor GtkWidget *picker_button; GtkColorPicker *picker; - gint popup_position; + int popup_position; guint text_changed : 1; guint use_alpha : 1; @@ -204,8 +204,8 @@ popup_edit (GtkWidget *widget, GtkWidget *popup = NULL; GtkRoot *root; GtkWidget *focus; - gint position; - gint s, e; + int position; + int s, e; const char *param; param = g_variant_get_string (parameters, NULL); @@ -273,7 +273,7 @@ get_child_position (GtkOverlay *overlay, { GtkRequisition req; GtkAllocation alloc; - gint s, e; + int s, e; double x, y; gtk_widget_get_preferred_size (widget, &req, NULL); diff --git a/gtk/gtkcolorplane.c b/gtk/gtkcolorplane.c index 8d18aed3f9..90ad66347d 100644 --- a/gtk/gtkcolorplane.c +++ b/gtk/gtkcolorplane.c @@ -53,11 +53,11 @@ G_DEFINE_TYPE_WITH_PRIVATE (GtkColorPlane, gtk_color_plane, GTK_TYPE_WIDGET) static void sv_to_xy (GtkColorPlane *plane, - gint *x, - gint *y) + int *x, + int *y) { gdouble s, v; - gint width, height; + int width, height; width = gtk_widget_get_width (GTK_WIDGET (plane)); height = gtk_widget_get_height (GTK_WIDGET (plane)); @@ -74,8 +74,8 @@ plane_snapshot (GtkWidget *widget, GtkSnapshot *snapshot) { GtkColorPlane *plane = GTK_COLOR_PLANE (widget); - gint x, y; - gint width, height; + int x, y; + int width, height; sv_to_xy (plane, &x, &y); width = gtk_widget_get_width (widget); @@ -119,13 +119,13 @@ create_texture (GtkColorPlane *plane) { GtkWidget *widget = GTK_WIDGET (plane); GBytes *bytes; - gint width, height, stride; + int width, height, stride; guint red, green, blue; guint32 *data, *p; float h, s, v; float r, g, b; gdouble sf, vf; - gint x, y; + int x, y; if (!gtk_widget_get_realized (widget)) return; @@ -230,8 +230,8 @@ sv_changed (GtkColorPlane *plane) static void update_color (GtkColorPlane *plane, - gint x, - gint y) + int x, + int y) { GtkWidget *widget = GTK_WIDGET (plane); gdouble s, v; diff --git a/gtk/gtkcolorscale.c b/gtk/gtkcolorscale.c index 8f7354ab7d..496a96a3ce 100644 --- a/gtk/gtkcolorscale.c +++ b/gtk/gtkcolorscale.c @@ -84,7 +84,7 @@ gtk_color_scale_snapshot_trough (GtkColorScale *scale, if (!priv->hue_texture) { GdkTexture *texture; - gint stride; + int stride; GBytes *bytes; guchar *data, *p; gdouble h; diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c index 462f8dd29c..6926bad8b7 100644 --- a/gtk/gtkcolorswatch.c +++ b/gtk/gtkcolorswatch.c @@ -280,7 +280,7 @@ hold_action (GtkGestureLongPress *gesture, static void tap_action (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkColorSwatch *swatch) @@ -331,7 +331,7 @@ gtk_color_swatch_measure (GtkWidget *widget, int *natural_baseline) { GtkColorSwatch *swatch = GTK_COLOR_SWATCH (widget); - gint w, h, min; + int w, h, min; gtk_widget_measure (swatch->overlay_widget, orientation, diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 5ab02aa0a3..046d48e1ca 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -116,7 +116,7 @@ typedef struct GtkCellArea *area; - gint active; /* Only temporary */ + int active; /* Only temporary */ GtkTreeRowReference *active_row; GtkWidget *cell_view; @@ -134,10 +134,10 @@ typedef struct /* For "has-entry" specific behavior we track * an automated cell renderer and text column */ - gint text_column; + int text_column; GtkCellRenderer *text_renderer; - gint id_column; + int id_column; guint popup_in_progress : 1; guint popup_shown : 1; @@ -250,7 +250,7 @@ static void gtk_combo_box_model_row_deleted (GtkTreeModel *model, static void gtk_combo_box_model_rows_reordered (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order, + int *new_order, gpointer user_data); static void gtk_combo_box_model_row_changed (GtkTreeModel *model, GtkTreePath *path, @@ -354,7 +354,7 @@ gtk_combo_box_size_allocate (GtkWidget *widget, { GtkComboBox *combo_box = GTK_COMBO_BOX (widget); GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); - gint menu_width; + int menu_width; gtk_widget_size_allocate (priv->box, &(GtkAllocation) { @@ -1231,7 +1231,7 @@ gtk_combo_box_menu_popup (GtkComboBox *combo_box) { GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); #if 0 - gint active_item; + int active_item; GtkWidget *active; int width, min_width, nat_width; #endif @@ -1286,7 +1286,7 @@ gtk_combo_box_menu_popup (GtkComboBox *combo_box) } else { - gint rect_anchor_dy = -2; + int rect_anchor_dy = -2; GList *i; GtkWidget *child; @@ -1309,7 +1309,7 @@ gtk_combo_box_menu_popup (GtkComboBox *combo_box) if (active) { - gint child_height; + int child_height; GList *children; children = gtk_menu_shell_get_items (GTK_MENU_SHELL (priv->popup_widget)); for (i = children; i && i->data != active; i = i->next) @@ -1769,7 +1769,7 @@ static void gtk_combo_box_model_rows_reordered (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order, + int *new_order, gpointer user_data) { gtk_tree_row_reference_reordered (G_OBJECT (user_data), path, iter, new_order); @@ -1901,11 +1901,11 @@ gtk_combo_box_new_with_model_and_entry (GtkTreeModel *model) * Returns: An integer which is the index of the currently active item, * or -1 if there’s no active item. */ -gint +int gtk_combo_box_get_active (GtkComboBox *combo_box) { GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); - gint result; + int result; g_return_val_if_fail (GTK_IS_COMBO_BOX (combo_box), 0); @@ -1933,7 +1933,7 @@ gtk_combo_box_get_active (GtkComboBox *combo_box) */ void gtk_combo_box_set_active (GtkComboBox *combo_box, - gint index_) + int index_) { GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); GtkTreePath *path = NULL; @@ -1964,7 +1964,7 @@ gtk_combo_box_set_active_internal (GtkComboBox *combo_box, { GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); GtkTreePath *active_path; - gint path_cmp; + int path_cmp; /* Remember whether the initially active row is valid. */ gboolean is_valid_row_reference = gtk_tree_row_reference_valid (priv->active_row); @@ -2690,7 +2690,7 @@ gtk_combo_box_get_has_entry (GtkComboBox *combo_box) */ void gtk_combo_box_set_entry_text_column (GtkComboBox *combo_box, - gint text_column) + int text_column) { GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); @@ -2721,7 +2721,7 @@ gtk_combo_box_set_entry_text_column (GtkComboBox *combo_box, * * Returns: A column in the data source model of @combo_box. */ -gint +int gtk_combo_box_get_entry_text_column (GtkComboBox *combo_box) { GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); @@ -2797,7 +2797,7 @@ gtk_combo_box_buildable_get_internal_child (GtkBuildable *buildable, */ void gtk_combo_box_set_id_column (GtkComboBox *combo_box, - gint id_column) + int id_column) { GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); @@ -2824,7 +2824,7 @@ gtk_combo_box_set_id_column (GtkComboBox *combo_box, * * Returns: A column in the data source model of @combo_box. */ -gint +int gtk_combo_box_get_id_column (GtkComboBox *combo_box) { GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); @@ -2858,7 +2858,7 @@ gtk_combo_box_get_active_id (GtkComboBox *combo_box) GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); GtkTreeModel *model; GtkTreeIter iter; - gint column; + int column; g_return_val_if_fail (GTK_IS_COMBO_BOX (combo_box), NULL); @@ -2910,7 +2910,7 @@ gtk_combo_box_set_active_id (GtkComboBox *combo_box, GtkTreeModel *model; GtkTreeIter iter; gboolean match = FALSE; - gint column; + int column; g_return_val_if_fail (GTK_IS_COMBO_BOX (combo_box), FALSE); diff --git a/gtk/gtkcombobox.h b/gtk/gtkcombobox.h index afcfbbd5ea..7247672b4b 100644 --- a/gtk/gtkcombobox.h +++ b/gtk/gtkcombobox.h @@ -81,10 +81,10 @@ GtkWidget *gtk_combo_box_new_with_model_and_entry (GtkTreeModel *model); /* get/set active item */ GDK_AVAILABLE_IN_ALL -gint gtk_combo_box_get_active (GtkComboBox *combo_box); +int gtk_combo_box_get_active (GtkComboBox *combo_box); GDK_AVAILABLE_IN_ALL void gtk_combo_box_set_active (GtkComboBox *combo_box, - gint index_); + int index_); GDK_AVAILABLE_IN_ALL gboolean gtk_combo_box_get_active_iter (GtkComboBox *combo_box, GtkTreeIter *iter); @@ -117,9 +117,9 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_combo_box_get_has_entry (GtkComboBox *combo_box); GDK_AVAILABLE_IN_ALL void gtk_combo_box_set_entry_text_column (GtkComboBox *combo_box, - gint text_column); + int text_column); GDK_AVAILABLE_IN_ALL -gint gtk_combo_box_get_entry_text_column (GtkComboBox *combo_box); +int gtk_combo_box_get_entry_text_column (GtkComboBox *combo_box); GDK_AVAILABLE_IN_ALL void gtk_combo_box_set_popup_fixed_width (GtkComboBox *combo_box, @@ -139,10 +139,10 @@ GDK_AVAILABLE_IN_ALL AtkObject* gtk_combo_box_get_popup_accessible (GtkComboBox *combo_box); GDK_AVAILABLE_IN_ALL -gint gtk_combo_box_get_id_column (GtkComboBox *combo_box); +int gtk_combo_box_get_id_column (GtkComboBox *combo_box); GDK_AVAILABLE_IN_ALL void gtk_combo_box_set_id_column (GtkComboBox *combo_box, - gint id_column); + int id_column); GDK_AVAILABLE_IN_ALL const gchar * gtk_combo_box_get_active_id (GtkComboBox *combo_box); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkcomboboxtext.c b/gtk/gtkcomboboxtext.c index 9305562c64..0578f8336d 100644 --- a/gtk/gtkcomboboxtext.c +++ b/gtk/gtkcomboboxtext.c @@ -124,7 +124,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkComboBoxText, gtk_combo_box_text, GTK_TYPE_COMBO_BOX static void gtk_combo_box_text_constructed (GObject *object) { - const gint text_column = 0; + const int text_column = 0; G_OBJECT_CLASS (gtk_combo_box_text_parent_class)->constructed (object); @@ -423,7 +423,7 @@ gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box, */ void gtk_combo_box_text_insert_text (GtkComboBoxText *combo_box, - gint position, + int position, const gchar *text) { gtk_combo_box_text_insert (combo_box, position, NULL, text); @@ -485,13 +485,13 @@ gtk_combo_box_text_prepend (GtkComboBoxText *combo_box, */ void gtk_combo_box_text_insert (GtkComboBoxText *combo_box, - gint position, + int position, const gchar *id, const gchar *text) { GtkListStore *store; GtkTreeIter iter; - gint text_column; + int text_column; g_return_if_fail (GTK_IS_COMBO_BOX_TEXT (combo_box)); g_return_if_fail (text != NULL); @@ -517,7 +517,7 @@ gtk_combo_box_text_insert (GtkComboBoxText *combo_box, if (id != NULL) { - gint id_column; + int id_column; id_column = gtk_combo_box_get_id_column (GTK_COMBO_BOX (combo_box)); g_return_if_fail (id_column >= 0); @@ -536,7 +536,7 @@ gtk_combo_box_text_insert (GtkComboBoxText *combo_box, */ void gtk_combo_box_text_remove (GtkComboBoxText *combo_box, - gint position) + int position) { GtkTreeModel *model; GtkListStore *store; @@ -600,7 +600,7 @@ gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box) else if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo_box), &iter)) { GtkTreeModel *model; - gint text_column; + int text_column; model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box)); g_return_val_if_fail (GTK_IS_LIST_STORE (model), NULL); diff --git a/gtk/gtkcomboboxtext.h b/gtk/gtkcomboboxtext.h index 80feb5ab4f..e25478404a 100644 --- a/gtk/gtkcomboboxtext.h +++ b/gtk/gtkcomboboxtext.h @@ -44,14 +44,14 @@ void gtk_combo_box_text_append_text (GtkComboBoxText *combo_box const gchar *text); GDK_AVAILABLE_IN_ALL void gtk_combo_box_text_insert_text (GtkComboBoxText *combo_box, - gint position, + int position, const gchar *text); GDK_AVAILABLE_IN_ALL void gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box, const gchar *text); GDK_AVAILABLE_IN_ALL void gtk_combo_box_text_remove (GtkComboBoxText *combo_box, - gint position); + int position); GDK_AVAILABLE_IN_ALL void gtk_combo_box_text_remove_all (GtkComboBoxText *combo_box); GDK_AVAILABLE_IN_ALL @@ -59,7 +59,7 @@ gchar *gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box GDK_AVAILABLE_IN_ALL void gtk_combo_box_text_insert (GtkComboBoxText *combo_box, - gint position, + int position, const gchar *id, const gchar *text); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkcomposetable.c b/gtk/gtkcomposetable.c index c355c6a7bd..4ae96c2350 100644 --- a/gtk/gtkcomposetable.c +++ b/gtk/gtkcomposetable.c @@ -415,7 +415,7 @@ gtk_compose_list_format_for_gtk (GList *compose_list, return compose_list; } -static gint +static int gtk_compose_data_compare (gpointer a, gpointer b, gpointer data) @@ -595,7 +595,7 @@ gtk_compose_table_serialize (GtkComposeTable *compose_table, return contents; } -static gint +static int gtk_compose_table_find (gconstpointer data1, gconstpointer data2) { @@ -830,8 +830,8 @@ gtk_compose_table_new_with_file (const gchar *compose_file) GSList * gtk_compose_table_list_add_array (GSList *compose_tables, const guint16 *data, - gint max_seq_len, - gint n_seqs) + int max_seq_len, + int n_seqs) { guint32 hash; GtkComposeTable *compose_table; diff --git a/gtk/gtkcomposetable.h b/gtk/gtkcomposetable.h index f2e8e8de3d..b29a22718a 100644 --- a/gtk/gtkcomposetable.h +++ b/gtk/gtkcomposetable.h @@ -29,24 +29,24 @@ typedef struct _GtkComposeTableCompact GtkComposeTableCompact; struct _GtkComposeTable { guint16 *data; - gint max_seq_len; - gint n_seqs; + int max_seq_len; + int n_seqs; guint32 id; }; struct _GtkComposeTableCompact { const guint16 *data; - gint max_seq_len; - gint n_index_size; - gint n_index_stride; + int max_seq_len; + int n_index_size; + int n_index_stride; }; GtkComposeTable * gtk_compose_table_new_with_file (const gchar *compose_file); GSList *gtk_compose_table_list_add_array (GSList *compose_tables, const guint16 *data, - gint max_seq_len, - gint n_seqs); + int max_seq_len, + int n_seqs); GSList *gtk_compose_table_list_add_file (GSList *compose_tables, const gchar *compose_file); diff --git a/gtk/gtkcssanimation.c b/gtk/gtkcssanimation.c index 076abd950a..1d0c474d2c 100644 --- a/gtk/gtkcssanimation.c +++ b/gtk/gtkcssanimation.c @@ -50,7 +50,7 @@ static double gtk_css_animation_get_progress (GtkCssAnimation *animation) { gboolean reverse, odd_iteration; - gint cycle = gtk_progress_tracker_get_iteration_cycle (&animation->tracker); + int cycle = gtk_progress_tracker_get_iteration_cycle (&animation->tracker); odd_iteration = cycle % 2 > 0; switch (animation->direction) diff --git a/gtk/gtkcssimageicontheme.c b/gtk/gtkcssimageicontheme.c index 03a8a67d52..2fa93d2540 100644 --- a/gtk/gtkcssimageicontheme.c +++ b/gtk/gtkcssimageicontheme.c @@ -46,7 +46,7 @@ gtk_css_image_icon_theme_snapshot (GtkCssImage *image, GtkCssImageIconTheme *icon_theme = GTK_CSS_IMAGE_ICON_THEME (image); GtkIconPaintable *icon; double icon_width, icon_height; - gint size; + int size; double x, y; size = floor (MIN (width, height)); diff --git a/gtk/gtkcssimagerecolor.c b/gtk/gtkcssimagerecolor.c index 23cbb16bbe..d640f8aaa9 100644 --- a/gtk/gtkcssimagerecolor.c +++ b/gtk/gtkcssimagerecolor.c @@ -130,7 +130,7 @@ static GtkCssImage * gtk_css_image_recolor_load (GtkCssImageRecolor *recolor, GtkCssStyle *style, GtkCssValue *palette, - gint scale, + int scale, GError **gerror) { GError *local_error = NULL; diff --git a/gtk/gtkcssnodedeclaration.c b/gtk/gtkcssnodedeclaration.c index 266411435f..ae78cf74ce 100644 --- a/gtk/gtkcssnodedeclaration.c +++ b/gtk/gtkcssnodedeclaration.c @@ -180,7 +180,7 @@ find_class (const GtkCssNodeDeclaration *decl, GQuark class_quark, guint *position) { - gint min, max, mid; + int min, max, mid; gboolean found = FALSE; guint pos; diff --git a/gtk/gtkcssnumbervalue.c b/gtk/gtkcssnumbervalue.c index 51b7522612..cd384ff1da 100644 --- a/gtk/gtkcssnumbervalue.c +++ b/gtk/gtkcssnumbervalue.c @@ -516,7 +516,7 @@ static void gtk_css_calc_array_add (GPtrArray *array, GtkCssValue *value) { gsize i; - gint calc_term_order; + int calc_term_order; calc_term_order = gtk_css_number_value_get_calc_term_order (value); diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 04b3a1d152..54e899bb89 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -1237,7 +1237,7 @@ _gtk_css_find_theme_dir (const gchar *dir, gchar *file; gchar *base; gchar *subsubdir; - gint i; + int i; gchar *path; if (variant) diff --git a/gtk/gtkcssselector.c b/gtk/gtkcssselector.c index 7c7c0f8740..b8ef92a9ae 100644 --- a/gtk/gtkcssselector.c +++ b/gtk/gtkcssselector.c @@ -982,7 +982,7 @@ string_has_number (const char *string, static gboolean parse_plus_b (GtkCssParser *parser, gboolean negate, - gint *b) + int *b) { const GtkCssToken *token; gboolean has_seen_sign; @@ -1039,9 +1039,9 @@ parse_plus_b (GtkCssParser *parser, static gboolean parse_n_plus_b (GtkCssParser *parser, - gint before, - gint *a, - gint *b) + int before, + int *a, + int *b) { const GtkCssToken *token; @@ -1080,9 +1080,9 @@ parse_n_plus_b (GtkCssParser *parser, static gboolean parse_a_n_plus_b (GtkCssParser *parser, - gint seen_sign, - gint *a, - gint *b) + int seen_sign, + int *a, + int *b) { const GtkCssToken *token; @@ -1197,7 +1197,7 @@ parse_a_n_plus_b_arg (GtkCssParser *parser, guint arg, gpointer data) { - gint *ab = data; + int *ab = data; if (!parse_a_n_plus_b (parser, FALSE, &ab[0], &ab[1])) return 0; @@ -1327,7 +1327,7 @@ gtk_css_selector_parse_selector_pseudo_class (GtkCssParser *parser, { if (gtk_css_token_is_function (token, "nth-child")) { - gint ab[2]; + int ab[2]; if (!gtk_css_parser_consume_function (parser, 1, 1, parse_a_n_plus_b_arg, ab)) { @@ -1345,7 +1345,7 @@ gtk_css_selector_parse_selector_pseudo_class (GtkCssParser *parser, } else if (gtk_css_token_is_function (token, "nth-last-child")) { - gint ab[2]; + int ab[2]; if (!gtk_css_parser_consume_function (parser, 1, 1, parse_a_n_plus_b_arg, ab)) { diff --git a/gtk/gtkcssstyle.c b/gtk/gtkcssstyle.c index 8a15649b74..106a90ea5a 100644 --- a/gtk/gtkcssstyle.c +++ b/gtk/gtkcssstyle.c @@ -428,7 +428,7 @@ gtk_css_style_get_pango_attributes (GtkCssStyle *style) GtkTextDecorationStyle decoration_style; const GdkRGBA *color; const GdkRGBA *decoration_color; - gint letter_spacing; + int letter_spacing; GtkCssFontVariantLigature ligatures; GtkCssFontVariantNumeric numeric; GtkCssFontVariantEastAsian east_asian; diff --git a/gtk/gtkcssvalueprivate.h b/gtk/gtkcssvalueprivate.h index d09b366c00..7a6a312fd3 100644 --- a/gtk/gtkcssvalueprivate.h +++ b/gtk/gtkcssvalueprivate.h @@ -37,7 +37,7 @@ typedef struct _GtkCssValueClass GtkCssValueClass; /* using define instead of struct here so compilers get the packing right */ #define GTK_CSS_VALUE_BASE \ const GtkCssValueClass *class; \ - gint ref_count; \ + int ref_count; \ guint is_computed: 1; struct _GtkCssValueClass { diff --git a/gtk/gtkcustompaperunixdialog.c b/gtk/gtkcustompaperunixdialog.c index 75e471689c..988cdac8cb 100644 --- a/gtk/gtkcustompaperunixdialog.c +++ b/gtk/gtkcustompaperunixdialog.c @@ -245,7 +245,7 @@ gtk_print_save_custom_papers (GListStore *store) GKeyFile *keyfile; gchar *filename, *data, *parentdir; gsize len; - gint i = 0; + int i = 0; keyfile = g_key_file_new (); @@ -618,7 +618,7 @@ add_custom_paper (GtkCustomPaperUnixDialog *dialog) GtkPageSetup *page_setup; GtkPaperSize *paper_size; gchar *name; - gint i; + int i; i = 1; name = NULL; diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 84b8e45503..44d7c2dfe1 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -169,7 +169,7 @@ typedef struct GtkWidget *action_box; GtkSizeGroup *size_group; - gint use_header_bar; + int use_header_bar; gboolean constructed; ResponseData *action_widgets; } GtkDialogPrivate; @@ -179,7 +179,7 @@ struct _ResponseData ResponseData *next; GtkDialog *dialog; GtkWidget *widget; - gint response_id; + int response_id; }; static void gtk_dialog_add_buttons_valist (GtkDialog *dialog, @@ -233,7 +233,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkDialog, gtk_dialog, GTK_TYPE_WINDOW, static void set_use_header_bar (GtkDialog *dialog, - gint use_header_bar) + int use_header_bar) { GtkDialogPrivate *priv = gtk_dialog_get_instance_private (dialog); @@ -300,7 +300,7 @@ gtk_dialog_get_property (GObject *object, static void action_widget_activated (GtkWidget *widget, GtkDialog *dialog) { - gint response_id; + int response_id; response_id = gtk_dialog_get_response_for_widget (dialog, widget); @@ -310,7 +310,7 @@ action_widget_activated (GtkWidget *widget, GtkDialog *dialog) static void add_response_data (GtkDialog *dialog, GtkWidget *child, - gint response_id) + int response_id) { ResponseData *ad; guint signal_id; @@ -338,7 +338,7 @@ add_response_data (GtkDialog *dialog, static void add_to_header_bar (GtkDialog *dialog, GtkWidget *child, - gint response_id) + int response_id) { GtkDialogPrivate *priv = gtk_dialog_get_instance_private (dialog); @@ -358,7 +358,7 @@ add_to_header_bar (GtkDialog *dialog, static void apply_response_for_action_area (GtkDialog *dialog, GtkWidget *child, - gint response_id) + int response_id) { GtkDialogPrivate *priv = gtk_dialog_get_instance_private (dialog); @@ -368,7 +368,7 @@ apply_response_for_action_area (GtkDialog *dialog, static void add_to_action_area (GtkDialog *dialog, GtkWidget *child, - gint response_id) + int response_id) { GtkDialogPrivate *priv = gtk_dialog_get_instance_private (dialog); @@ -419,7 +419,7 @@ gtk_dialog_constructed (GObject *object) { gboolean has_default; ResponseData *rd; - gint response_id; + int response_id; child = l->data; @@ -832,7 +832,7 @@ get_response_data (GtkDialog *dialog, void gtk_dialog_add_action_widget (GtkDialog *dialog, GtkWidget *child, - gint response_id) + int response_id) { GtkDialogPrivate *priv = gtk_dialog_get_instance_private (dialog); @@ -872,7 +872,7 @@ gtk_dialog_add_action_widget (GtkDialog *dialog, GtkWidget* gtk_dialog_add_button (GtkDialog *dialog, const gchar *button_text, - gint response_id) + int response_id) { GtkWidget *button; @@ -893,7 +893,7 @@ gtk_dialog_add_buttons_valist (GtkDialog *dialog, va_list args) { const gchar* text; - gint response_id; + int response_id; g_return_if_fail (GTK_IS_DIALOG (dialog)); @@ -901,7 +901,7 @@ gtk_dialog_add_buttons_valist (GtkDialog *dialog, return; text = first_button_text; - response_id = va_arg (args, gint); + response_id = va_arg (args, int); while (text != NULL) { @@ -953,7 +953,7 @@ gtk_dialog_add_buttons (GtkDialog *dialog, **/ void gtk_dialog_set_response_sensitive (GtkDialog *dialog, - gint response_id, + int response_id, gboolean setting) { GtkDialogPrivate *priv = gtk_dialog_get_instance_private (dialog); @@ -979,7 +979,7 @@ gtk_dialog_set_response_sensitive (GtkDialog *dialog, **/ void gtk_dialog_set_default_response (GtkDialog *dialog, - gint response_id) + int response_id) { GtkDialogPrivate *priv = gtk_dialog_get_instance_private (dialog); ResponseData *rd; @@ -1007,7 +1007,7 @@ gtk_dialog_set_default_response (GtkDialog *dialog, **/ void gtk_dialog_response (GtkDialog *dialog, - gint response_id) + int response_id) { g_return_if_fail (GTK_IS_DIALOG (dialog)); @@ -1030,7 +1030,7 @@ gtk_dialog_response (GtkDialog *dialog, */ GtkWidget* gtk_dialog_get_widget_for_response (GtkDialog *dialog, - gint response_id) + int response_id) { GtkDialogPrivate *priv = gtk_dialog_get_instance_private (dialog); ResponseData *rd; @@ -1057,7 +1057,7 @@ gtk_dialog_get_widget_for_response (GtkDialog *dialog, * Returns: the response id of @widget, or %GTK_RESPONSE_NONE * if @widget doesn’t have a response id set. */ -gint +int gtk_dialog_get_response_for_widget (GtkDialog *dialog, GtkWidget *widget) { @@ -1072,23 +1072,23 @@ gtk_dialog_get_response_for_widget (GtkDialog *dialog, typedef struct { gchar *widget_name; - gint response_id; + int response_id; gboolean is_default; - gint line; - gint col; + int line; + int col; } ActionWidgetInfo; typedef struct { GtkDialog *dialog; GtkBuilder *builder; GSList *items; - gint response_id; + int response_id; gboolean is_default; gboolean is_text; GString *string; gboolean in_action_widgets; - gint line; - gint col; + int line; + int col; } SubParserData; static void diff --git a/gtk/gtkdialog.h b/gtk/gtkdialog.h index b653017661..e5ffc1a90e 100644 --- a/gtk/gtkdialog.h +++ b/gtk/gtkdialog.h @@ -120,7 +120,7 @@ struct _GtkDialogClass /*< public >*/ - void (* response) (GtkDialog *dialog, gint response_id); + void (* response) (GtkDialog *dialog, int response_id); /* Keybinding signals */ @@ -147,11 +147,11 @@ GtkWidget* gtk_dialog_new_with_buttons (const gchar *title, GDK_AVAILABLE_IN_ALL void gtk_dialog_add_action_widget (GtkDialog *dialog, GtkWidget *child, - gint response_id); + int response_id); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_dialog_add_button (GtkDialog *dialog, const gchar *button_text, - gint response_id); + int response_id); GDK_AVAILABLE_IN_ALL void gtk_dialog_add_buttons (GtkDialog *dialog, const gchar *first_button_text, @@ -159,22 +159,22 @@ void gtk_dialog_add_buttons (GtkDialog *dialog, GDK_AVAILABLE_IN_ALL void gtk_dialog_set_response_sensitive (GtkDialog *dialog, - gint response_id, + int response_id, gboolean setting); GDK_AVAILABLE_IN_ALL void gtk_dialog_set_default_response (GtkDialog *dialog, - gint response_id); + int response_id); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_dialog_get_widget_for_response (GtkDialog *dialog, - gint response_id); + int response_id); GDK_AVAILABLE_IN_ALL -gint gtk_dialog_get_response_for_widget (GtkDialog *dialog, +int gtk_dialog_get_response_for_widget (GtkDialog *dialog, GtkWidget *widget); /* Emit response signal */ GDK_AVAILABLE_IN_ALL void gtk_dialog_response (GtkDialog *dialog, - gint response_id); + int response_id); GDK_AVAILABLE_IN_ALL GtkWidget * gtk_dialog_get_content_area (GtkDialog *dialog); diff --git a/gtk/gtkdragsource.c b/gtk/gtkdragsource.c index cffd44cf5d..73787607f4 100644 --- a/gtk/gtkdragsource.c +++ b/gtk/gtkdragsource.c @@ -736,7 +736,7 @@ gtk_drag_check_threshold (GtkWidget *widget, int current_x, int current_y) { - gint drag_threshold; + int drag_threshold; g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 77d4241121..dbf69b834a 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -288,8 +288,8 @@ static void gtk_entry_size_allocate (GtkWidget *widget, static void gtk_entry_snapshot (GtkWidget *widget, GtkSnapshot *snapshot); static gboolean gtk_entry_query_tooltip (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip); static void gtk_entry_direction_changed (GtkWidget *widget, @@ -1407,7 +1407,7 @@ gtk_entry_finalize (GObject *object) GtkEntry *entry = GTK_ENTRY (object); GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); EntryIconInfo *icon_info = NULL; - gint i; + int i; for (i = 0; i < MAX_ICONS; i++) { @@ -1503,7 +1503,7 @@ get_icon_position_from_controller (GtkEntry *entry, static void icon_pressed_cb (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkEntry *entry) @@ -1523,7 +1523,7 @@ icon_pressed_cb (GtkGestureClick *gesture, static void icon_released_cb (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkEntry *entry) @@ -1682,7 +1682,7 @@ gtk_entry_size_allocate (GtkWidget *widget, const gboolean is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL; GtkEntry *entry = GTK_ENTRY (widget); GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); - gint i; + int i; GtkAllocation text_alloc; text_alloc.x = 0; @@ -2193,7 +2193,7 @@ gtk_entry_get_overwrite_mode (GtkEntry *entry) **/ void gtk_entry_set_max_length (GtkEntry *entry, - gint max) + int max) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); @@ -2215,7 +2215,7 @@ gtk_entry_set_max_length (GtkEntry *entry, * Returns: the maximum allowed number of characters * in #GtkEntry, or 0 if there is no maximum. **/ -gint +int gtk_entry_get_max_length (GtkEntry *entry) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); @@ -2784,10 +2784,10 @@ gtk_entry_get_icon_storage_type (GtkEntry *entry, * * Returns: the index of the icon at the given position, or -1 */ -gint +int gtk_entry_get_icon_at_pos (GtkEntry *entry, - gint x, - gint y) + int x, + int y) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); guint i; @@ -2865,12 +2865,12 @@ gtk_entry_set_icon_drag_source (GtkEntry *entry, * Returns: index of the icon which is the source of the current * DND operation, or -1. */ -gint +int gtk_entry_get_current_icon_drag_source (GtkEntry *entry) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); EntryIconInfo *icon_info = NULL; - gint i; + int i; g_return_val_if_fail (GTK_IS_ENTRY (entry), -1); @@ -3123,15 +3123,15 @@ gtk_entry_set_icon_tooltip_markup (GtkEntry *entry, static gboolean gtk_entry_query_tooltip (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip) { GtkEntry *entry = GTK_ENTRY (widget); GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); EntryIconInfo *icon_info; - gint icon_pos; + int icon_pos; if (!keyboard_tip) { diff --git a/gtk/gtkentry.h b/gtk/gtkentry.h index 06ae90d818..4f5b529a18 100644 --- a/gtk/gtkentry.h +++ b/gtk/gtkentry.h @@ -139,9 +139,9 @@ gboolean gtk_entry_get_overwrite_mode (GtkEntry *entry); /* text is truncated if needed */ GDK_AVAILABLE_IN_ALL void gtk_entry_set_max_length (GtkEntry *entry, - gint max); + int max); GDK_AVAILABLE_IN_ALL -gint gtk_entry_get_max_length (GtkEntry *entry); +int gtk_entry_get_max_length (GtkEntry *entry); GDK_AVAILABLE_IN_ALL guint16 gtk_entry_get_text_length (GtkEntry *entry); @@ -225,9 +225,9 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_entry_get_icon_sensitive (GtkEntry *entry, GtkEntryIconPosition icon_pos); GDK_AVAILABLE_IN_ALL -gint gtk_entry_get_icon_at_pos (GtkEntry *entry, - gint x, - gint y); +int gtk_entry_get_icon_at_pos (GtkEntry *entry, + int x, + int y); GDK_AVAILABLE_IN_ALL void gtk_entry_set_icon_tooltip_text (GtkEntry *entry, GtkEntryIconPosition icon_pos, @@ -248,7 +248,7 @@ void gtk_entry_set_icon_drag_source (GtkEntry * GdkContentProvider *provider, GdkDragAction actions); GDK_AVAILABLE_IN_ALL -gint gtk_entry_get_current_icon_drag_source (GtkEntry *entry); +int gtk_entry_get_current_icon_drag_source (GtkEntry *entry); GDK_AVAILABLE_IN_ALL void gtk_entry_get_icon_area (GtkEntry *entry, GtkEntryIconPosition icon_pos, diff --git a/gtk/gtkentrybuffer.c b/gtk/gtkentrybuffer.c index de365ff6a5..00158e3a0c 100644 --- a/gtk/gtkentrybuffer.c +++ b/gtk/gtkentrybuffer.c @@ -75,7 +75,7 @@ struct _GtkEntryBufferPrivate gsize normal_text_bytes; guint normal_text_chars; - gint max_length; + int max_length; }; G_DEFINE_TYPE_WITH_PRIVATE (GtkEntryBuffer, gtk_entry_buffer, G_TYPE_OBJECT) @@ -437,7 +437,7 @@ gtk_entry_buffer_class_init (GtkEntryBufferClass *klass) **/ GtkEntryBuffer* gtk_entry_buffer_new (const gchar *initial_chars, - gint n_initial_chars) + int n_initial_chars) { GtkEntryBuffer *buffer = g_object_new (GTK_TYPE_ENTRY_BUFFER, NULL); if (initial_chars) @@ -533,7 +533,7 @@ gtk_entry_buffer_get_text (GtkEntryBuffer *buffer) void gtk_entry_buffer_set_text (GtkEntryBuffer *buffer, const gchar *chars, - gint n_chars) + int n_chars) { g_return_if_fail (GTK_IS_ENTRY_BUFFER (buffer)); g_return_if_fail (chars != NULL); @@ -557,7 +557,7 @@ gtk_entry_buffer_set_text (GtkEntryBuffer *buffer, **/ void gtk_entry_buffer_set_max_length (GtkEntryBuffer *buffer, - gint max_length) + int max_length) { GtkEntryBufferPrivate *priv = gtk_entry_buffer_get_instance_private (buffer); @@ -585,7 +585,7 @@ gtk_entry_buffer_set_max_length (GtkEntryBuffer *buffer, * Returns: the maximum allowed number of characters * in #GtkEntryBuffer, or 0 if there is no maximum. */ -gint +int gtk_entry_buffer_get_max_length (GtkEntryBuffer *buffer) { GtkEntryBufferPrivate *priv = gtk_entry_buffer_get_instance_private (buffer); @@ -618,7 +618,7 @@ guint gtk_entry_buffer_insert_text (GtkEntryBuffer *buffer, guint position, const gchar *chars, - gint n_chars) + int n_chars) { GtkEntryBufferPrivate *pv = gtk_entry_buffer_get_instance_private (buffer); GtkEntryBufferClass *klass; @@ -673,7 +673,7 @@ gtk_entry_buffer_insert_text (GtkEntryBuffer *buffer, guint gtk_entry_buffer_delete_text (GtkEntryBuffer *buffer, guint position, - gint n_chars) + int n_chars) { GtkEntryBufferClass *klass; guint length; diff --git a/gtk/gtkentrybuffer.h b/gtk/gtkentrybuffer.h index ce270d18a8..8c7a91b984 100644 --- a/gtk/gtkentrybuffer.h +++ b/gtk/gtkentrybuffer.h @@ -92,7 +92,7 @@ GType gtk_entry_buffer_get_type (void) G_GNUC_ GDK_AVAILABLE_IN_ALL GtkEntryBuffer* gtk_entry_buffer_new (const gchar *initial_chars, - gint n_initial_chars); + int n_initial_chars); GDK_AVAILABLE_IN_ALL gsize gtk_entry_buffer_get_bytes (GtkEntryBuffer *buffer); @@ -106,25 +106,25 @@ const gchar* gtk_entry_buffer_get_text (GtkEntryBuffe GDK_AVAILABLE_IN_ALL void gtk_entry_buffer_set_text (GtkEntryBuffer *buffer, const gchar *chars, - gint n_chars); + int n_chars); GDK_AVAILABLE_IN_ALL void gtk_entry_buffer_set_max_length (GtkEntryBuffer *buffer, - gint max_length); + int max_length); GDK_AVAILABLE_IN_ALL -gint gtk_entry_buffer_get_max_length (GtkEntryBuffer *buffer); +int gtk_entry_buffer_get_max_length (GtkEntryBuffer *buffer); GDK_AVAILABLE_IN_ALL guint gtk_entry_buffer_insert_text (GtkEntryBuffer *buffer, guint position, const gchar *chars, - gint n_chars); + int n_chars); GDK_AVAILABLE_IN_ALL guint gtk_entry_buffer_delete_text (GtkEntryBuffer *buffer, guint position, - gint n_chars); + int n_chars); GDK_AVAILABLE_IN_ALL void gtk_entry_buffer_emit_inserted_text (GtkEntryBuffer *buffer, diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index 09a43778b2..81d492c510 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -973,7 +973,7 @@ gtk_entry_completion_set_match_func (GtkEntryCompletion *completion, */ void gtk_entry_completion_set_minimum_key_length (GtkEntryCompletion *completion, - gint length) + int length) { g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion)); g_return_if_fail (length >= 0); @@ -995,7 +995,7 @@ gtk_entry_completion_set_minimum_key_length (GtkEntryCompletion *completion, * * Returns: The currently used minimum key length */ -gint +int gtk_entry_completion_get_minimum_key_length (GtkEntryCompletion *completion) { g_return_val_if_fail (GTK_IS_ENTRY_COMPLETION (completion), 0); @@ -1056,7 +1056,7 @@ gtk_entry_completion_complete (GtkEntryCompletion *completion) */ void gtk_entry_completion_set_text_column (GtkEntryCompletion *completion, - gint column) + int column) { GtkCellRenderer *cell; @@ -1086,7 +1086,7 @@ gtk_entry_completion_set_text_column (GtkEntryCompletion *completion, * * Returns: the column containing the strings */ -gint +int gtk_entry_completion_get_text_column (GtkEntryCompletion *completion) { g_return_val_if_fail (GTK_IS_ENTRY_COMPLETION (completion), -1); @@ -1101,12 +1101,12 @@ void _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion) { GtkAllocation allocation; - gint matches, items, height; + int matches, items, height; GdkSurface *surface; GtkRequisition entry_req; GtkRequisition tree_req; GtkTreePath *path; - gint width; + int width; surface = gtk_native_get_surface (gtk_widget_get_native (completion->entry)); @@ -1303,8 +1303,8 @@ gtk_entry_completion_real_insert_prefix (GtkEntryCompletion *completion, { if (prefix) { - gint key_len; - gint prefix_len; + int key_len; + int prefix_len; const gchar *key; prefix_len = g_utf8_strlen (prefix, -1); @@ -1314,7 +1314,7 @@ gtk_entry_completion_real_insert_prefix (GtkEntryCompletion *completion, if (prefix_len > key_len) { - gint pos = prefix_len; + int pos = prefix_len; gtk_editable_insert_text (GTK_EDITABLE (completion->entry), prefix + strlen (key), -1, &pos); @@ -1349,7 +1349,7 @@ static void gtk_entry_completion_insert_completion_text (GtkEntryCompletion *completion, const gchar *new_text) { - gint len; + int len; GtkText *text = gtk_entry_get_text_widget (GTK_ENTRY (completion->entry)); GtkEntryBuffer *buffer = gtk_text_get_buffer (text); @@ -1632,7 +1632,7 @@ gtk_entry_completion_get_inline_selection (GtkEntryCompletion *completion) } -static gint +static int gtk_entry_completion_timeout (gpointer data) { GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (data); @@ -1643,7 +1643,7 @@ gtk_entry_completion_timeout (gpointer data) g_utf8_strlen (gtk_editable_get_text (GTK_EDITABLE (completion->entry)), -1) >= completion->minimum_key_length) { - gint matches; + int matches; gboolean popup_single; gtk_entry_completion_complete (completion); @@ -1691,7 +1691,7 @@ gtk_entry_completion_key_pressed (GtkEventControllerKey *controller, GdkModifierType state, gpointer user_data) { - gint matches; + int matches; GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data); GtkWidget *widget = completion->entry; GtkText *text = gtk_entry_get_text_widget (GTK_ENTRY (widget)); diff --git a/gtk/gtkentrycompletion.h b/gtk/gtkentrycompletion.h index 6fd623edd9..4d98c8347e 100644 --- a/gtk/gtkentrycompletion.h +++ b/gtk/gtkentrycompletion.h @@ -83,9 +83,9 @@ void gtk_entry_completion_set_match_func (GtkEntryComplet GDestroyNotify func_notify); GDK_AVAILABLE_IN_ALL void gtk_entry_completion_set_minimum_key_length (GtkEntryCompletion *completion, - gint length); + int length); GDK_AVAILABLE_IN_ALL -gint gtk_entry_completion_get_minimum_key_length (GtkEntryCompletion *completion); +int gtk_entry_completion_get_minimum_key_length (GtkEntryCompletion *completion); GDK_AVAILABLE_IN_ALL gchar * gtk_entry_completion_compute_prefix (GtkEntryCompletion *completion, const char *key); @@ -125,9 +125,9 @@ const gchar *gtk_entry_completion_get_completion_prefix (GtkEntryComplet /* convenience */ GDK_AVAILABLE_IN_ALL void gtk_entry_completion_set_text_column (GtkEntryCompletion *completion, - gint column); + int column); GDK_AVAILABLE_IN_ALL -gint gtk_entry_completion_get_text_column (GtkEntryCompletion *completion); +int gtk_entry_completion_get_text_column (GtkEntryCompletion *completion); G_END_DECLS diff --git a/gtk/gtkentryprivate.h b/gtk/gtkentryprivate.h index a04b63e288..eaafce354e 100644 --- a/gtk/gtkentryprivate.h +++ b/gtk/gtkentryprivate.h @@ -47,8 +47,8 @@ struct _GtkEntryCompletion gpointer match_data; GDestroyNotify match_notify; - gint minimum_key_length; - gint text_column; + int minimum_key_length; + int text_column; gchar *case_normalized_key; @@ -63,7 +63,7 @@ struct _GtkEntryCompletion gulong changed_id; gulong insert_text_id; - gint current_selected; + int current_selected; guint first_sel_changed : 1; guint has_completion : 1; @@ -87,7 +87,7 @@ struct _GtkEntryCompletionClass GtkTreeModel *model, GtkTreeIter *iter); void (* action_activated) (GtkEntryCompletion *completion, - gint index_); + int index_); gboolean (* insert_prefix) (GtkEntryCompletion *completion, const gchar *prefix); gboolean (* cursor_on_match) (GtkEntryCompletion *completion, diff --git a/gtk/gtkeventcontrollerscroll.c b/gtk/gtkeventcontrollerscroll.c index 2cee4be4b8..5f4084a38f 100644 --- a/gtk/gtkeventcontrollerscroll.c +++ b/gtk/gtkeventcontrollerscroll.c @@ -279,7 +279,7 @@ gtk_event_controller_scroll_handle_event (GtkEventController *controller, if (scroll->flags & GTK_EVENT_CONTROLLER_SCROLL_DISCRETE) { - gint steps; + int steps; scroll->cur_dx += dx; scroll->cur_dy += dy; diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c index 0ceff8679b..b20ea03ce8 100644 --- a/gtk/gtkexpander.c +++ b/gtk/gtkexpander.c @@ -211,7 +211,7 @@ static void gtk_expander_measure (GtkWidget *widget, /* Gestures */ static void gesture_click_released_cb (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkExpander *expander); @@ -565,7 +565,7 @@ gtk_expander_size_allocate (GtkWidget *widget, static void gesture_click_released_cb (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkExpander *expander) diff --git a/gtk/gtkexpression.c b/gtk/gtkexpression.c index 39548eccf3..58f8fd590f 100644 --- a/gtk/gtkexpression.c +++ b/gtk/gtkexpression.c @@ -476,7 +476,7 @@ param_expression_validate (GParamSpec *pspec, return changed; } -static gint +static int param_expression_values_cmp (GParamSpec *pspec, const GValue *value1, const GValue *value2) diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index 1ffa9807e7..4078a2d720 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -279,7 +279,7 @@ static void set_info_for_file_at_iter (GtkFileChooserButton *bu GFile *file, GtkTreeIter *iter); -static gint model_get_type_position (GtkFileChooserButton *button, +static int model_get_type_position (GtkFileChooserButton *button, RowType row_type); static void model_free_row_data (GtkFileChooserButton *button, GtkTreeIter *iter); @@ -292,8 +292,8 @@ static void model_add_bookmarks (GtkFileChooserButton *button, static void model_update_current_folder (GtkFileChooserButton *button, GFile *file); static void model_remove_rows (GtkFileChooserButton *button, - gint pos, - gint n_rows); + int pos, + int n_rows); static gboolean filter_model_visible_func (GtkTreeModel *model, GtkTreeIter *iter, @@ -321,10 +321,10 @@ static void button_clicked_cb (GtkButton *real_button, gpointer user_data); static void dialog_response_cb (GtkDialog *dialog, - gint response, + int response, gpointer user_data); static void native_response_cb (GtkFileChooserNative *native, - gint response, + int response, gpointer user_data); static void volumes_changed (GVolumeMonitor *volume_monitor, gpointer volume, @@ -793,7 +793,7 @@ gtk_file_chooser_button_add_shortcut_folder (GtkFileChooser *chooser, { GtkFileChooserButton *button = GTK_FILE_CHOOSER_BUTTON (chooser); GtkTreeIter iter; - gint pos; + int pos; pos = model_get_type_position (button, ROW_TYPE_SHORTCUT); pos += button->n_shortcuts; @@ -832,7 +832,7 @@ gtk_file_chooser_button_remove_shortcut_folder (GtkFileChooser *chooser, { GtkFileChooserButton *button = GTK_FILE_CHOOSER_BUTTON (chooser); GtkTreeIter iter; - gint pos; + int pos; gchar type; pos = model_get_type_position (button, ROW_TYPE_SHORTCUT); @@ -1240,7 +1240,7 @@ change_icon_theme_get_info_cb (GObject *source, icon = _gtk_file_info_get_icon (info, ICON_SIZE, gtk_widget_get_scale_factor (GTK_WIDGET (data->button))); if (icon) { - gint width = 0; + int width = 0; GtkTreeIter iter; GtkTreePath *path; @@ -1276,7 +1276,7 @@ static void change_icon_theme (GtkFileChooserButton *button) { GtkTreeIter iter; - gint width = 0; + int width = 0; g_slist_free_full (button->change_icon_theme_cancellables, (GDestroyNotify)g_cancellable_cancel); button->change_icon_theme_cancellables = NULL; @@ -1490,11 +1490,11 @@ set_info_for_file_at_iter (GtkFileChooserButton *button, } /* Shortcuts Model */ -static gint +static int model_get_type_position (GtkFileChooserButton *button, RowType row_type) { - gint retval = 0; + int retval = 0; if (row_type == ROW_TYPE_SPECIAL) return retval; @@ -1649,7 +1649,7 @@ model_add_special (GtkFileChooserButton *button) GtkListStore *store; GtkTreeIter iter; GFile *file; - gint pos; + int pos; store = GTK_LIST_STORE (button->model); pos = model_get_type_position (button, ROW_TYPE_SPECIAL); @@ -1743,7 +1743,7 @@ model_add_volumes (GtkFileChooserButton *button, GSList *volumes) { GtkListStore *store; - gint pos; + int pos; GSList *l; if (!volumes) @@ -1804,7 +1804,7 @@ model_add_bookmarks (GtkFileChooserButton *button, { GtkListStore *store; GtkTreeIter iter; - gint pos; + int pos; GSList *l; if (!bookmarks) @@ -1888,7 +1888,7 @@ model_update_current_folder (GtkFileChooserButton *button, { GtkListStore *store; GtkTreeIter iter; - gint pos; + int pos; if (!file) return; @@ -1970,7 +1970,7 @@ model_add_other (GtkFileChooserButton *button) { GtkListStore *store; GtkTreeIter iter; - gint pos; + int pos; GIcon *icon; store = GTK_LIST_STORE (button->model); @@ -2002,8 +2002,8 @@ model_add_other (GtkFileChooserButton *button) static void model_remove_rows (GtkFileChooserButton *button, - gint pos, - gint n_rows) + int pos, + int n_rows) { GtkListStore *store; @@ -2188,7 +2188,7 @@ update_combo_box (GtkFileChooserButton *button) if (!row_found) { - gint pos; + int pos; /* If it hasn't been found already, update & select the current-folder row. */ if (file) @@ -2716,7 +2716,7 @@ button_clicked_cb (GtkButton *real_button, static void common_response_cb (GtkFileChooserButton *button, - gint response) + int response) { if (response == GTK_RESPONSE_ACCEPT || response == GTK_RESPONSE_OK) @@ -2740,7 +2740,7 @@ common_response_cb (GtkFileChooserButton *button, static void dialog_response_cb (GtkDialog *dialog, - gint response, + int response, gpointer user_data) { GtkFileChooserButton *button = GTK_FILE_CHOOSER_BUTTON (user_data); @@ -2756,7 +2756,7 @@ dialog_response_cb (GtkDialog *dialog, static void native_response_cb (GtkFileChooserNative *native, - gint response, + int response, gpointer user_data) { GtkFileChooserButton *button = GTK_FILE_CHOOSER_BUTTON (user_data); @@ -2872,7 +2872,7 @@ gtk_file_chooser_button_get_title (GtkFileChooserButton *button) * * Returns: an integer width (in characters) that the button will use to size itself. */ -gint +int gtk_file_chooser_button_get_width_chars (GtkFileChooserButton *button) { g_return_val_if_fail (GTK_IS_FILE_CHOOSER_BUTTON (button), -1); @@ -2889,7 +2889,7 @@ gtk_file_chooser_button_get_width_chars (GtkFileChooserButton *button) */ void gtk_file_chooser_button_set_width_chars (GtkFileChooserButton *button, - gint n_chars) + int n_chars) { g_return_if_fail (GTK_IS_FILE_CHOOSER_BUTTON (button)); diff --git a/gtk/gtkfilechooserbutton.h b/gtk/gtkfilechooserbutton.h index b17ca5956a..ecd3bbd5be 100644 --- a/gtk/gtkfilechooserbutton.h +++ b/gtk/gtkfilechooserbutton.h @@ -47,10 +47,10 @@ GDK_AVAILABLE_IN_ALL void gtk_file_chooser_button_set_title (GtkFileChooserButton *button, const gchar *title); GDK_AVAILABLE_IN_ALL -gint gtk_file_chooser_button_get_width_chars (GtkFileChooserButton *button); +int gtk_file_chooser_button_get_width_chars (GtkFileChooserButton *button); GDK_AVAILABLE_IN_ALL void gtk_file_chooser_button_set_width_chars (GtkFileChooserButton *button, - gint n_chars); + int n_chars); GDK_AVAILABLE_IN_ALL gboolean gtk_file_chooser_button_get_modal (GtkFileChooserButton *button); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c index f7a16057cc..e77d8a6b0d 100644 --- a/gtk/gtkfilechooserdialog.c +++ b/gtk/gtkfilechooserdialog.c @@ -268,7 +268,7 @@ static void gtk_file_chooser_dialog_activate_response (GtkWidget *wid GVariant *parameters); static void response_cb (GtkDialog *dialog, - gint response_id); + int response_id); static void setup_save_entry (GtkFileChooserDialog *dialog); @@ -327,13 +327,13 @@ static GtkWidget * get_accept_action_widget (GtkDialog *dialog, gboolean sensitive_only) { - gint response[] = { + int response[] = { GTK_RESPONSE_ACCEPT, GTK_RESPONSE_OK, GTK_RESPONSE_YES, GTK_RESPONSE_APPLY }; - gint i; + int i; GtkWidget *widget; for (i = 0; i < G_N_ELEMENTS (response); i++) @@ -353,7 +353,7 @@ get_accept_action_widget (GtkDialog *dialog, } static gboolean -is_accept_response_id (gint response_id) +is_accept_response_id (int response_id) { return (response_id == GTK_RESPONSE_ACCEPT || response_id == GTK_RESPONSE_OK || @@ -588,7 +588,7 @@ gtk_file_chooser_dialog_realize (GtkWidget *widget) { GtkFileChooserDialog *dialog = GTK_FILE_CHOOSER_DIALOG (widget); GSettings *settings; - gint width, height; + int width, height; settings = _gtk_file_chooser_get_settings_for_widget (widget); g_settings_get (settings, SETTINGS_KEY_WINDOW_SIZE, "(ii)", &width, &height); @@ -666,7 +666,7 @@ gtk_file_chooser_dialog_size_allocate (GtkWidget *widget, */ static void response_cb (GtkDialog *dialog, - gint response_id) + int response_id) { GtkFileChooserDialogPrivate *priv = gtk_file_chooser_dialog_get_instance_private (GTK_FILE_CHOOSER_DIALOG (dialog)); @@ -690,7 +690,7 @@ gtk_file_chooser_dialog_new_valist (const gchar *title, { GtkWidget *result; const char *button_text = first_button_text; - gint response_id; + int response_id; result = g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG, "title", title, @@ -702,7 +702,7 @@ gtk_file_chooser_dialog_new_valist (const gchar *title, while (button_text) { - response_id = va_arg (varargs, gint); + response_id = va_arg (varargs, int); gtk_dialog_add_button (GTK_DIALOG (result), button_text, response_id); button_text = va_arg (varargs, const gchar *); } diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c index 97e36f0994..b399b96888 100644 --- a/gtk/gtkfilechooserentry.c +++ b/gtk/gtkfilechooserentry.c @@ -92,14 +92,14 @@ static gboolean gtk_file_chooser_entry_tab_handler (GtkEventControllerKey *ke GtkFileChooserEntry *chooser_entry); #ifdef G_OS_WIN32 -static gint insert_text_callback (GtkFileChooserEntry *widget, +static int insert_text_callback (GtkFileChooserEntry *widget, const gchar *new_text, - gint new_text_length, - gint *position, + int new_text_length, + int *position, gpointer user_data); static void delete_text_callback (GtkFileChooserEntry *widget, - gint start_pos, - gint end_pos, + int start_pos, + int end_pos, gpointer user_data); #endif @@ -315,7 +315,7 @@ match_selected_callback (GtkEntryCompletion *completion, GtkFileChooserEntry *chooser_entry) { char *path; - gint pos; + int pos; gtk_tree_model_get (model, iter, FULL_PATH_COLUMN, &path, @@ -480,7 +480,7 @@ gtk_file_chooser_entry_tab_handler (GtkEventControllerKey *key, GtkFileChooserEntry *chooser_entry) { GtkEditable *editable = GTK_EDITABLE (chooser_entry); - gint start, end; + int start, end; if (keyval == GDK_KEY_Escape && chooser_entry->eat_escape) @@ -730,15 +730,15 @@ refresh_current_folder_and_file_part (GtkFileChooserEntry *chooser_entry) } #ifdef G_OS_WIN32 -static gint +static int insert_text_callback (GtkFileChooserEntry *chooser_entry, const gchar *new_text, - gint new_text_length, - gint *position, + int new_text_length, + int *position, gpointer user_data) { const gchar *colon = memchr (new_text, ':', new_text_length); - gint i; + int i; /* Disallow these characters altogether */ for (i = 0; i < new_text_length; i++) @@ -773,8 +773,8 @@ insert_text_callback (GtkFileChooserEntry *chooser_entry, static void delete_text_callback (GtkFileChooserEntry *chooser_entry, - gint start_pos, - gint end_pos, + int start_pos, + int end_pos, gpointer user_data) { /* If deleting a drive letter, delete the colon, too */ @@ -1006,7 +1006,7 @@ _gtk_file_chooser_entry_select_filename (GtkFileChooserEntry *chooser_entry) len = g_utf8_pointer_to_offset (str, ext); } - gtk_editable_select_region (GTK_EDITABLE (chooser_entry), 0, (gint) len); + gtk_editable_select_region (GTK_EDITABLE (chooser_entry), 0, (int) len); } void diff --git a/gtk/gtkfilechoosernative.c b/gtk/gtkfilechoosernative.c index 6755eb90d7..8f9e98b9a7 100644 --- a/gtk/gtkfilechoosernative.c +++ b/gtk/gtkfilechoosernative.c @@ -548,7 +548,7 @@ gtk_file_chooser_native_new (const gchar *title, static void dialog_response_cb (GtkDialog *dialog, - gint response_id, + int response_id, gpointer data) { GtkFileChooserNative *self = data; diff --git a/gtk/gtkfilechoosernativequartz.c b/gtk/gtkfilechoosernativequartz.c index 847a461536..fe24b2dcac 100644 --- a/gtk/gtkfilechoosernativequartz.c +++ b/gtk/gtkfilechoosernativequartz.c @@ -125,7 +125,7 @@ chooser_get_files (FileChooserQuartzData *data) if (!data->save) { NSArray *urls; - gint i; + int i; urls = [(NSOpenPanel *)data->panel URLs]; diff --git a/gtk/gtkfilechoosernativewin32.c b/gtk/gtkfilechoosernativewin32.c index 7bb3e54b36..bd1ebb6c5b 100644 --- a/gtk/gtkfilechoosernativewin32.c +++ b/gtk/gtkfilechoosernativewin32.c @@ -350,7 +350,7 @@ filechooser_win32_thread_done (gpointer _data) for (l = self->choices; l; l = l->next) { GtkFileChooserNativeChoice *choice = (GtkFileChooserNativeChoice*) l->data; - gint sel = g_array_index (data->choices_selections, gint, + int sel = g_array_index (data->choices_selections, int, g_slist_position (self->choices, l)); if (sel >= 0) @@ -755,7 +755,7 @@ filechooser_win32_thread (gpointer _data) if (data->choices_selections) g_array_free (data->choices_selections, TRUE); - data->choices_selections = g_array_sized_new (FALSE, FALSE, sizeof(gint), + data->choices_selections = g_array_sized_new (FALSE, FALSE, sizeof(int), g_slist_length (data->self->choices)); hr = IFileDialog_QueryInterface (pfd, &IID_IFileDialogCustomize, (LPVOID *) &pfdc); @@ -767,7 +767,7 @@ filechooser_win32_thread (gpointer _data) { GtkFileChooserNativeChoice *choice = (GtkFileChooserNativeChoice*) l->data; DWORD dialog_item_id = (DWORD) g_slist_position (data->self->choices, l); - gint val = -1; + int val = -1; if (choice->options) { @@ -777,7 +777,7 @@ filechooser_win32_thread (gpointer _data) dialog_item_id, &dialog_sub_item_id); if (SUCCEEDED (hr)) - val = (gint) dialog_sub_item_id; + val = (int) dialog_sub_item_id; } else { diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 4c9360571e..a70938cf47 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -288,7 +288,7 @@ struct _GtkFileChooserWidget GtkWidget *toplevel_current_focus_widget; GtkWidget *toplevel_last_focus_widget; - gint sort_column; + int sort_column; GtkSortType sort_order; ClockFormat clock_format; @@ -464,7 +464,7 @@ static void down_folder_handler (GtkFileChooserWidget *impl); static void home_folder_handler (GtkFileChooserWidget *impl); static void desktop_folder_handler (GtkFileChooserWidget *impl); static void quick_bookmark_handler (GtkFileChooserWidget *impl, - gint bookmark_index); + int bookmark_index); static void show_hidden_handler (GtkFileChooserWidget *impl); static void search_shortcut_handler (GtkFileChooserWidget *impl); static void recent_shortcut_handler (GtkFileChooserWidget *impl); @@ -532,7 +532,7 @@ static void recent_clear_model (GtkFileChooserWidget *impl, gboolean remove_from_treeview); static gboolean recent_should_respond (GtkFileChooserWidget *impl); static void clear_model_cache (GtkFileChooserWidget *impl, - gint column); + int column); static void set_model_filter (GtkFileChooserWidget *impl, GtkFileFilter *filter); static void switch_to_home_dir (GtkFileChooserWidget *impl); @@ -1031,7 +1031,7 @@ selection_check_foreach_cb (GtkTreeModel *model, /* Checks whether the selected items in the file list are all files or all folders */ static void selection_check (GtkFileChooserWidget *impl, - gint *num_selected, + int *num_selected, gboolean *all_files, gboolean *all_folders) { @@ -1537,7 +1537,7 @@ change_sort_directories_first_state (GSimpleAction *action, static void clear_model_cache (GtkFileChooserWidget *impl, - gint column) + int column) { if (impl->browse_files_model) _gtk_file_system_model_clear_cache (impl->browse_files_model, column); @@ -1703,7 +1703,7 @@ file_list_drag_drop_cb (GtkDropTarget *dest, static void check_file_list_popover_sensitivity (GtkFileChooserWidget *impl) { - gint num_selected; + int num_selected; gboolean all_files; gboolean all_folders; gboolean active; @@ -2071,8 +2071,8 @@ long_press_cb (GtkGesture *gesture, typedef struct { OperationMode operation_mode; - gint general_column; - gint model_column; + int general_column; + int model_column; } ColumnMap; /* Sets the sort column IDs for the file list; needs to be done whenever we @@ -2093,8 +2093,8 @@ file_list_set_sort_column_ids (GtkFileChooserWidget *impl) static gboolean file_list_query_tooltip_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer user_data) @@ -2142,7 +2142,7 @@ file_list_query_tooltip_cb (GtkWidget *widget, static void set_icon_cell_renderer_fixed_size (GtkFileChooserWidget *impl) { - gint xpad, ypad; + int xpad, ypad; gtk_cell_renderer_get_padding (impl->list_pixbuf_renderer, &xpad, &ypad); gtk_cell_renderer_set_fixed_size (impl->list_pixbuf_renderer, @@ -2154,13 +2154,13 @@ static GtkWidget * get_accept_action_widget (GtkDialog *dialog, gboolean sensitive_only) { - gint response[] = { + int response[] = { GTK_RESPONSE_ACCEPT, GTK_RESPONSE_OK, GTK_RESPONSE_YES, GTK_RESPONSE_APPLY }; - gint i; + int i; GtkWidget *widget; for (i = 0; i < G_N_ELEMENTS (response); i++) @@ -3254,10 +3254,10 @@ settings_load (GtkFileChooserWidget *impl) gboolean sort_directories_first; DateFormat date_format; TypeFormat type_format; - gint sort_column; + int sort_column; GtkSortType sort_order; StartupMode startup_mode; - gint sidebar_width; + int sidebar_width; GSettings *settings; settings = _gtk_file_chooser_get_settings_for_widget (GTK_WIDGET (impl)); @@ -3504,7 +3504,7 @@ gtk_file_chooser_widget_unmap (GtkWidget *widget) GTK_WIDGET_CLASS (gtk_file_chooser_widget_parent_class)->unmap (widget); } -static gint +static int compare_directory (GtkFileSystemModel *model, GtkTreeIter *a, GtkTreeIter *b, @@ -3521,14 +3521,14 @@ compare_directory (GtkFileSystemModel *model, return 0; } -static gint +static int compare_name (GtkFileSystemModel *model, GtkTreeIter *a, GtkTreeIter *b, GtkFileChooserWidget *impl) { const char *key_a, *key_b; - gint result; + int result; key_a = g_value_get_string (_gtk_file_system_model_get_value (model, a, MODEL_COL_NAME_COLLATED)); key_b = g_value_get_string (_gtk_file_system_model_get_value (model, b, MODEL_COL_NAME_COLLATED)); @@ -3545,7 +3545,7 @@ compare_name (GtkFileSystemModel *model, return result; } -static gint +static int compare_size (GtkFileSystemModel *model, GtkTreeIter *a, GtkTreeIter *b, @@ -3559,7 +3559,7 @@ compare_size (GtkFileSystemModel *model, return size_a < size_b ? -1 : (size_a == size_b ? 0 : 1); } -static gint +static int compare_type (GtkFileSystemModel *model, GtkTreeIter *a, GtkTreeIter *b, @@ -3573,7 +3573,7 @@ compare_type (GtkFileSystemModel *model, return g_strcmp0 (key_a, key_b); } -static gint +static int compare_time (GtkFileSystemModel *model, GtkTreeIter *a, GtkTreeIter *b, @@ -3587,7 +3587,7 @@ compare_time (GtkFileSystemModel *model, return ta < tb ? -1 : (ta == tb ? 0 : 1); } -static gint +static int compare_location (GtkFileSystemModel *model, GtkTreeIter *a, GtkTreeIter *b, @@ -3602,7 +3602,7 @@ compare_location (GtkFileSystemModel *model, } /* Sort callback for the filename column */ -static gint +static int name_sort_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, @@ -3610,7 +3610,7 @@ name_sort_func (GtkTreeModel *model, { GtkFileSystemModel *fs_model = GTK_FILE_SYSTEM_MODEL (model); GtkFileChooserWidget *impl = user_data; - gint result; + int result; result = compare_directory (fs_model, a, b, impl); @@ -3621,7 +3621,7 @@ name_sort_func (GtkTreeModel *model, } /* Sort callback for the size column */ -static gint +static int size_sort_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, @@ -3629,7 +3629,7 @@ size_sort_func (GtkTreeModel *model, { GtkFileSystemModel *fs_model = GTK_FILE_SYSTEM_MODEL (model); GtkFileChooserWidget *impl = user_data; - gint result; + int result; result = compare_directory (fs_model, a, b, impl); @@ -3640,7 +3640,7 @@ size_sort_func (GtkTreeModel *model, } /* Sort callback for the type column */ -static gint +static int type_sort_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, @@ -3648,7 +3648,7 @@ type_sort_func (GtkTreeModel *model, { GtkFileSystemModel *fs_model = GTK_FILE_SYSTEM_MODEL (model); GtkFileChooserWidget *impl = user_data; - gint result; + int result; result = compare_directory (fs_model, a, b, impl); @@ -3659,7 +3659,7 @@ type_sort_func (GtkTreeModel *model, } /* Sort callback for the time column */ -static gint +static int time_sort_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, @@ -3667,7 +3667,7 @@ time_sort_func (GtkTreeModel *model, { GtkFileSystemModel *fs_model = GTK_FILE_SYSTEM_MODEL (model); GtkFileChooserWidget *impl = user_data; - gint result; + int result; result = compare_directory (fs_model, a, b, impl); @@ -3677,7 +3677,7 @@ time_sort_func (GtkTreeModel *model, return result; } -static gint +static int recent_sort_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, @@ -3685,7 +3685,7 @@ recent_sort_func (GtkTreeModel *model, { GtkFileSystemModel *fs_model = GTK_FILE_SYSTEM_MODEL (model); GtkFileChooserWidget *impl = user_data; - gint result; + int result; result = compare_time (fs_model, a, b, impl); @@ -3698,7 +3698,7 @@ recent_sort_func (GtkTreeModel *model, return result; } -static gint +static int search_sort_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, @@ -3706,7 +3706,7 @@ search_sort_func (GtkTreeModel *model, { GtkFileSystemModel *fs_model = GTK_FILE_SYSTEM_MODEL (model); GtkFileChooserWidget *impl = user_data; - gint result; + int result; result = compare_location (fs_model, a, b, impl); @@ -3726,7 +3726,7 @@ static void list_sort_column_changed_cb (GtkTreeSortable *sortable, GtkFileChooserWidget *impl) { - gint sort_column_id; + int sort_column_id; GtkSortType sort_type; if (gtk_tree_sortable_get_sort_column_id (sortable, &sort_column_id, &sort_type)) @@ -4173,7 +4173,7 @@ my_g_format_date_for_display (GtkFileChooserWidget *impl, GDateTime *now_date, *date; const gchar *format; gchar *date_str; - gint days_ago; + int days_ago; time = g_date_time_new_from_unix_local (secs); date = g_date_time_new_local (g_date_time_get_year (time), @@ -4652,12 +4652,12 @@ struct update_chooser_entry_selected_foreach_closure { GtkTreeIter first_selected_iter; }; -static gint +static int compare_utf8_filenames (const gchar *a, const gchar *b) { gchar *a_folded, *b_folded; - gint retval; + int retval; a_folded = g_utf8_strdown (a, -1); b_folded = g_utf8_strdown (b, -1); @@ -5685,7 +5685,7 @@ get_display_name_from_file_list (GtkFileChooserWidget *impl) static void add_custom_button_to_dialog (GtkDialog *dialog, const gchar *mnemonic_label, - gint response_id) + int response_id) { GtkWidget *button; @@ -7166,7 +7166,7 @@ places_shortcut_handler (GtkFileChooserWidget *impl) static void quick_bookmark_handler (GtkFileChooserWidget *impl, - gint bookmark_index) + int bookmark_index) { GFile *file; @@ -7225,7 +7225,7 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class) }; GObjectClass *gobject_class = G_OBJECT_CLASS (class); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); - gint i; + int i; gobject_class->finalize = gtk_file_chooser_widget_finalize; gobject_class->constructed = gtk_file_chooser_widget_constructed; diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c index a541b88ba9..51121fcba3 100644 --- a/gtk/gtkfilesystemmodel.c +++ b/gtk/gtkfilesystemmodel.c @@ -442,7 +442,7 @@ gtk_file_system_model_get_flags (GtkTreeModel *tree_model) return GTK_TREE_MODEL_LIST_ONLY; } -static gint +static int gtk_file_system_model_get_n_columns (GtkTreeModel *tree_model) { GtkFileSystemModel *model = GTK_FILE_SYSTEM_MODEL (tree_model); @@ -452,7 +452,7 @@ gtk_file_system_model_get_n_columns (GtkTreeModel *tree_model) static GType gtk_file_system_model_get_column_type (GtkTreeModel *tree_model, - gint i) + int i) { GtkFileSystemModel *model = GTK_FILE_SYSTEM_MODEL (tree_model); @@ -473,7 +473,7 @@ static gboolean gtk_file_system_model_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n) + int n) { GtkFileSystemModel *model = GTK_FILE_SYSTEM_MODEL (tree_model); char *node; @@ -554,7 +554,7 @@ gtk_file_system_model_get_path (GtkTreeModel *tree_model, static void gtk_file_system_model_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value) { GtkFileSystemModel *model = GTK_FILE_SYSTEM_MODEL (tree_model); @@ -611,7 +611,7 @@ gtk_file_system_model_iter_has_child (GtkTreeModel *tree_model, return FALSE; } -static gint +static int gtk_file_system_model_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter) { @@ -787,7 +787,7 @@ gtk_file_system_model_sort_node (GtkFileSystemModel *model, guint node) static gboolean gtk_file_system_model_get_sort_column_id (GtkTreeSortable *sortable, - gint *sort_column_id, + int *sort_column_id, GtkSortType *order) { GtkFileSystemModel *model = GTK_FILE_SYSTEM_MODEL (sortable); @@ -806,7 +806,7 @@ gtk_file_system_model_get_sort_column_id (GtkTreeSortable *sortable, static void gtk_file_system_model_set_sort_column_id (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkSortType order) { GtkFileSystemModel *model = GTK_FILE_SYSTEM_MODEL (sortable); @@ -847,7 +847,7 @@ gtk_file_system_model_set_sort_column_id (GtkTreeSortable *sortable, static void gtk_file_system_model_set_sort_func (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkTreeIterCompareFunc func, gpointer data, GDestroyNotify destroy) @@ -1265,7 +1265,7 @@ gtk_file_system_model_got_enumerator (GObject *dir, GAsyncResult *res, gpointer static void gtk_file_system_model_set_n_columns (GtkFileSystemModel *model, - gint n_columns, + int n_columns, va_list args) { guint i; diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c index 8ac3ff9f7e..9a2315372a 100644 --- a/gtk/gtkflowbox.c +++ b/gtk/gtkflowbox.c @@ -115,7 +115,7 @@ static void gtk_flow_box_apply_filter (GtkFlowBox *box, GtkFlowBoxChild *child); static void gtk_flow_box_apply_sort (GtkFlowBox *box, GtkFlowBoxChild *child); -static gint gtk_flow_box_sort (GtkFlowBoxChild *a, +static int gtk_flow_box_sort (GtkFlowBoxChild *a, GtkFlowBoxChild *b, GtkFlowBox *box); @@ -133,18 +133,18 @@ static void gtk_flow_box_check_model_compat (GtkFlowBox *box); static void path_from_horizontal_line_rects (cairo_t *cr, GdkRectangle *lines, - gint n_lines) + int n_lines) { - gint start_line, end_line; + int start_line, end_line; GdkRectangle *r; - gint i; + int i; /* Join rows vertically by extending to the middle */ for (i = 0; i < n_lines - 1; i++) { GdkRectangle *r1 = &lines[i]; GdkRectangle *r2 = &lines[i+1]; - gint gap, old; + int gap, old; gap = r2->y - (r1->y + r1->height); r1->height += gap / 2; @@ -191,18 +191,18 @@ path_from_horizontal_line_rects (cairo_t *cr, static void path_from_vertical_line_rects (cairo_t *cr, GdkRectangle *lines, - gint n_lines) + int n_lines) { - gint start_line, end_line; + int start_line, end_line; GdkRectangle *r; - gint i; + int i; /* Join rows horizontally by extending to the middle */ for (i = 0; i < n_lines - 1; i++) { GdkRectangle *r1 = &lines[i]; GdkRectangle *r2 = &lines[i+1]; - gint gap, old; + int gap, old; gap = r2->x - (r1->x + r1->width); r1->width += gap / 2; @@ -609,7 +609,7 @@ gtk_flow_box_child_get_child (GtkFlowBoxChild *self) * Returns: the index of the @child, or -1 if the @child is not * in a flow box. */ -gint +int gtk_flow_box_child_get_index (GtkFlowBoxChild *child) { GtkFlowBoxChildPrivate *priv; @@ -739,7 +739,7 @@ struct _GtkFlowBoxClass void (*toggle_cursor_child) (GtkFlowBox *box); gboolean (*move_cursor) (GtkFlowBox *box, GtkMovementStep step, - gint count, + int count, gboolean extend, gboolean modify); void (*select_all) (GtkFlowBox *box); @@ -832,11 +832,11 @@ child_is_visible (GtkWidget *child) gtk_widget_get_child_visible (child); } -static gint +static int get_visible_children (GtkFlowBox *box) { GSequenceIter *iter; - gint i = 0; + int i = 0; for (iter = g_sequence_get_begin_iter (BOX_PRIV (box)->children); !g_sequence_iter_is_end (iter); @@ -1171,7 +1171,7 @@ gtk_flow_box_get_above_focusable (GtkFlowBox *box, GSequenceIter *iter) { GtkFlowBoxChild *child = NULL; - gint i; + int i; while (TRUE) { @@ -1197,7 +1197,7 @@ gtk_flow_box_get_below_focusable (GtkFlowBox *box, GSequenceIter *iter) { GtkFlowBoxChild *child = NULL; - gint i; + int i; while (TRUE) { @@ -1228,19 +1228,19 @@ gtk_flow_box_get_below_focusable (GtkFlowBox *box, static void get_max_item_size (GtkFlowBox *box, GtkOrientation orientation, - gint *min_size, - gint *nat_size) + int *min_size, + int *nat_size) { GSequenceIter *iter; - gint max_min_size = 0; - gint max_nat_size = 0; + int max_min_size = 0; + int max_nat_size = 0; for (iter = g_sequence_get_begin_iter (BOX_PRIV (box)->children); !g_sequence_iter_is_end (iter); iter = g_sequence_iter_next (iter)) { GtkWidget *child; - gint child_min, child_nat; + int child_min, child_nat; child = g_sequence_get (iter); @@ -1269,20 +1269,20 @@ get_max_item_size (GtkFlowBox *box, static void get_largest_size_for_opposing_orientation (GtkFlowBox *box, GtkOrientation orientation, - gint item_size, - gint *min_item_size, - gint *nat_item_size) + int item_size, + int *min_item_size, + int *nat_item_size) { GSequenceIter *iter; - gint max_min_size = 0; - gint max_nat_size = 0; + int max_min_size = 0; + int max_nat_size = 0; for (iter = g_sequence_get_begin_iter (BOX_PRIV (box)->children); !g_sequence_iter_is_end (iter); iter = g_sequence_iter_next (iter)) { GtkWidget *child; - gint child_min, child_nat; + int child_min, child_nat; child = g_sequence_get (iter); @@ -1312,16 +1312,16 @@ static GSequenceIter * get_largest_size_for_line_in_opposing_orientation (GtkFlowBox *box, GtkOrientation orientation, GSequenceIter *cursor, - gint line_length, + int line_length, GtkRequestedSize *item_sizes, - gint extra_pixels, - gint *min_item_size, - gint *nat_item_size) + int extra_pixels, + int *min_item_size, + int *nat_item_size) { GSequenceIter *iter; - gint max_min_size = 0; - gint max_nat_size = 0; - gint i; + int max_min_size = 0; + int max_nat_size = 0; + int i; i = 0; for (iter = cursor; @@ -1329,7 +1329,7 @@ get_largest_size_for_line_in_opposing_orientation (GtkFlowBox *box, iter = g_sequence_iter_next (iter)) { GtkWidget *child; - gint child_min, child_nat, this_item_size; + int child_min, child_nat, this_item_size; child = g_sequence_get (iter); @@ -1366,17 +1366,17 @@ get_largest_size_for_line_in_opposing_orientation (GtkFlowBox *box, } /* fit_aligned_item_requests() helper */ -static gint +static int gather_aligned_item_requests (GtkFlowBox *box, GtkOrientation orientation, - gint line_length, - gint item_spacing, - gint n_children, + int line_length, + int item_spacing, + int n_children, GtkRequestedSize *item_sizes) { GSequenceIter *iter; - gint i; - gint extra_items, natural_line_size = 0; + int i; + int extra_items, natural_line_size = 0; extra_items = n_children % line_length; @@ -1387,8 +1387,8 @@ gather_aligned_item_requests (GtkFlowBox *box, { GtkWidget *child; GtkAlign item_align; - gint child_min, child_nat; - gint position; + int child_min, child_nat; + int position; child = g_sequence_get (iter); @@ -1424,14 +1424,14 @@ gather_aligned_item_requests (GtkFlowBox *box, static GtkRequestedSize * fit_aligned_item_requests (GtkFlowBox *box, GtkOrientation orientation, - gint avail_size, - gint item_spacing, - gint *line_length, /* in-out */ - gint items_per_line, - gint n_children) + int avail_size, + int item_spacing, + int *line_length, /* in-out */ + int items_per_line, + int n_children) { GtkRequestedSize *sizes, *try_sizes; - gint try_line_size, try_length; + int try_line_size, try_length; sizes = g_new0 (GtkRequestedSize, *line_length); @@ -1478,14 +1478,14 @@ fit_aligned_item_requests (GtkFlowBox *box, typedef struct { GArray *requested; - gint extra_pixels; + int extra_pixels; } AllocatedLine; -static gint +static int get_offset_pixels (GtkAlign align, - gint pixels) + int pixels) { - gint offset; + int offset; switch (align) { case GTK_ALIGN_START: @@ -1516,19 +1516,19 @@ gtk_flow_box_size_allocate (GtkWidget *widget, GtkFlowBox *box = GTK_FLOW_BOX (widget); GtkFlowBoxPrivate *priv = BOX_PRIV (box); GtkAllocation child_allocation; - gint avail_size, avail_other_size, min_items, item_spacing, line_spacing; + int avail_size, avail_other_size, min_items, item_spacing, line_spacing; GtkAlign item_align; GtkAlign line_align; GtkRequestedSize *line_sizes = NULL; GtkRequestedSize *item_sizes = NULL; - gint min_item_size, nat_item_size; - gint line_length; - gint item_size = 0; - gint line_size = 0, min_fixed_line_size = 0, nat_fixed_line_size = 0; - gint line_offset, item_offset, n_children, n_lines, line_count; - gint extra_pixels = 0, extra_per_item = 0, extra_extra = 0; - gint extra_line_pixels = 0, extra_per_line = 0, extra_line_extra = 0; - gint i, this_line_size; + int min_item_size, nat_item_size; + int line_length; + int item_size = 0; + int line_size = 0, min_fixed_line_size = 0, nat_fixed_line_size = 0; + int line_offset, item_offset, n_children, n_lines, line_count; + int extra_pixels = 0, extra_per_item = 0, extra_extra = 0; + int extra_line_pixels = 0, extra_per_line = 0, extra_line_extra = 0; + int i, this_line_size; GSequenceIter *iter; min_items = MAX (1, priv->min_children_per_line); @@ -1755,8 +1755,8 @@ gtk_flow_box_size_allocate (GtkWidget *widget, iter = g_sequence_iter_next (iter)) { GtkWidget *child; - gint position; - gint this_item_size; + int position; + int this_item_size; child = g_sequence_get (iter); @@ -1804,7 +1804,7 @@ gtk_flow_box_size_allocate (GtkWidget *widget, * any leading items */ if (line_count == n_lines -1) { - gint extra_items = n_children % line_length; + int extra_items = n_children % line_length; if (priv->homogeneous) { @@ -1813,7 +1813,7 @@ gtk_flow_box_size_allocate (GtkWidget *widget, } else { - gint j; + int j; for (j = 0; j < (line_length - extra_items); j++) { @@ -1828,7 +1828,7 @@ gtk_flow_box_size_allocate (GtkWidget *widget, /* Push the index along for the last line when spreading to the end */ if (item_align == GTK_ALIGN_END && line_count == n_lines -1) { - gint extra_items = n_children % line_length; + int extra_items = n_children % line_length; position += line_length - extra_items; } @@ -1891,14 +1891,14 @@ gtk_flow_box_get_request_mode (GtkWidget *widget) static void get_largest_aligned_line_length (GtkFlowBox *box, GtkOrientation orientation, - gint line_length, - gint *min_size, - gint *nat_size) + int line_length, + int *min_size, + int *nat_size) { GSequenceIter *iter; - gint max_min_size = 0; - gint max_nat_size = 0; - gint spacing, i; + int max_min_size = 0; + int max_nat_size = 0; + int spacing, i; GtkRequestedSize *aligned_item_sizes; if (orientation == GTK_ORIENTATION_HORIZONTAL) @@ -1916,7 +1916,7 @@ get_largest_aligned_line_length (GtkFlowBox *box, iter = g_sequence_iter_next (iter)) { GtkWidget *child; - gint child_min, child_nat; + int child_min, child_nat; child = g_sequence_get (iter); if (!child_is_visible (child)) @@ -1970,9 +1970,9 @@ gtk_flow_box_measure (GtkWidget *widget, { if (for_size < 0) { - gint min_item_width, nat_item_width; - gint min_items, nat_items; - gint min_width, nat_width; + int min_item_width, nat_item_width; + int min_items, nat_items; + int min_width, nat_width; min_items = MAX (1, priv->min_children_per_line); nat_items = MAX (min_items, priv->max_children_per_line); @@ -1998,7 +1998,7 @@ gtk_flow_box_measure (GtkWidget *widget, } else { - gint min_line_length, nat_line_length; + int min_line_length, nat_line_length; get_largest_aligned_line_length (box, GTK_ORIENTATION_HORIZONTAL, @@ -2033,7 +2033,7 @@ gtk_flow_box_measure (GtkWidget *widget, else /* GTK_ORIENTATION_VERTICAL */ { /* Return the width for the minimum height */ - gint min_height; + int min_height; int dummy; gtk_flow_box_measure (widget, @@ -2053,10 +2053,10 @@ gtk_flow_box_measure (GtkWidget *widget, } else { - gint min_item_height, nat_item_height; - gint min_items; - gint min_width, nat_width; - gint avail_size, n_children; + int min_item_height, nat_item_height; + int min_items; + int min_width, nat_width; + int avail_size, n_children; min_items = MAX (1, priv->min_children_per_line); @@ -2074,9 +2074,9 @@ gtk_flow_box_measure (GtkWidget *widget, } else /* GTK_ORIENTATION_VERTICAL */ { - gint min_height; - gint line_length; - gint item_size, extra_pixels; + int min_height; + int line_length; + int item_size, extra_pixels; int dummy; n_children = get_visible_children (box); @@ -2126,8 +2126,8 @@ gtk_flow_box_measure (GtkWidget *widget, if (priv->homogeneous) { - gint min_item_width, nat_item_width; - gint lines; + int min_item_width, nat_item_width; + int lines; /* Here we just use the largest height-for-width and * add up the size accordingly @@ -2152,7 +2152,7 @@ gtk_flow_box_measure (GtkWidget *widget, } else { - gint min_line_width, nat_line_width, i; + int min_line_width, nat_line_width, i; gboolean first_line = TRUE; GtkRequestedSize *item_sizes; GSequenceIter *iter; @@ -2216,9 +2216,9 @@ gtk_flow_box_measure (GtkWidget *widget, { if (for_size < 0) { - gint min_item_height, nat_item_height; - gint min_items, nat_items; - gint min_height, nat_height; + int min_item_height, nat_item_height; + int min_items, nat_items; + int min_height, nat_height; min_items = MAX (1, priv->min_children_per_line); nat_items = MAX (min_items, priv->max_children_per_line); @@ -2226,7 +2226,7 @@ gtk_flow_box_measure (GtkWidget *widget, if (priv->orientation == GTK_ORIENTATION_HORIZONTAL) { /* Return the height for the minimum width */ - gint min_width; + int min_width; int dummy; gtk_flow_box_measure (widget, @@ -2259,7 +2259,7 @@ gtk_flow_box_measure (GtkWidget *widget, } else { - gint min_line_length, nat_line_length; + int min_line_length, nat_line_length; get_largest_aligned_line_length (box, GTK_ORIENTATION_VERTICAL, @@ -2302,10 +2302,10 @@ gtk_flow_box_measure (GtkWidget *widget, } else { - gint min_item_width, nat_item_width; - gint min_items; - gint min_height, nat_height; - gint avail_size, n_children; + int min_item_width, nat_item_width; + int min_items; + int min_height, nat_height; + int avail_size, n_children; min_items = MAX (1, priv->min_children_per_line); @@ -2314,9 +2314,9 @@ gtk_flow_box_measure (GtkWidget *widget, if (priv->orientation == GTK_ORIENTATION_HORIZONTAL) { - gint min_width; - gint line_length; - gint item_size, extra_pixels; + int min_width; + int line_length; + int item_size, extra_pixels; int dummy; n_children = get_visible_children (box); @@ -2366,8 +2366,8 @@ gtk_flow_box_measure (GtkWidget *widget, if (priv->homogeneous) { - gint min_item_height, nat_item_height; - gint lines; + int min_item_height, nat_item_height; + int lines; /* Here we just use the largest height-for-width and * add up the size accordingly @@ -2391,7 +2391,7 @@ gtk_flow_box_measure (GtkWidget *widget, } else { - gint min_line_height, nat_line_height, i; + int min_line_height, nat_line_height, i; gboolean first_line = TRUE; GtkRequestedSize *item_sizes; GSequenceIter *iter; @@ -2701,13 +2701,13 @@ get_view_rect (GtkFlowBox *box, static void update_autoscroll_mode (GtkFlowBox *box, - gint x, - gint y) + int x, + int y) { GtkFlowBoxPrivate *priv = BOX_PRIV (box); GtkScrollType mode = GTK_SCROLL_NONE; GdkRectangle rect; - gint size, pos; + int size, pos; if (priv->rubberband_select && get_view_rect (box, &rect)) { @@ -3127,7 +3127,7 @@ gtk_flow_box_add_move_binding (GtkWidgetClass *widget_class, guint keyval, GdkModifierType modmask, GtkMovementStep step, - gint count) + int count) { gtk_widget_class_add_binding_signal (widget_class, keyval, modmask, @@ -3180,7 +3180,7 @@ gtk_flow_box_disable_move_cursor (GtkFlowBox *box) static gboolean gtk_flow_box_move_cursor (GtkFlowBox *box, GtkMovementStep step, - gint count, + int count, gboolean extend, gboolean modify) { @@ -3189,9 +3189,9 @@ gtk_flow_box_move_cursor (GtkFlowBox *box, GtkFlowBoxChild *prev; GtkFlowBoxChild *next; GtkAllocation allocation; - gint page_size; + int page_size; GSequenceIter *iter; - gint start; + int start; GtkAdjustment *adjustment; gboolean vertical; @@ -3286,7 +3286,7 @@ gtk_flow_box_move_cursor (GtkFlowBox *box, if (count < 0) { - gint i = 0; + int i = 0; /* Up */ while (iter != NULL) @@ -3311,7 +3311,7 @@ gtk_flow_box_move_cursor (GtkFlowBox *box, } else { - gint i = 0; + int i = 0; /* Down */ while (!g_sequence_iter_is_end (iter)) @@ -3946,7 +3946,7 @@ gtk_flow_box_bound_model_changed (GListModel *list, { GtkFlowBox *box = user_data; GtkFlowBoxPrivate *priv = BOX_PRIV (box); - gint i; + int i; while (removed--) { @@ -4058,7 +4058,7 @@ gtk_flow_box_insert_css_node (GtkFlowBox *box, void gtk_flow_box_insert (GtkFlowBox *box, GtkWidget *widget, - gint position) + int position) { GtkFlowBoxPrivate *priv; GtkFlowBoxChild *child; @@ -4111,7 +4111,7 @@ gtk_flow_box_insert (GtkFlowBox *box, */ GtkFlowBoxChild * gtk_flow_box_get_child_at_index (GtkFlowBox *box, - gint idx) + int idx) { GSequenceIter *iter; @@ -4139,8 +4139,8 @@ gtk_flow_box_get_child_at_index (GtkFlowBox *box, */ GtkFlowBoxChild * gtk_flow_box_get_child_at_pos (GtkFlowBox *box, - gint x, - gint y) + int x, + int y) { GtkWidget *child = gtk_widget_pick (GTK_WIDGET (box), x, y, GTK_PICK_DEFAULT); @@ -4893,7 +4893,7 @@ gtk_flow_box_set_sort_func (GtkFlowBox *box, gtk_flow_box_invalidate_sort (box); } -static gint +static int gtk_flow_box_sort (GtkFlowBoxChild *a, GtkFlowBoxChild *b, GtkFlowBox *box) diff --git a/gtk/gtkflowbox.h b/gtk/gtkflowbox.h index da8b1ceb3e..1b8f811553 100644 --- a/gtk/gtkflowbox.h +++ b/gtk/gtkflowbox.h @@ -88,7 +88,7 @@ GDK_AVAILABLE_IN_ALL GtkWidget * gtk_flow_box_child_get_child (GtkFlowBoxChild *self); GDK_AVAILABLE_IN_ALL -gint gtk_flow_box_child_get_index (GtkFlowBoxChild *child); +int gtk_flow_box_child_get_index (GtkFlowBoxChild *child); GDK_AVAILABLE_IN_ALL gboolean gtk_flow_box_child_is_selected (GtkFlowBoxChild *child); GDK_AVAILABLE_IN_ALL @@ -145,18 +145,18 @@ gboolean gtk_flow_box_get_activate_on_single_click (GtkFlowBox GDK_AVAILABLE_IN_ALL void gtk_flow_box_insert (GtkFlowBox *box, GtkWidget *widget, - gint position); + int position); GDK_AVAILABLE_IN_ALL void gtk_flow_box_remove (GtkFlowBox *box, GtkWidget *widget); GDK_AVAILABLE_IN_ALL GtkFlowBoxChild *gtk_flow_box_get_child_at_index (GtkFlowBox *box, - gint idx); + int idx); GDK_AVAILABLE_IN_ALL GtkFlowBoxChild *gtk_flow_box_get_child_at_pos (GtkFlowBox *box, - gint x, - gint y); + int x, + int y); typedef void (* GtkFlowBoxForeachFunc) (GtkFlowBox *box, GtkFlowBoxChild *child, @@ -201,9 +201,9 @@ void gtk_flow_box_set_filter_func (GtkFlowBox GDK_AVAILABLE_IN_ALL void gtk_flow_box_invalidate_filter (GtkFlowBox *box); -typedef gint (*GtkFlowBoxSortFunc) (GtkFlowBoxChild *child1, - GtkFlowBoxChild *child2, - gpointer user_data); +typedef int (*GtkFlowBoxSortFunc) (GtkFlowBoxChild *child1, + GtkFlowBoxChild *child2, + gpointer user_data); GDK_AVAILABLE_IN_ALL void gtk_flow_box_set_sort_func (GtkFlowBox *box, diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c index 86121c2e2a..11ee713591 100644 --- a/gtk/gtkfontbutton.c +++ b/gtk/gtkfontbutton.c @@ -86,7 +86,7 @@ struct _GtkFontButton PangoFontFamily *font_family; PangoFontFace *font_face; PangoFontMap *font_map; - gint font_size; + int font_size; char *font_features; PangoLanguage *language; gchar *preview_text; @@ -137,7 +137,7 @@ static void gtk_font_button_clicked (GtkButton *button, /* Dialog response functions */ static void response_cb (GtkDialog *dialog, - gint response_id, + int response_id, gpointer data); static void dialog_destroy (GtkWidget *widget, gpointer data); @@ -218,7 +218,7 @@ gtk_font_button_update_font_data (GtkFontButton *font_button) { PangoFontFamily **families; PangoFontFace **faces; - gint n_families, n_faces, i; + int n_families, n_faces, i; const gchar *family; g_assert (font_button->font_desc != NULL); @@ -983,7 +983,7 @@ gtk_font_button_clicked (GtkButton *button, static void response_cb (GtkDialog *dialog, - gint response_id, + int response_id, gpointer data) { GtkFontButton *font_button = GTK_FONT_BUTTON (data); diff --git a/gtk/gtkfontchooser.c b/gtk/gtkfontchooser.c index 497c3247ca..7fdf041395 100644 --- a/gtk/gtkfontchooser.c +++ b/gtk/gtkfontchooser.c @@ -222,7 +222,7 @@ gtk_font_chooser_get_font_face (GtkFontChooser *fontchooser) * Returns: A n integer representing the selected font size, * or -1 if no font size is selected. */ -gint +int gtk_font_chooser_get_font_size (GtkFontChooser *fontchooser) { g_return_val_if_fail (GTK_IS_FONT_CHOOSER (fontchooser), -1); diff --git a/gtk/gtkfontchooser.h b/gtk/gtkfontchooser.h index 922258839c..96c9825927 100644 --- a/gtk/gtkfontchooser.h +++ b/gtk/gtkfontchooser.h @@ -81,7 +81,7 @@ struct _GtkFontChooserIface /* Methods */ PangoFontFamily * (* get_font_family) (GtkFontChooser *fontchooser); PangoFontFace * (* get_font_face) (GtkFontChooser *fontchooser); - gint (* get_font_size) (GtkFontChooser *fontchooser); + int (* get_font_size) (GtkFontChooser *fontchooser); void (* set_filter_func) (GtkFontChooser *fontchooser, GtkFontFilterFunc filter, @@ -109,7 +109,7 @@ PangoFontFamily *gtk_font_chooser_get_font_family (GtkFontChooser *fo GDK_AVAILABLE_IN_ALL PangoFontFace *gtk_font_chooser_get_font_face (GtkFontChooser *fontchooser); GDK_AVAILABLE_IN_ALL -gint gtk_font_chooser_get_font_size (GtkFontChooser *fontchooser); +int gtk_font_chooser_get_font_size (GtkFontChooser *fontchooser); GDK_AVAILABLE_IN_ALL PangoFontDescription * diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index 42101f29d3..69f0771660 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -326,8 +326,8 @@ gtk_font_chooser_widget_update_marks (GtkFontChooserWidget *self) { GtkAdjustment *adj, *spin_adj; const int *sizes; - gint *font_sizes; - gint i, n_sizes; + int *font_sizes; + int i, n_sizes; gdouble value, spin_value; gpointer item; @@ -356,7 +356,7 @@ gtk_font_chooser_widget_update_marks (GtkFontChooserWidget *self) if (n_sizes < 2) { - static const gint fallback_sizes[] = { + static const int fallback_sizes[] = { 6, 8, 9, 10, 11, 12, 13, 14, 16, 20, 24, 36, 48, 72 }; @@ -955,7 +955,7 @@ gtk_font_chooser_widget_get_family (GtkFontChooser *chooser) return pango_font_face_get_family (item); } -static gint +static int gtk_font_chooser_widget_get_size (GtkFontChooser *chooser) { GtkFontChooserWidget *fontchooser = GTK_FONT_CHOOSER_WIDGET (chooser); @@ -1223,7 +1223,7 @@ find_language_and_script (GtkFontChooserWidget *fontchooser, hb_tag_t *lang_tag, hb_tag_t *script_tag) { - gint i, j, k; + int i, j, k; hb_tag_t scripts[80]; unsigned int n_scripts; unsigned int count; diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index 5042b1b346..89ee7d55c6 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -128,11 +128,11 @@ static void gtk_frame_buildable_add_child (GtkBuildable *buildable, const gchar *type); static void gtk_frame_measure (GtkWidget *widget, GtkOrientation orientation, - gint for_size, - gint *minimum_size, - gint *natural_size, - gint *minimum_baseline, - gint *natural_baseline); + int for_size, + int *minimum_size, + int *natural_size, + int *minimum_baseline, + int *natural_baseline); static void gtk_frame_compute_expand (GtkWidget *widget, gboolean *hexpand, gboolean *vexpand); @@ -533,14 +533,14 @@ gtk_frame_real_compute_child_allocation (GtkFrame *frame, { GtkFramePrivate *priv = gtk_frame_get_instance_private (frame); int frame_width, frame_height; - gint height; + int height; frame_width = gtk_widget_get_width (GTK_WIDGET (frame)); frame_height = gtk_widget_get_height (GTK_WIDGET (frame)); if (priv->label_widget) { - gint nat_width, width; + int nat_width, width; gtk_widget_measure (priv->label_widget, GTK_ORIENTATION_HORIZONTAL, -1, NULL, &nat_width, NULL, NULL); @@ -560,11 +560,11 @@ gtk_frame_real_compute_child_allocation (GtkFrame *frame, static void gtk_frame_measure (GtkWidget *widget, GtkOrientation orientation, - gint for_size, - gint *minimum, - gint *natural, - gint *minimum_baseline, - gint *natural_baseline) + int for_size, + int *minimum, + int *natural, + int *minimum_baseline, + int *natural_baseline) { GtkFrame *frame = GTK_FRAME (widget); GtkFramePrivate *priv = gtk_frame_get_instance_private (frame); diff --git a/gtk/gtkgestureclickprivate.h b/gtk/gtkgestureclickprivate.h index 6e3f825932..64d04f780f 100644 --- a/gtk/gtkgestureclickprivate.h +++ b/gtk/gtkgestureclickprivate.h @@ -32,11 +32,11 @@ struct _GtkGestureClickClass GtkGestureSingleClass parent_class; void (* pressed) (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y); void (* released) (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y); void (* stopped) (GtkGestureClick *gesture); diff --git a/gtk/gtkgesturelongpress.c b/gtk/gtkgesturelongpress.c index 4906abd2bf..777debc9aa 100644 --- a/gtk/gtkgesturelongpress.c +++ b/gtk/gtkgesturelongpress.c @@ -119,7 +119,7 @@ gtk_gesture_long_press_begin (GtkGesture *gesture, GdkEvent *event; GdkEventType event_type; GtkWidget *widget; - gint delay; + int delay; priv = gtk_gesture_long_press_get_instance_private (GTK_GESTURE_LONG_PRESS (gesture)); sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture)); @@ -139,7 +139,7 @@ gtk_gesture_long_press_begin (GtkGesture *gesture, "gtk-long-press-time", &delay, NULL); - delay = (gint)(priv->delay_factor * delay); + delay = (int)(priv->delay_factor * delay); gtk_gesture_get_point (gesture, sequence, &priv->initial_x, &priv->initial_y); diff --git a/gtk/gtkgesturestylus.c b/gtk/gtkgesturestylus.c index 094a759553..0db2bb7837 100644 --- a/gtk/gtkgesturestylus.c +++ b/gtk/gtkgesturestylus.c @@ -223,7 +223,7 @@ gtk_gesture_stylus_get_axes (GtkGestureStylus *gesture, { GdkEvent *event; GArray *array; - gint i = 0; + int i = 0; g_return_val_if_fail (GTK_IS_GESTURE_STYLUS (gesture), FALSE); g_return_val_if_fail (values != NULL, FALSE); diff --git a/gtk/gtkgestureswipe.c b/gtk/gtkgestureswipe.c index 5aba66dd70..4105384004 100644 --- a/gtk/gtkgestureswipe.c +++ b/gtk/gtkgestureswipe.c @@ -108,11 +108,11 @@ _gtk_gesture_swipe_clear_backlog (GtkGestureSwipe *gesture, guint32 evtime) { GtkGestureSwipePrivate *priv; - gint i, length = 0; + int i, length = 0; priv = gtk_gesture_swipe_get_instance_private (gesture); - for (i = 0; i < (gint) priv->events->len; i++) + for (i = 0; i < (int) priv->events->len; i++) { EventData *data; diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c index 107e0940ff..ddb079c9e9 100644 --- a/gtk/gtkglarea.c +++ b/gtk/gtkglarea.c @@ -650,8 +650,8 @@ gtk_gl_area_size_allocate (GtkWidget *widget, static void gtk_gl_area_draw_error_screen (GtkGLArea *area, GtkSnapshot *snapshot, - gint width, - gint height) + int width, + int height) { GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area); PangoLayout *layout; @@ -1088,8 +1088,8 @@ gtk_gl_area_get_use_es (GtkGLArea *area) */ void gtk_gl_area_set_required_version (GtkGLArea *area, - gint major, - gint minor) + int major, + int minor) { GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area); @@ -1110,8 +1110,8 @@ gtk_gl_area_set_required_version (GtkGLArea *area, */ void gtk_gl_area_get_required_version (GtkGLArea *area, - gint *major, - gint *minor) + int *major, + int *minor) { GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area); diff --git a/gtk/gtkglarea.h b/gtk/gtkglarea.h index 68c1dc6688..8d0cd0f2ca 100644 --- a/gtk/gtkglarea.h +++ b/gtk/gtkglarea.h @@ -88,12 +88,12 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_gl_area_get_use_es (GtkGLArea *area); GDK_AVAILABLE_IN_ALL void gtk_gl_area_set_required_version (GtkGLArea *area, - gint major, - gint minor); + int major, + int minor); GDK_AVAILABLE_IN_ALL void gtk_gl_area_get_required_version (GtkGLArea *area, - gint *major, - gint *minor); + int *major, + int *minor); GDK_AVAILABLE_IN_ALL gboolean gtk_gl_area_get_has_depth_buffer (GtkGLArea *area); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c index fcee1db685..a9cda6bfb5 100644 --- a/gtk/gtkgrid.c +++ b/gtk/gtkgrid.c @@ -185,10 +185,10 @@ gtk_grid_set_property (GObject *object, static void grid_attach (GtkGrid *grid, GtkWidget *widget, - gint left, - gint top, - gint width, - gint height) + int left, + int top, + int width, + int height) { GtkGridPrivate *priv = gtk_grid_get_instance_private (grid); GtkGridLayoutChild *grid_child; @@ -209,17 +209,17 @@ grid_attach (GtkGrid *grid, * @op_pos, @op_span determine the rows/columns * in which the touching has to happen. */ -static gint +static int find_attach_position (GtkGrid *grid, GtkOrientation orientation, - gint op_pos, - gint op_span, + int op_pos, + int op_span, gboolean max) { GtkGridPrivate *priv = gtk_grid_get_instance_private (grid); GtkWidget *child; gboolean hit; - gint pos; + int pos; if (max) pos = -G_MAXINT; @@ -470,10 +470,10 @@ gtk_grid_new (void) void gtk_grid_attach (GtkGrid *grid, GtkWidget *child, - gint left, - gint top, - gint width, - gint height) + int left, + int top, + int width, + int height) { g_return_if_fail (GTK_IS_GRID (grid)); g_return_if_fail (GTK_IS_WIDGET (child)); @@ -509,12 +509,12 @@ gtk_grid_attach_next_to (GtkGrid *grid, GtkWidget *child, GtkWidget *sibling, GtkPositionType side, - gint width, - gint height) + int width, + int height) { GtkGridPrivate *priv = gtk_grid_get_instance_private (grid); GtkGridLayoutChild *grid_sibling; - gint left, top; + int left, top; g_return_if_fail (GTK_IS_GRID (grid)); g_return_if_fail (GTK_IS_WIDGET (child)); @@ -594,8 +594,8 @@ gtk_grid_attach_next_to (GtkGrid *grid, */ GtkWidget * gtk_grid_get_child_at (GtkGrid *grid, - gint left, - gint top) + int left, + int top) { GtkGridPrivate *priv = gtk_grid_get_instance_private (grid); GtkWidget *child; @@ -657,7 +657,7 @@ gtk_grid_remove (GtkGrid *grid, */ void gtk_grid_insert_row (GtkGrid *grid, - gint position) + int position) { GtkGridPrivate *priv = gtk_grid_get_instance_private (grid); GtkWidget *child; @@ -696,7 +696,7 @@ gtk_grid_insert_row (GtkGrid *grid, */ void gtk_grid_remove_row (GtkGrid *grid, - gint position) + int position) { GtkGridPrivate *priv = gtk_grid_get_instance_private (grid); GtkWidget *child; @@ -746,7 +746,7 @@ gtk_grid_remove_row (GtkGrid *grid, */ void gtk_grid_insert_column (GtkGrid *grid, - gint position) + int position) { GtkGridPrivate *priv = gtk_grid_get_instance_private (grid); GtkWidget *child; @@ -785,7 +785,7 @@ gtk_grid_insert_column (GtkGrid *grid, */ void gtk_grid_remove_column (GtkGrid *grid, - gint position) + int position) { GtkGridPrivate *priv = gtk_grid_get_instance_private (grid); GtkWidget *child; @@ -1059,7 +1059,7 @@ gtk_grid_get_column_spacing (GtkGrid *grid) */ void gtk_grid_set_row_baseline_position (GtkGrid *grid, - gint row, + int row, GtkBaselinePosition pos) { GtkGridPrivate *priv = gtk_grid_get_instance_private (grid); @@ -1084,7 +1084,7 @@ gtk_grid_set_row_baseline_position (GtkGrid *grid, */ GtkBaselinePosition gtk_grid_get_row_baseline_position (GtkGrid *grid, - gint row) + int row) { GtkGridPrivate *priv = gtk_grid_get_instance_private (grid); @@ -1105,7 +1105,7 @@ gtk_grid_get_row_baseline_position (GtkGrid *grid, */ void gtk_grid_set_baseline_row (GtkGrid *grid, - gint row) + int row) { GtkGridPrivate *priv = gtk_grid_get_instance_private (grid); int old_row; @@ -1128,7 +1128,7 @@ gtk_grid_set_baseline_row (GtkGrid *grid, * * Returns: the row index defining the global baseline */ -gint +int gtk_grid_get_baseline_row (GtkGrid *grid) { GtkGridPrivate *priv = gtk_grid_get_instance_private (grid); @@ -1152,10 +1152,10 @@ gtk_grid_get_baseline_row (GtkGrid *grid) void gtk_grid_query_child (GtkGrid *grid, GtkWidget *child, - gint *left, - gint *top, - gint *width, - gint *height) + int *left, + int *top, + int *width, + int *height) { GtkGridPrivate *priv = gtk_grid_get_instance_private (grid); GtkGridLayoutChild *grid_child; diff --git a/gtk/gtkgrid.h b/gtk/gtkgrid.h index e7b8bd0d7d..7c0bbb4ac0 100644 --- a/gtk/gtkgrid.h +++ b/gtk/gtkgrid.h @@ -66,37 +66,37 @@ GtkWidget* gtk_grid_new (void); GDK_AVAILABLE_IN_ALL void gtk_grid_attach (GtkGrid *grid, GtkWidget *child, - gint left, - gint top, - gint width, - gint height); + int left, + int top, + int width, + int height); GDK_AVAILABLE_IN_ALL void gtk_grid_attach_next_to (GtkGrid *grid, GtkWidget *child, GtkWidget *sibling, GtkPositionType side, - gint width, - gint height); + int width, + int height); GDK_AVAILABLE_IN_ALL GtkWidget *gtk_grid_get_child_at (GtkGrid *grid, - gint left, - gint top); + int left, + int top); GDK_AVAILABLE_IN_ALL void gtk_grid_remove (GtkGrid *grid, GtkWidget *child); GDK_AVAILABLE_IN_ALL void gtk_grid_insert_row (GtkGrid *grid, - gint position); + int position); GDK_AVAILABLE_IN_ALL void gtk_grid_insert_column (GtkGrid *grid, - gint position); + int position); GDK_AVAILABLE_IN_ALL void gtk_grid_remove_row (GtkGrid *grid, - gint position); + int position); GDK_AVAILABLE_IN_ALL void gtk_grid_remove_column (GtkGrid *grid, - gint position); + int position); GDK_AVAILABLE_IN_ALL void gtk_grid_insert_next_to (GtkGrid *grid, GtkWidget *sibling, @@ -123,24 +123,24 @@ GDK_AVAILABLE_IN_ALL guint gtk_grid_get_column_spacing (GtkGrid *grid); GDK_AVAILABLE_IN_ALL void gtk_grid_set_row_baseline_position (GtkGrid *grid, - gint row, + int row, GtkBaselinePosition pos); GDK_AVAILABLE_IN_ALL GtkBaselinePosition gtk_grid_get_row_baseline_position (GtkGrid *grid, - gint row); + int row); GDK_AVAILABLE_IN_ALL void gtk_grid_set_baseline_row (GtkGrid *grid, - gint row); + int row); GDK_AVAILABLE_IN_ALL -gint gtk_grid_get_baseline_row (GtkGrid *grid); +int gtk_grid_get_baseline_row (GtkGrid *grid); GDK_AVAILABLE_IN_ALL void gtk_grid_query_child (GtkGrid *grid, GtkWidget *child, - gint *left, - gint *top, - gint *width, - gint *height); + int *left, + int *top, + int *width, + int *height); G_END_DECLS diff --git a/gtk/gtkgridlayout.c b/gtk/gtkgridlayout.c index 08fce7fbde..77904f80b2 100644 --- a/gtk/gtkgridlayout.c +++ b/gtk/gtkgridlayout.c @@ -555,7 +555,7 @@ grid_request_init (GridRequest *request, /* Sums allocations for lines spanned by child and their spacing. */ -static gint +static int compute_allocation_for_child (GridRequest *request, GtkGridLayoutChild *child, GtkOrientation orientation) @@ -717,8 +717,8 @@ grid_request_homogeneous (GridRequest *request, GtkGridLayout *self = request->layout; GridLineData *linedata; GridLines *lines; - gint minimum, natural; - gint i; + int minimum, natural; + int i; linedata = &self->linedata[orientation]; lines = &request->lines[orientation]; @@ -1393,7 +1393,7 @@ gtk_grid_layout_get_size_for_size (GtkGridLayout *self, { GridRequest request; GridLines *lines; - gint min_size, nat_size; + int min_size, nat_size; *minimum = 0; *natural = 0; @@ -1491,7 +1491,7 @@ grid_request_allocate_children (GridRequest *request, { GtkWidget *child; GtkAllocation child_allocation; - gint x, y, width, height, baseline, ignore; + int x, y, width, height, baseline, ignore; for (child = gtk_widget_get_first_child (request->widget); diff --git a/gtk/gtkiconcache.c b/gtk/gtkiconcache.c index ada3d95c79..60bd57b9bc 100644 --- a/gtk/gtkiconcache.c +++ b/gtk/gtkiconcache.c @@ -44,7 +44,7 @@ #define GET_UINT32(cache, offset) (GUINT32_FROM_BE (*(guint32 *)((cache) + (offset)))) struct _GtkIconCache { - gint ref_count; + int ref_count; GMappedFile *map; gchar *buffer; @@ -153,13 +153,13 @@ gtk_icon_cache_new (const gchar *data) return cache; } -static gint +static int get_directory_index (GtkIconCache *cache, const gchar *directory) { guint32 dir_list_offset; - gint n_dirs; - gint i; + int n_dirs; + int i; dir_list_offset = GET_UINT32 (cache->buffer, 8); @@ -181,7 +181,7 @@ gtk_icon_cache_list_icons_in_directory (GtkIconCache *cache, const gchar *directory, GtkStringSet *set) { - gint directory_index; + int directory_index; guint32 hash_offset, n_buckets; guint32 chain_offset; guint32 image_list_offset, n_images; diff --git a/gtk/gtkiconcachevalidatorprivate.h b/gtk/gtkiconcachevalidatorprivate.h index c5e1e338ad..c074b11391 100644 --- a/gtk/gtkiconcachevalidatorprivate.h +++ b/gtk/gtkiconcachevalidatorprivate.h @@ -31,7 +31,7 @@ typedef struct { const gchar *cache; gsize cache_size; guint32 n_directories; - gint flags; + int flags; } CacheInfo; gboolean gtk_icon_cache_validate (CacheInfo *info); diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c index 872a30fda3..597a1f0a25 100644 --- a/gtk/gtkiconhelper.c +++ b/gtk/gtkiconhelper.c @@ -42,7 +42,7 @@ struct _GtkIconHelper GtkImageDefinition *def; - gint pixel_size; + int pixel_size; guint use_fallback : 1; guint texture_is_symbolic : 1; @@ -85,13 +85,13 @@ static GdkPaintable * ensure_paintable_for_gicon (GtkIconHelper *self, GtkCssStyle *style, GtkTextDirection dir, - gint scale, + int scale, gboolean preload, GIcon *gicon, gboolean *symbolic) { GtkIconTheme *icon_theme; - gint width, height; + int width, height; GtkIconPaintable *icon; GtkIconLookupFlags flags; @@ -492,7 +492,7 @@ _gtk_icon_helper_set_paintable (GtkIconHelper *self, gboolean _gtk_icon_helper_set_pixel_size (GtkIconHelper *self, - gint pixel_size) + int pixel_size) { if (self->pixel_size != pixel_size) { @@ -528,7 +528,7 @@ _gtk_icon_helper_get_use_fallback (GtkIconHelper *self) return self->use_fallback; } -gint +int _gtk_icon_helper_get_pixel_size (GtkIconHelper *self) { return self->pixel_size; diff --git a/gtk/gtkiconhelperprivate.h b/gtk/gtkiconhelperprivate.h index 1b51eaa250..eea4351337 100644 --- a/gtk/gtkiconhelperprivate.h +++ b/gtk/gtkiconhelperprivate.h @@ -50,12 +50,12 @@ void _gtk_icon_helper_set_paintable (GtkIconHelper *self, GdkPaintable *paintable); gboolean _gtk_icon_helper_set_pixel_size (GtkIconHelper *self, - gint pixel_size); + int pixel_size); gboolean _gtk_icon_helper_set_use_fallback (GtkIconHelper *self, gboolean use_fallback); GtkImageType _gtk_icon_helper_get_storage_type (GtkIconHelper *self); -gint _gtk_icon_helper_get_pixel_size (GtkIconHelper *self); +int _gtk_icon_helper_get_pixel_size (GtkIconHelper *self); gboolean _gtk_icon_helper_get_use_fallback (GtkIconHelper *self); GIcon *_gtk_icon_helper_peek_gicon (GtkIconHelper *self); diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 068ca174a5..39d193785f 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -349,8 +349,8 @@ struct _GtkIconThemeClass typedef struct { gchar **icon_names; - gint size; - gint scale; + int size; + int scale; GtkIconLookupFlags flags; } IconKey; @@ -389,8 +389,8 @@ struct _GtkIconPaintable /* Parameters influencing the scaled icon */ - gint desired_size; - gint desired_scale; + int desired_size; + int desired_scale; guint is_svg : 1; guint is_resource : 1; guint is_symbolic : 1; @@ -427,11 +427,11 @@ typedef struct typedef struct { IconThemeDirType type; - gint size; - gint min_size; - gint max_size; - gint threshold; - gint scale; + int size; + int min_size; + int max_size; + int threshold; + int scale; GArray *icon_files; GHashTable *icon_hash; /* name (interned) -> file index */ @@ -467,8 +467,8 @@ static void theme_dir_destroy (IconThemeDir *dir static void theme_destroy (IconTheme *theme); static GtkIconPaintable *theme_lookup_icon (IconTheme *theme, const gchar *icon_name, - gint size, - gint scale, + int size, + int scale, gboolean allow_svg); static gboolean theme_has_icon (IconTheme *theme, const gchar *icon_name); @@ -1215,7 +1215,7 @@ pixbuf_supports_svg (void) { GSList *formats; GSList *tmp_list; - static gint found_svg = -1; + static int found_svg = -1; if (found_svg != -1) return found_svg; @@ -1745,7 +1745,7 @@ static void insert_theme (GtkIconTheme *self, const gchar *theme_name) { - gint i; + int i; GList *l; gchar **dirs; gchar **scaled_dirs; @@ -1963,7 +1963,7 @@ static void load_themes (GtkIconTheme *self) { GDir *gdir; - gint base; + int base; gchar *dir; const gchar *file; GTimeVal tv; @@ -2014,7 +2014,7 @@ load_themes (GtkIconTheme *self) for (j = 0; self->resource_path[j]; j++) { gchar **children; - gint i; + int i; dir = self->resource_path[j]; children = g_resources_enumerate_children (dir, 0, NULL); @@ -2142,8 +2142,8 @@ icon_uri_is_symbolic (const gchar *icon_name, static GtkIconPaintable * real_choose_icon (GtkIconTheme *self, const gchar *icon_names[], - gint size, - gint scale, + int size, + int scale, GtkIconLookupFlags flags, gboolean non_blocking) { @@ -2152,7 +2152,7 @@ real_choose_icon (GtkIconTheme *self, UnthemedIcon *unthemed_icon = NULL; const gchar *icon_name = NULL; IconTheme *theme = NULL; - gint i; + int i; IconKey key; if (!ensure_valid_themes (self, non_blocking)) @@ -2296,8 +2296,8 @@ icon_name_list_add_icon (GtkStrvBuilder *icons, static GtkIconPaintable * choose_icon (GtkIconTheme *self, const gchar *icon_names[], - gint size, - gint scale, + int size, + int scale, GtkTextDirection direction, GtkIconLookupFlags flags, gboolean non_blocking) @@ -2459,8 +2459,8 @@ GtkIconPaintable * gtk_icon_theme_lookup_icon (GtkIconTheme *self, const char *icon_name, const char *fallbacks[], - gint size, - gint scale, + int size, + int scale, GtkTextDirection direction, GtkIconLookupFlags flags) { @@ -2609,7 +2609,7 @@ add_size (gpointer key, gpointer value, gpointer user_data) { - gint **res_p = user_data; + int **res_p = user_data; **res_p = GPOINTER_TO_INT (key); @@ -2631,14 +2631,14 @@ add_size (gpointer key, * available. The array should be freed with g_free() when it is no * longer needed. */ -gint * +int * gtk_icon_theme_get_icon_sizes (GtkIconTheme *self, const gchar *icon_name) { GList *l; int i; GHashTable *sizes; - gint *result, *r; + int *result, *r; g_return_val_if_fail (GTK_IS_ICON_THEME (self), NULL); @@ -2670,7 +2670,7 @@ gtk_icon_theme_get_icon_sizes (GtkIconTheme *self, } } - r = result = g_new0 (gint, g_hash_table_size (sizes) + 1); + r = result = g_new0 (int, g_hash_table_size (sizes) + 1); g_hash_table_foreach (sizes, add_size, &r); g_hash_table_destroy (sizes); @@ -2747,7 +2747,7 @@ gtk_icon_theme_get_icon_names (GtkIconTheme *self) static gboolean rescan_themes (GtkIconTheme *self) { - gint stat_res; + int stat_res; GStatBuf stat_buf; GTimeVal tv; guint i; @@ -2840,11 +2840,11 @@ theme_dir_destroy (IconThemeDir *dir) static int theme_dir_size_difference (IconThemeDirSize *dir_size, - gint size, - gint scale) + int size, + int scale) { - gint scaled_size, scaled_dir_size; - gint min, max; + int scaled_size, scaled_dir_size; + int min, max; scaled_size = size * scale; scaled_dir_size = dir_size->size * dir_size->scale; @@ -2942,13 +2942,13 @@ best_suffix (IconCacheFlag suffix, /* returns TRUE if dir_a is a better match */ static gboolean -compare_dir_size_matches (IconThemeDirSize *dir_a, gint difference_a, - IconThemeDirSize *dir_b, gint difference_b, - gint requested_size, - gint requested_scale) +compare_dir_size_matches (IconThemeDirSize *dir_a, int difference_a, + IconThemeDirSize *dir_b, int difference_b, + int requested_size, + int requested_scale) { - gint diff_a; - gint diff_b; + int diff_a; + int diff_b; if (difference_a == 0) { @@ -3008,13 +3008,13 @@ compare_dir_size_matches (IconThemeDirSize *dir_a, gint difference_a, static GtkIconPaintable * theme_lookup_icon (IconTheme *theme, const gchar *icon_name, /* interned */ - gint size, - gint scale, + int size, + int scale, gboolean allow_svg) { IconThemeDirSize *min_dir_size; IconThemeFile *min_file; - gint min_difference; + int min_difference; IconCacheFlag min_suffix; int i; @@ -3033,7 +3033,7 @@ theme_lookup_icon (IconTheme *theme, IconThemeDirSize *dir_size = &g_array_index (theme->dir_sizes, IconThemeDirSize, i); IconThemeFile *file; guint best_suffix; - gint difference; + int difference; gpointer file_index; if (!g_hash_table_lookup_extended (dir_size->icon_hash, icon_name, NULL, &file_index)) @@ -3192,11 +3192,11 @@ theme_dir_size_equal (IconThemeDirSize *a, static guint32 theme_ensure_dir_size (IconTheme *theme, IconThemeDirType type, - gint size, - gint min_size, - gint max_size, - gint threshold, - gint scale) + int size, + int min_size, + int max_size, + int threshold, + int scale) { guint32 index; IconThemeDirSize new = { 0 }; @@ -3297,14 +3297,14 @@ theme_subdir_load (GtkIconTheme *self, { gchar *type_string; IconThemeDirType type; - gint size; - gint min_size; - gint max_size; - gint threshold; + int size; + int min_size; + int max_size; + int threshold; GError *error = NULL; guint32 dir_size_index; IconThemeDirSize *dir_size; - gint scale; + int scale; guint i; size = g_key_file_get_integer (theme_file, subdir, "Size", &error); @@ -3717,7 +3717,7 @@ icon_ensure_texture__locked (GtkIconPaintable *icon, { GdkPixbuf *source_pixbuf; gint64 before; - gint pixel_size; + int pixel_size; GError *load_error = NULL; icon_cache_mark_used_if_cached (icon); @@ -4018,8 +4018,8 @@ icon_paintable_init (GdkPaintableInterface *iface) */ GtkIconPaintable * gtk_icon_paintable_new_for_file (GFile *file, - gint size, - gint scale) + int size, + int scale) { GtkIconPaintable *icon; @@ -4052,7 +4052,7 @@ gtk_icon_paintable_new_for_pixbuf (GtkIconTheme *icon_theme, int scale) { GtkIconPaintable *icon; - gint width, height; + int width, height; if (size <= 0) { @@ -4086,8 +4086,8 @@ gtk_icon_paintable_new_for_pixbuf (GtkIconTheme *icon_theme, GtkIconPaintable * gtk_icon_theme_lookup_by_gicon (GtkIconTheme *self, GIcon *gicon, - gint size, - gint scale, + int size, + int scale, GtkTextDirection direction, GtkIconLookupFlags flags) { diff --git a/gtk/gtkicontheme.h b/gtk/gtkicontheme.h index d40a090827..3150230e00 100644 --- a/gtk/gtkicontheme.h +++ b/gtk/gtkicontheme.h @@ -114,27 +114,27 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_icon_theme_has_icon (GtkIconTheme *self, const gchar *icon_name); GDK_AVAILABLE_IN_ALL -gint *gtk_icon_theme_get_icon_sizes (GtkIconTheme *self, +int *gtk_icon_theme_get_icon_sizes (GtkIconTheme *self, const gchar *icon_name); GDK_AVAILABLE_IN_ALL GtkIconPaintable *gtk_icon_theme_lookup_icon (GtkIconTheme *self, const char *icon_name, const char *fallbacks[], - gint size, - gint scale, + int size, + int scale, GtkTextDirection direction, GtkIconLookupFlags flags); GDK_AVAILABLE_IN_ALL GtkIconPaintable *gtk_icon_theme_lookup_by_gicon (GtkIconTheme *self, GIcon *icon, - gint size, - gint scale, + int size, + int scale, GtkTextDirection direction, GtkIconLookupFlags flags); GDK_AVAILABLE_IN_ALL GtkIconPaintable *gtk_icon_paintable_new_for_file (GFile *file, - gint size, - gint scale); + int size, + int scale); GDK_AVAILABLE_IN_ALL char ** gtk_icon_theme_get_icon_names (GtkIconTheme *self); diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index ea63186622..12c789719f 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -202,8 +202,8 @@ static void gtk_icon_view_layout (GtkIco static void gtk_icon_view_snapshot_item (GtkIconView *icon_view, GtkSnapshot *snapshot, GtkIconViewItem *item, - gint x, - gint y, + int x, + int y, gboolean draw_focus); static void gtk_icon_view_snapshot_rubberband (GtkIconView *icon_view, GtkSnapshot *snapshot); @@ -213,16 +213,16 @@ static void gtk_icon_view_queue_draw_item (GtkIco GtkIconViewItem *item); static void gtk_icon_view_start_rubberbanding (GtkIconView *icon_view, GdkDevice *device, - gint x, - gint y); + int x, + int y); static void gtk_icon_view_stop_rubberbanding (GtkIconView *icon_view); static void gtk_icon_view_update_rubberband_selection (GtkIconView *icon_view); static gboolean gtk_icon_view_item_hit_test (GtkIconView *icon_view, GtkIconViewItem *item, - gint x, - gint y, - gint width, - gint height); + int x, + int y, + int width, + int height); static gboolean gtk_icon_view_unselect_all_internal (GtkIconView *icon_view); static void gtk_icon_view_update_rubberband (GtkIconView *icon_view); static void gtk_icon_view_item_invalidate_size (GtkIconViewItem *item); @@ -231,20 +231,20 @@ static void gtk_icon_view_add_move_binding (GtkWid guint keyval, guint modmask, GtkMovementStep step, - gint count); + int count); static gboolean gtk_icon_view_real_move_cursor (GtkIconView *icon_view, GtkMovementStep step, - gint count, + int count, gboolean extend, gboolean modify); static void gtk_icon_view_move_cursor_up_down (GtkIconView *icon_view, - gint count); + int count); static void gtk_icon_view_move_cursor_page_up_down (GtkIconView *icon_view, - gint count); + int count); static void gtk_icon_view_move_cursor_left_right (GtkIconView *icon_view, - gint count); + int count); static void gtk_icon_view_move_cursor_start_end (GtkIconView *icon_view, - gint count); + int count); static void gtk_icon_view_scroll_to_item (GtkIconView *icon_view, GtkIconViewItem *item); static gboolean gtk_icon_view_select_all_between (GtkIconView *icon_view, @@ -1251,7 +1251,7 @@ gtk_icon_view_get_property (GObject *object, /* GtkWidget methods */ -static gint +static int gtk_icon_view_get_n_items (GtkIconView *icon_view) { GtkIconViewPrivate *priv = icon_view->priv; @@ -1267,7 +1267,7 @@ adjust_wrap_width (GtkIconView *icon_view) { if (icon_view->priv->text_cell) { - gint pixbuf_width, wrap_width; + int pixbuf_width, wrap_width; if (icon_view->priv->items && icon_view->priv->pixbuf_cell) { @@ -1341,9 +1341,9 @@ static void cell_area_get_preferred_size (GtkIconView *icon_view, GtkCellAreaContext *context, GtkOrientation orientation, - gint for_size, - gint *minimum, - gint *natural) + int for_size, + int *minimum, + int *natural) { if (orientation == GTK_ORIENTATION_HORIZONTAL) { @@ -1384,9 +1384,9 @@ gtk_icon_view_is_empty (GtkIconView *icon_view) static void gtk_icon_view_get_preferred_item_size (GtkIconView *icon_view, GtkOrientation orientation, - gint for_size, - gint *minimum, - gint *natural) + int for_size, + int *minimum, + int *natural) { GtkIconViewPrivate *priv = icon_view->priv; GtkCellAreaContext *context; @@ -1460,11 +1460,11 @@ gtk_icon_view_get_preferred_item_size (GtkIconView *icon_view, static void gtk_icon_view_compute_n_items_for_size (GtkIconView *icon_view, GtkOrientation orientation, - gint size, - gint *min_items, - gint *min_item_size, - gint *max_items, - gint *max_item_size) + int size, + int *min_items, + int *min_item_size, + int *max_items, + int *max_item_size) { GtkIconViewPrivate *priv = icon_view->priv; int minimum, natural, spacing; @@ -1659,7 +1659,7 @@ gtk_icon_view_snapshot (GtkWidget *widget, GtkIconView *icon_view; GList *icons; GtkTreePath *path; - gint dest_index; + int dest_index; GtkIconViewDropPosition dest_pos; GtkIconViewItem *dest_item = NULL; GtkStyleContext *context; @@ -1784,8 +1784,8 @@ rubberband_scroll_timeout (gpointer data) static GtkIconViewItem * _gtk_icon_view_get_item_at_widget_coords (GtkIconView *icon_view, - gint x, - gint y, + int x, + int y, gboolean only_in_cell, GtkCellRenderer **cell_at_pos) { @@ -1803,7 +1803,7 @@ gtk_icon_view_motion (GtkEventController *controller, gpointer user_data) { GtkIconView *icon_view; - gint abs_y; + int abs_y; GdkDevice *device; icon_view = GTK_ICON_VIEW (user_data); @@ -2303,7 +2303,7 @@ gtk_icon_view_key_pressed (GtkEventControllerKey *controller, static void gtk_icon_view_update_rubberband (GtkIconView *icon_view) { - gint x, y; + int x, y; x = MAX (icon_view->priv->mouse_x, 0); y = MAX (icon_view->priv->mouse_y, 0); @@ -2318,8 +2318,8 @@ gtk_icon_view_update_rubberband (GtkIconView *icon_view) static void gtk_icon_view_start_rubberbanding (GtkIconView *icon_view, GdkDevice *device, - gint x, - gint y) + int x, + int y) { GtkIconViewPrivate *priv = icon_view->priv; GList *items; @@ -2371,7 +2371,7 @@ static void gtk_icon_view_update_rubberband_selection (GtkIconView *icon_view) { GList *items; - gint x, y, width, height; + int x, y, width, height; gboolean dirty = FALSE; x = MIN (icon_view->priv->rubberband_x1, @@ -2430,10 +2430,10 @@ hit_test (GtkCellRenderer *renderer, static gboolean gtk_icon_view_item_hit_test (GtkIconView *icon_view, GtkIconViewItem *item, - gint x, - gint y, - gint width, - gint height) + int x, + int y, + int width, + int height) { HitTestData data = { { x, y, width, height }, FALSE }; GtkCellAreaContext *context; @@ -2699,7 +2699,7 @@ gtk_icon_view_adjustment_changed (GtkAdjustment *adjustment, gtk_widget_queue_draw (GTK_WIDGET (icon_view)); } -static gint +static int compare_sizes (gconstpointer p1, gconstpointer p2, gpointer unused) @@ -2714,9 +2714,9 @@ gtk_icon_view_layout (GtkIconView *icon_view) GtkIconViewPrivate *priv = icon_view->priv; GtkWidget *widget = GTK_WIDGET (icon_view); GList *items; - gint item_width = 0; /* this doesn't include item_padding */ - gint n_columns, n_rows, n_items; - gint col, row; + int item_width = 0; /* this doesn't include item_padding */ + int n_columns, n_rows, n_items; + int col, row; GtkRequestedSize *sizes; gboolean rtl; int width, height; @@ -2855,8 +2855,8 @@ static void gtk_icon_view_snapshot_item (GtkIconView *icon_view, GtkSnapshot *snapshot, GtkIconViewItem *item, - gint x, - gint y, + int x, + int y, gboolean draw_focus) { GdkRectangle cell_area; @@ -2954,7 +2954,7 @@ gtk_icon_view_queue_draw_path (GtkIconView *icon_view, GtkTreePath *path) { GList *l; - gint index; + int index; index = gtk_tree_path_get_indices (path)[0]; @@ -3056,8 +3056,8 @@ gtk_icon_view_item_free (GtkIconViewItem *item) GtkIconViewItem * _gtk_icon_view_get_item_at_coords (GtkIconView *icon_view, - gint x, - gint y, + int x, + int y, gboolean only_in_cell, GtkCellRenderer **cell_at_pos) { @@ -3208,7 +3208,7 @@ gtk_icon_view_row_inserted (GtkTreeModel *model, gpointer data) { GtkIconView *icon_view = GTK_ICON_VIEW (data); - gint index; + int index; GtkIconViewItem *item; GList *list; @@ -3250,7 +3250,7 @@ gtk_icon_view_row_deleted (GtkTreeModel *model, gpointer data) { GtkIconView *icon_view = GTK_ICON_VIEW (data); - gint index; + int index; GtkIconViewItem *item; GList *list, *next; gboolean emit = FALSE; @@ -3306,7 +3306,7 @@ static void gtk_icon_view_rows_reordered (GtkTreeModel *model, GtkTreePath *parent, GtkTreeIter *iter, - gint *new_order, + int *new_order, gpointer data) { GtkIconView *icon_view = GTK_ICON_VIEW (data); @@ -3314,7 +3314,7 @@ gtk_icon_view_rows_reordered (GtkTreeModel *model, int length; GList *items = NULL, *list; GtkIconViewItem **item_array; - gint *order; + int *order; /* ignore changes in branches */ if (iter != NULL) @@ -3325,7 +3325,7 @@ gtk_icon_view_rows_reordered (GtkTreeModel *model, length = gtk_tree_model_iter_n_children (model, NULL); - order = g_new (gint, length); + order = g_new (int, length); for (i = 0; i < length; i++) order [new_order[i]] = i; @@ -3382,7 +3382,7 @@ gtk_icon_view_add_move_binding (GtkWidgetClass *widget_class, guint keyval, guint modmask, GtkMovementStep step, - gint count) + int count) { gtk_widget_class_add_binding_signal (widget_class, @@ -3412,7 +3412,7 @@ gtk_icon_view_add_move_binding (GtkWidgetClass *widget_class, static gboolean gtk_icon_view_real_move_cursor (GtkIconView *icon_view, GtkMovementStep step, - gint count, + int count, gboolean extend, gboolean modify) { @@ -3468,10 +3468,10 @@ gtk_icon_view_real_move_cursor (GtkIconView *icon_view, static GtkIconViewItem * find_item (GtkIconView *icon_view, GtkIconViewItem *current, - gint row_ofs, - gint col_ofs) + int row_ofs, + int col_ofs) { - gint row, col; + int row, col; GList *items; GtkIconViewItem *item; @@ -3493,10 +3493,10 @@ find_item (GtkIconView *icon_view, static GtkIconViewItem * find_item_page_up_down (GtkIconView *icon_view, GtkIconViewItem *current, - gint count) + int count) { GList *item, *next; - gint y, col; + int y, col; col = current->col; y = current->cell_area.y + count * gtk_adjustment_get_page_size (icon_view->priv->vadjustment); @@ -3546,7 +3546,7 @@ gtk_icon_view_select_all_between (GtkIconView *icon_view, { GList *items; GtkIconViewItem *item; - gint row1, row2, col1, col2; + int row1, row2, col1, col2; gboolean dirty = FALSE; if (anchor->row < cursor->row) @@ -3593,12 +3593,12 @@ gtk_icon_view_select_all_between (GtkIconView *icon_view, static void gtk_icon_view_move_cursor_up_down (GtkIconView *icon_view, - gint count) + int count) { GtkIconViewItem *item; GtkCellRenderer *cell = NULL; gboolean dirty = FALSE; - gint step; + int step; GtkDirectionType direction; if (!gtk_widget_has_focus (GTK_WIDGET (icon_view))) @@ -3690,7 +3690,7 @@ gtk_icon_view_move_cursor_up_down (GtkIconView *icon_view, static void gtk_icon_view_move_cursor_page_up_down (GtkIconView *icon_view, - gint count) + int count) { GtkIconViewItem *item; gboolean dirty = FALSE; @@ -3745,12 +3745,12 @@ gtk_icon_view_move_cursor_page_up_down (GtkIconView *icon_view, static void gtk_icon_view_move_cursor_left_right (GtkIconView *icon_view, - gint count) + int count) { GtkIconViewItem *item; GtkCellRenderer *cell = NULL; gboolean dirty = FALSE; - gint step; + int step; GtkDirectionType direction; if (!gtk_widget_has_focus (GTK_WIDGET (icon_view))) @@ -3842,7 +3842,7 @@ gtk_icon_view_move_cursor_left_right (GtkIconView *icon_view, static void gtk_icon_view_move_cursor_start_end (GtkIconView *icon_view, - gint count) + int count) { GtkIconViewItem *item; GList *list; @@ -3952,7 +3952,7 @@ gtk_icon_view_scroll_to_path (GtkIconView *icon_view, if (use_align) { int width, height; - gint x, y; + int x, y; gfloat offset; GdkRectangle item_area = { @@ -3991,7 +3991,7 @@ gtk_icon_view_scroll_to_item (GtkIconView *icon_view, GtkWidget *widget = GTK_WIDGET (icon_view); GtkAdjustment *hadj, *vadj; int widget_width, widget_height; - gint x, y; + int x, y; GdkRectangle item_area; item_area.x = item->cell_area.x - priv->item_padding; @@ -4148,8 +4148,8 @@ gtk_icon_view_new_with_model (GtkTreeModel *model) **/ GtkTreePath * gtk_icon_view_get_path_at_pos (GtkIconView *icon_view, - gint x, - gint y) + int x, + int y) { GtkIconViewItem *item; GtkTreePath *path; @@ -4179,8 +4179,8 @@ gtk_icon_view_get_path_at_pos (GtkIconView *icon_view, **/ gboolean gtk_icon_view_get_item_at_pos (GtkIconView *icon_view, - gint x, - gint y, + int x, + int y, GtkTreePath **path, GtkCellRenderer **cell) { @@ -4336,8 +4336,8 @@ gtk_icon_view_set_tooltip_cell (GtkIconView *icon_view, */ gboolean gtk_icon_view_get_tooltip_context (GtkIconView *icon_view, - gint *x, - gint *y, + int *x, + int *y, gboolean keyboard_tip, GtkTreeModel **model, GtkTreePath **path, @@ -4379,8 +4379,8 @@ gtk_icon_view_get_tooltip_context (GtkIconView *icon_view, static gboolean gtk_icon_view_set_tooltip_query_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) @@ -4433,7 +4433,7 @@ gtk_icon_view_set_tooltip_query_cb (GtkWidget *widget, */ void gtk_icon_view_set_tooltip_column (GtkIconView *icon_view, - gint column) + int column) { g_return_if_fail (GTK_IS_ICON_VIEW (icon_view)); @@ -4471,7 +4471,7 @@ gtk_icon_view_set_tooltip_column (GtkIconView *icon_view, * Returns: the index of the tooltip column that is currently being * used, or -1 if this is disabled. */ -gint +int gtk_icon_view_get_tooltip_column (GtkIconView *icon_view) { g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), 0); @@ -4498,8 +4498,8 @@ gtk_icon_view_get_visible_range (GtkIconView *icon_view, GtkTreePath **start_path, GtkTreePath **end_path) { - gint start_index = -1; - gint end_index = -1; + int start_index = -1; + int end_index = -1; GList *icons; g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), FALSE); @@ -4853,7 +4853,7 @@ update_pixbuf_cell (GtkIconView *icon_view) **/ void gtk_icon_view_set_text_column (GtkIconView *icon_view, - gint column) + int column) { if (column == icon_view->priv->text_column) return; @@ -4888,7 +4888,7 @@ gtk_icon_view_set_text_column (GtkIconView *icon_view, * * Returns: the text column, or -1 if it’s unset. */ -gint +int gtk_icon_view_get_text_column (GtkIconView *icon_view) { g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1); @@ -4908,7 +4908,7 @@ gtk_icon_view_get_text_column (GtkIconView *icon_view) **/ void gtk_icon_view_set_markup_column (GtkIconView *icon_view, - gint column) + int column) { if (column == icon_view->priv->markup_column) return; @@ -4943,7 +4943,7 @@ gtk_icon_view_set_markup_column (GtkIconView *icon_view, * * Returns: the markup column, or -1 if it’s unset. */ -gint +int gtk_icon_view_get_markup_column (GtkIconView *icon_view) { g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1); @@ -4961,7 +4961,7 @@ gtk_icon_view_get_markup_column (GtkIconView *icon_view) **/ void gtk_icon_view_set_pixbuf_column (GtkIconView *icon_view, - gint column) + int column) { if (column == icon_view->priv->pixbuf_column) return; @@ -4997,7 +4997,7 @@ gtk_icon_view_set_pixbuf_column (GtkIconView *icon_view, * * Returns: the pixbuf column, or -1 if it’s unset. */ -gint +int gtk_icon_view_get_pixbuf_column (GtkIconView *icon_view) { g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1); @@ -5190,7 +5190,7 @@ gtk_icon_view_path_is_selected (GtkIconView *icon_view, * * Returns: The row in which the item is displayed */ -gint +int gtk_icon_view_get_item_row (GtkIconView *icon_view, GtkTreePath *path) { @@ -5219,7 +5219,7 @@ gtk_icon_view_get_item_row (GtkIconView *icon_view, * * Returns: The column in which the item is displayed */ -gint +int gtk_icon_view_get_item_column (GtkIconView *icon_view, GtkTreePath *path) { @@ -5321,7 +5321,7 @@ gtk_icon_view_get_item_orientation (GtkIconView *icon_view) */ void gtk_icon_view_set_columns (GtkIconView *icon_view, - gint columns) + int columns) { g_return_if_fail (GTK_IS_ICON_VIEW (icon_view)); @@ -5346,7 +5346,7 @@ gtk_icon_view_set_columns (GtkIconView *icon_view, * * Returns: the number of columns, or -1 */ -gint +int gtk_icon_view_get_columns (GtkIconView *icon_view) { g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1); @@ -5365,7 +5365,7 @@ gtk_icon_view_get_columns (GtkIconView *icon_view) */ void gtk_icon_view_set_item_width (GtkIconView *icon_view, - gint item_width) + int item_width) { g_return_if_fail (GTK_IS_ICON_VIEW (icon_view)); @@ -5392,7 +5392,7 @@ gtk_icon_view_set_item_width (GtkIconView *icon_view, * * Returns: the width of a single item, or -1 */ -gint +int gtk_icon_view_get_item_width (GtkIconView *icon_view) { g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1); @@ -5412,7 +5412,7 @@ gtk_icon_view_get_item_width (GtkIconView *icon_view) */ void gtk_icon_view_set_spacing (GtkIconView *icon_view, - gint spacing) + int spacing) { g_return_if_fail (GTK_IS_ICON_VIEW (icon_view)); @@ -5437,7 +5437,7 @@ gtk_icon_view_set_spacing (GtkIconView *icon_view, * * Returns: the space between cells */ -gint +int gtk_icon_view_get_spacing (GtkIconView *icon_view) { g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1); @@ -5455,7 +5455,7 @@ gtk_icon_view_get_spacing (GtkIconView *icon_view) */ void gtk_icon_view_set_row_spacing (GtkIconView *icon_view, - gint row_spacing) + int row_spacing) { g_return_if_fail (GTK_IS_ICON_VIEW (icon_view)); @@ -5480,7 +5480,7 @@ gtk_icon_view_set_row_spacing (GtkIconView *icon_view, * * Returns: the space between rows */ -gint +int gtk_icon_view_get_row_spacing (GtkIconView *icon_view) { g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1); @@ -5498,7 +5498,7 @@ gtk_icon_view_get_row_spacing (GtkIconView *icon_view) */ void gtk_icon_view_set_column_spacing (GtkIconView *icon_view, - gint column_spacing) + int column_spacing) { g_return_if_fail (GTK_IS_ICON_VIEW (icon_view)); @@ -5523,7 +5523,7 @@ gtk_icon_view_set_column_spacing (GtkIconView *icon_view, * * Returns: the space between columns */ -gint +int gtk_icon_view_get_column_spacing (GtkIconView *icon_view) { g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1); @@ -5542,7 +5542,7 @@ gtk_icon_view_get_column_spacing (GtkIconView *icon_view) */ void gtk_icon_view_set_margin (GtkIconView *icon_view, - gint margin) + int margin) { g_return_if_fail (GTK_IS_ICON_VIEW (icon_view)); @@ -5567,7 +5567,7 @@ gtk_icon_view_set_margin (GtkIconView *icon_view, * * Returns: the space at the borders */ -gint +int gtk_icon_view_get_margin (GtkIconView *icon_view) { g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1); @@ -5585,7 +5585,7 @@ gtk_icon_view_get_margin (GtkIconView *icon_view) */ void gtk_icon_view_set_item_padding (GtkIconView *icon_view, - gint item_padding) + int item_padding) { g_return_if_fail (GTK_IS_ICON_VIEW (icon_view)); @@ -5610,7 +5610,7 @@ gtk_icon_view_set_item_padding (GtkIconView *icon_view, * * Returns: the padding around items */ -gint +int gtk_icon_view_get_item_padding (GtkIconView *icon_view) { g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1); @@ -5756,8 +5756,8 @@ remove_scroll_timeout (GtkIconView *icon_view) static void gtk_icon_view_autoscroll (GtkIconView *icon_view) { - gint px, py, width, height; - gint hoffset, voffset; + int px, py, width, height; + int hoffset, voffset; px = icon_view->priv->event_last_x; py = icon_view->priv->event_last_y; @@ -5794,8 +5794,8 @@ drag_scroll_timeout (gpointer data) static gboolean set_destination (GtkIconView *icon_view, GtkDropTargetAsync *dest, - gint x, - gint y, + int x, + int y, GdkDragAction *suggested_action, GType *target) { @@ -5834,7 +5834,7 @@ set_destination (GtkIconView *icon_view, if (!gtk_icon_view_get_dest_item_at_pos (icon_view, x, y, &path, &pos)) { - gint n_children; + int n_children; GtkTreeModel *model; /* the row got dropped on empty space, let's setup a special case @@ -6473,7 +6473,7 @@ gtk_icon_view_set_drag_dest_item (GtkIconView *icon_view, && gtk_tree_path_get_depth (path) == 1 && gtk_tree_path_get_indices (path)[0] == 0) { - gint n_children; + int n_children; n_children = gtk_tree_model_iter_n_children (icon_view->priv->model, NULL); @@ -6537,8 +6537,8 @@ gtk_icon_view_get_drag_dest_item (GtkIconView *icon_view, **/ gboolean gtk_icon_view_get_dest_item_at_pos (GtkIconView *icon_view, - gint drag_x, - gint drag_y, + int drag_x, + int drag_y, GtkTreePath **path, GtkIconViewDropPosition *pos) { @@ -6602,7 +6602,7 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view, GtkSnapshot *snapshot; GdkPaintable *paintable; GList *l; - gint index; + int index; g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), NULL); g_return_val_if_fail (path != NULL, NULL); diff --git a/gtk/gtkiconview.h b/gtk/gtkiconview.h index 5c2202b262..3125d12ea0 100644 --- a/gtk/gtkiconview.h +++ b/gtk/gtkiconview.h @@ -86,19 +86,19 @@ GDK_AVAILABLE_IN_ALL GtkTreeModel * gtk_icon_view_get_model (GtkIconView *icon_view); GDK_AVAILABLE_IN_ALL void gtk_icon_view_set_text_column (GtkIconView *icon_view, - gint column); + int column); GDK_AVAILABLE_IN_ALL -gint gtk_icon_view_get_text_column (GtkIconView *icon_view); +int gtk_icon_view_get_text_column (GtkIconView *icon_view); GDK_AVAILABLE_IN_ALL void gtk_icon_view_set_markup_column (GtkIconView *icon_view, - gint column); + int column); GDK_AVAILABLE_IN_ALL -gint gtk_icon_view_get_markup_column (GtkIconView *icon_view); +int gtk_icon_view_get_markup_column (GtkIconView *icon_view); GDK_AVAILABLE_IN_ALL void gtk_icon_view_set_pixbuf_column (GtkIconView *icon_view, - gint column); + int column); GDK_AVAILABLE_IN_ALL -gint gtk_icon_view_get_pixbuf_column (GtkIconView *icon_view); +int gtk_icon_view_get_pixbuf_column (GtkIconView *icon_view); GDK_AVAILABLE_IN_ALL void gtk_icon_view_set_item_orientation (GtkIconView *icon_view, @@ -107,48 +107,48 @@ GDK_AVAILABLE_IN_ALL GtkOrientation gtk_icon_view_get_item_orientation (GtkIconView *icon_view); GDK_AVAILABLE_IN_ALL void gtk_icon_view_set_columns (GtkIconView *icon_view, - gint columns); + int columns); GDK_AVAILABLE_IN_ALL -gint gtk_icon_view_get_columns (GtkIconView *icon_view); +int gtk_icon_view_get_columns (GtkIconView *icon_view); GDK_AVAILABLE_IN_ALL void gtk_icon_view_set_item_width (GtkIconView *icon_view, - gint item_width); + int item_width); GDK_AVAILABLE_IN_ALL -gint gtk_icon_view_get_item_width (GtkIconView *icon_view); +int gtk_icon_view_get_item_width (GtkIconView *icon_view); GDK_AVAILABLE_IN_ALL void gtk_icon_view_set_spacing (GtkIconView *icon_view, - gint spacing); + int spacing); GDK_AVAILABLE_IN_ALL -gint gtk_icon_view_get_spacing (GtkIconView *icon_view); +int gtk_icon_view_get_spacing (GtkIconView *icon_view); GDK_AVAILABLE_IN_ALL void gtk_icon_view_set_row_spacing (GtkIconView *icon_view, - gint row_spacing); + int row_spacing); GDK_AVAILABLE_IN_ALL -gint gtk_icon_view_get_row_spacing (GtkIconView *icon_view); +int gtk_icon_view_get_row_spacing (GtkIconView *icon_view); GDK_AVAILABLE_IN_ALL void gtk_icon_view_set_column_spacing (GtkIconView *icon_view, - gint column_spacing); + int column_spacing); GDK_AVAILABLE_IN_ALL -gint gtk_icon_view_get_column_spacing (GtkIconView *icon_view); +int gtk_icon_view_get_column_spacing (GtkIconView *icon_view); GDK_AVAILABLE_IN_ALL void gtk_icon_view_set_margin (GtkIconView *icon_view, - gint margin); + int margin); GDK_AVAILABLE_IN_ALL -gint gtk_icon_view_get_margin (GtkIconView *icon_view); +int gtk_icon_view_get_margin (GtkIconView *icon_view); GDK_AVAILABLE_IN_ALL void gtk_icon_view_set_item_padding (GtkIconView *icon_view, - gint item_padding); + int item_padding); GDK_AVAILABLE_IN_ALL -gint gtk_icon_view_get_item_padding (GtkIconView *icon_view); +int gtk_icon_view_get_item_padding (GtkIconView *icon_view); GDK_AVAILABLE_IN_ALL GtkTreePath * gtk_icon_view_get_path_at_pos (GtkIconView *icon_view, - gint x, - gint y); + int x, + int y); GDK_AVAILABLE_IN_ALL gboolean gtk_icon_view_get_item_at_pos (GtkIconView *icon_view, - gint x, - gint y, + int x, + int y, GtkTreePath **path, GtkCellRenderer **cell); GDK_AVAILABLE_IN_ALL @@ -180,10 +180,10 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_icon_view_path_is_selected (GtkIconView *icon_view, GtkTreePath *path); GDK_AVAILABLE_IN_ALL -gint gtk_icon_view_get_item_row (GtkIconView *icon_view, +int gtk_icon_view_get_item_row (GtkIconView *icon_view, GtkTreePath *path); GDK_AVAILABLE_IN_ALL -gint gtk_icon_view_get_item_column (GtkIconView *icon_view, +int gtk_icon_view_get_item_column (GtkIconView *icon_view, GtkTreePath *path); GDK_AVAILABLE_IN_ALL GList *gtk_icon_view_get_selected_items (GtkIconView *icon_view); @@ -242,8 +242,8 @@ void gtk_icon_view_get_drag_dest_item (GtkIconView GtkIconViewDropPosition *pos); GDK_AVAILABLE_IN_ALL gboolean gtk_icon_view_get_dest_item_at_pos (GtkIconView *icon_view, - gint drag_x, - gint drag_y, + int drag_x, + int drag_y, GtkTreePath **path, GtkIconViewDropPosition *pos); GDK_AVAILABLE_IN_ALL @@ -268,17 +268,17 @@ void gtk_icon_view_set_tooltip_cell (GtkIconView * GtkCellRenderer *cell); GDK_AVAILABLE_IN_ALL gboolean gtk_icon_view_get_tooltip_context (GtkIconView *icon_view, - gint *x, - gint *y, + int *x, + int *y, gboolean keyboard_tip, GtkTreeModel **model, GtkTreePath **path, GtkTreeIter *iter); GDK_AVAILABLE_IN_ALL void gtk_icon_view_set_tooltip_column (GtkIconView *icon_view, - gint column); + int column); GDK_AVAILABLE_IN_ALL -gint gtk_icon_view_get_tooltip_column (GtkIconView *icon_view); +int gtk_icon_view_get_tooltip_column (GtkIconView *icon_view); G_END_DECLS diff --git a/gtk/gtkiconviewprivate.h b/gtk/gtkiconviewprivate.h index 9a12907c64..f059b4223e 100644 --- a/gtk/gtkiconviewprivate.h +++ b/gtk/gtkiconviewprivate.h @@ -30,9 +30,9 @@ struct _GtkIconViewItem { GdkRectangle cell_area; - gint index; + int index; - gint row, col; + int row, col; guint selected : 1; guint selected_before_rubberbanding : 1; @@ -63,7 +63,7 @@ struct _GtkIconViewClass void (* toggle_cursor_item) (GtkIconView *icon_view); gboolean (* move_cursor) (GtkIconView *icon_view, GtkMovementStep step, - gint count, + int count, gboolean extend, gboolean modify); gboolean (* activate_cursor_item) (GtkIconView *icon_view); @@ -80,7 +80,7 @@ struct _GtkIconViewPrivate GPtrArray *row_contexts; - gint width, height; + int width, height; double mouse_x; double mouse_y; @@ -97,14 +97,14 @@ struct _GtkIconViewPrivate GtkAdjustment *hadjustment; GtkAdjustment *vadjustment; - gint rubberband_x1, rubberband_y1; - gint rubberband_x2, rubberband_y2; + int rubberband_x1, rubberband_y1; + int rubberband_x2, rubberband_y2; GdkDevice *rubberband_device; GtkCssNode *rubberband_node; guint scroll_timeout_id; - gint scroll_value_diff; - gint event_last_x, event_last_y; + int scroll_value_diff; + int event_last_x, event_last_y; GtkIconViewItem *anchor_item; GtkIconViewItem *cursor_item; @@ -114,27 +114,27 @@ struct _GtkIconViewPrivate GtkOrientation item_orientation; - gint columns; - gint item_width; - gint spacing; - gint row_spacing; - gint column_spacing; - gint margin; - gint item_padding; + int columns; + int item_width; + int spacing; + int row_spacing; + int column_spacing; + int margin; + int item_padding; - gint text_column; - gint markup_column; - gint pixbuf_column; - gint tooltip_column; + int text_column; + int markup_column; + int pixbuf_column; + int tooltip_column; GtkCellRenderer *pixbuf_cell; GtkCellRenderer *text_cell; /* Drag-and-drop. */ GdkModifierType start_button_mask; - gint pressed_button; - gint press_start_x; - gint press_start_y; + int pressed_button; + int press_start_x; + int press_start_y; GdkContentFormats *source_formats; GtkDropTargetAsync *dest; @@ -181,8 +181,8 @@ void _gtk_icon_view_set_cursor_item (GtkIconView GtkIconViewItem *item, GtkCellRenderer *cursor_cell); GtkIconViewItem * _gtk_icon_view_get_item_at_coords (GtkIconView *icon_view, - gint x, - gint y, + int x, + int y, gboolean only_in_cell, GtkCellRenderer **cell_at_pos); void _gtk_icon_view_select_item (GtkIconView *icon_view, diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index 3a0399e939..f4866cf3ba 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -552,17 +552,17 @@ gtk_image_new_from_gicon (GIcon *icon) typedef struct { GtkImage *image; - gint scale_factor; + int scale_factor; } LoaderData; static void on_loader_size_prepared (GdkPixbufLoader *loader, - gint width, - gint height, + int width, + int height, gpointer user_data) { LoaderData *loader_data = user_data; - gint scale_factor; + int scale_factor; GdkPixbufFormat *format; /* Let the regular icon helper code path handle non-scalable images */ @@ -582,7 +582,7 @@ static GdkPixbufAnimation * load_scalable_with_loader (GtkImage *image, const gchar *file_path, const gchar *resource_path, - gint *scale_factor_out) + int *scale_factor_out) { GdkPixbufLoader *loader; GBytes *bytes; @@ -652,7 +652,7 @@ gtk_image_set_from_file (GtkImage *image, const gchar *filename) { GdkPixbufAnimation *anim; - gint scale_factor; + int scale_factor; GdkTexture *texture; GdkPaintable *scaler; @@ -734,7 +734,7 @@ gtk_image_set_from_resource (GtkImage *image, const gchar *resource_path) { GdkPixbufAnimation *animation; - gint scale_factor = 1; + int scale_factor = 1; GdkTexture *texture; GdkPaintable *scaler; @@ -1288,7 +1288,7 @@ gtk_image_system_setting_changed (GtkWidget *widget, */ void gtk_image_set_pixel_size (GtkImage *image, - gint pixel_size) + int pixel_size) { g_return_if_fail (GTK_IS_IMAGE (image)); @@ -1308,7 +1308,7 @@ gtk_image_set_pixel_size (GtkImage *image, * * Returns: the pixel size used for named icons. */ -gint +int gtk_image_get_pixel_size (GtkImage *image) { g_return_val_if_fail (GTK_IS_IMAGE (image), -1); diff --git a/gtk/gtkimage.h b/gtk/gtkimage.h index 722d40c0bc..4f4e38aa31 100644 --- a/gtk/gtkimage.h +++ b/gtk/gtkimage.h @@ -108,7 +108,7 @@ void gtk_image_set_from_gicon (GtkImage *image, GIcon *icon); GDK_AVAILABLE_IN_ALL void gtk_image_set_pixel_size (GtkImage *image, - gint pixel_size); + int pixel_size); GDK_AVAILABLE_IN_ALL void gtk_image_set_icon_size (GtkImage *image, GtkIconSize icon_size); @@ -124,7 +124,7 @@ const char *gtk_image_get_icon_name (GtkImage *image); GDK_AVAILABLE_IN_ALL GIcon * gtk_image_get_gicon (GtkImage *image); GDK_AVAILABLE_IN_ALL -gint gtk_image_get_pixel_size (GtkImage *image); +int gtk_image_get_pixel_size (GtkImage *image); GDK_AVAILABLE_IN_ALL GtkIconSize gtk_image_get_icon_size (GtkImage *image); diff --git a/gtk/gtkimagedefinition.c b/gtk/gtkimagedefinition.c index 5c2d617164..80f9c68f2f 100644 --- a/gtk/gtkimagedefinition.c +++ b/gtk/gtkimagedefinition.c @@ -26,26 +26,26 @@ typedef struct _GtkImageDefinitionPaintable GtkImageDefinitionPaintable; struct _GtkImageDefinitionEmpty { GtkImageType type; - gint ref_count; + int ref_count; }; struct _GtkImageDefinitionIconName { GtkImageType type; - gint ref_count; + int ref_count; char *icon_name; }; struct _GtkImageDefinitionGIcon { GtkImageType type; - gint ref_count; + int ref_count; GIcon *gicon; }; struct _GtkImageDefinitionPaintable { GtkImageType type; - gint ref_count; + int ref_count; GdkPaintable *paintable; }; @@ -171,7 +171,7 @@ gtk_image_definition_get_storage_type (const GtkImageDefinition *def) return def->type; } -gint +int gtk_image_definition_get_scale (const GtkImageDefinition *def) { switch (def->type) diff --git a/gtk/gtkimagedefinitionprivate.h b/gtk/gtkimagedefinitionprivate.h index fc77fe1594..6471901f1a 100644 --- a/gtk/gtkimagedefinitionprivate.h +++ b/gtk/gtkimagedefinitionprivate.h @@ -34,7 +34,7 @@ GtkImageDefinition * gtk_image_definition_ref (GtkImageDefinit void gtk_image_definition_unref (GtkImageDefinition *def); GtkImageType gtk_image_definition_get_storage_type (const GtkImageDefinition *def); -gint gtk_image_definition_get_scale (const GtkImageDefinition *def); +int gtk_image_definition_get_scale (const GtkImageDefinition *def); const gchar * gtk_image_definition_get_icon_name (const GtkImageDefinition *def); GIcon * gtk_image_definition_get_gicon (const GtkImageDefinition *def); GdkPaintable * gtk_image_definition_get_paintable (const GtkImageDefinition *def); diff --git a/gtk/gtkimcontext.c b/gtk/gtkimcontext.c index 0ccca3bb03..a7b419435b 100644 --- a/gtk/gtkimcontext.c +++ b/gtk/gtkimcontext.c @@ -125,16 +125,16 @@ struct _GtkIMContextPrivate { static void gtk_im_context_real_get_preedit_string (GtkIMContext *context, gchar **str, PangoAttrList **attrs, - gint *cursor_pos); + int *cursor_pos); static gboolean gtk_im_context_real_filter_keypress (GtkIMContext *context, GdkEvent *event); static gboolean gtk_im_context_real_get_surrounding (GtkIMContext *context, gchar **text, - gint *cursor_index); + int *cursor_index); static void gtk_im_context_real_set_surrounding (GtkIMContext *context, const char *text, - gint len, - gint cursor_index); + int len, + int cursor_index); static void gtk_im_context_get_property (GObject *obj, guint property_id, @@ -360,7 +360,7 @@ static void gtk_im_context_real_get_preedit_string (GtkIMContext *context, gchar **str, PangoAttrList **attrs, - gint *cursor_pos) + int *cursor_pos) { if (str) *str = g_strdup (""); @@ -380,14 +380,14 @@ gtk_im_context_real_filter_keypress (GtkIMContext *context, typedef struct { gchar *text; - gint cursor_index; + int cursor_index; } SurroundingInfo; static void gtk_im_context_real_set_surrounding (GtkIMContext *context, const gchar *text, - gint len, - gint cursor_index) + int len, + int cursor_index) { SurroundingInfo *info = g_object_get_data (G_OBJECT (context), "gtk-im-surrounding-info"); @@ -403,7 +403,7 @@ gtk_im_context_real_set_surrounding (GtkIMContext *context, static gboolean gtk_im_context_real_get_surrounding (GtkIMContext *context, gchar **text, - gint *cursor_index) + int *cursor_index) { gboolean result; gboolean info_is_local = FALSE; @@ -486,7 +486,7 @@ void gtk_im_context_get_preedit_string (GtkIMContext *context, gchar **str, PangoAttrList **attrs, - gint *cursor_pos) + int *cursor_pos) { GtkIMContextClass *klass; @@ -743,8 +743,8 @@ gtk_im_context_set_use_preedit (GtkIMContext *context, void gtk_im_context_set_surrounding (GtkIMContext *context, const gchar *text, - gint len, - gint cursor_index) + int len, + int cursor_index) { GtkIMContextClass *klass; @@ -792,11 +792,11 @@ gtk_im_context_set_surrounding (GtkIMContext *context, gboolean gtk_im_context_get_surrounding (GtkIMContext *context, gchar **text, - gint *cursor_index) + int *cursor_index) { GtkIMContextClass *klass; gchar *local_text = NULL; - gint local_index; + int local_index; gboolean result = FALSE; g_return_val_if_fail (GTK_IS_IM_CONTEXT (context), FALSE); @@ -841,8 +841,8 @@ gtk_im_context_get_surrounding (GtkIMContext *context, **/ gboolean gtk_im_context_delete_surrounding (GtkIMContext *context, - gint offset, - gint n_chars) + int offset, + int n_chars) { gboolean result; diff --git a/gtk/gtkimcontext.h b/gtk/gtkimcontext.h index fee5cf2046..23c00f9809 100644 --- a/gtk/gtkimcontext.h +++ b/gtk/gtkimcontext.h @@ -57,8 +57,8 @@ struct _GtkIMContextClass void (*commit) (GtkIMContext *context, const gchar *str); gboolean (*retrieve_surrounding) (GtkIMContext *context); gboolean (*delete_surrounding) (GtkIMContext *context, - gint offset, - gint n_chars); + int offset, + int n_chars); /* Virtual functions */ void (*set_client_widget) (GtkIMContext *context, @@ -66,7 +66,7 @@ struct _GtkIMContextClass void (*get_preedit_string) (GtkIMContext *context, gchar **str, PangoAttrList **attrs, - gint *cursor_pos); + int *cursor_pos); gboolean (*filter_keypress) (GtkIMContext *context, GdkEvent *event); void (*focus_in) (GtkIMContext *context); @@ -78,11 +78,11 @@ struct _GtkIMContextClass gboolean use_preedit); void (*set_surrounding) (GtkIMContext *context, const gchar *text, - gint len, - gint cursor_index); + int len, + int cursor_index); gboolean (*get_surrounding) (GtkIMContext *context, gchar **text, - gint *cursor_index); + int *cursor_index); /*< private >*/ /* Padding for future expansion */ void (*_gtk_reserved1) (void); @@ -103,7 +103,7 @@ GDK_AVAILABLE_IN_ALL void gtk_im_context_get_preedit_string (GtkIMContext *context, gchar **str, PangoAttrList **attrs, - gint *cursor_pos); + int *cursor_pos); GDK_AVAILABLE_IN_ALL gboolean gtk_im_context_filter_keypress (GtkIMContext *context, GdkEvent *event); @@ -133,16 +133,16 @@ void gtk_im_context_set_use_preedit (GtkIMContext *context, GDK_AVAILABLE_IN_ALL void gtk_im_context_set_surrounding (GtkIMContext *context, const gchar *text, - gint len, - gint cursor_index); + int len, + int cursor_index); GDK_AVAILABLE_IN_ALL gboolean gtk_im_context_get_surrounding (GtkIMContext *context, gchar **text, - gint *cursor_index); + int *cursor_index); GDK_AVAILABLE_IN_ALL gboolean gtk_im_context_delete_surrounding (GtkIMContext *context, - gint offset, - gint n_chars); + int offset, + int n_chars); G_END_DECLS diff --git a/gtk/gtkimcontextime.c b/gtk/gtkimcontextime.c index 8069632e88..b337e52325 100644 --- a/gtk/gtkimcontextime.c +++ b/gtk/gtkimcontextime.c @@ -103,7 +103,7 @@ static void gtk_im_context_ime_reset (GtkIMContext *context); static void gtk_im_context_ime_get_preedit_string (GtkIMContext *context, gchar **str, PangoAttrList **attrs, - gint *cursor_pos); + int *cursor_pos); static void gtk_im_context_ime_focus_in (GtkIMContext *context); static void gtk_im_context_ime_focus_out (GtkIMContext *context); static void gtk_im_context_ime_set_cursor_location (GtkIMContext *context, @@ -117,11 +117,11 @@ static void gtk_im_context_ime_set_preedit_font (GtkIMContext *context); static GdkWin32MessageFilterReturn gtk_im_context_ime_message_filter (GdkWin32Display *display, MSG *msg, - gint *ret_valp, + int *ret_valp, gpointer data); static void get_window_position (GdkSurface *win, - gint *x, - gint *y); + int *x, + int *y); G_DEFINE_TYPE_WITH_CODE (GtkIMContextIME, gtk_im_context_ime, GTK_TYPE_IM_CONTEXT, gtk_im_module_ensure_extension_point (); @@ -441,12 +441,12 @@ gtk_im_context_ime_reset (GtkIMContext *context) static gchar * -get_utf8_preedit_string (GtkIMContextIME *context_ime, gint *pos_ret) +get_utf8_preedit_string (GtkIMContextIME *context_ime, int *pos_ret) { gchar *utf8str = NULL; HWND hwnd; HIMC himc; - gint pos = 0; + int pos = 0; if (pos_ret) *pos_ret = 0; @@ -632,10 +632,10 @@ static void gtk_im_context_ime_get_preedit_string (GtkIMContext *context, gchar **str, PangoAttrList **attrs, - gint *cursor_pos) + int *cursor_pos) { gchar *utf8str = NULL; - gint pos = 0; + int pos = 0; GtkIMContextIME *context_ime; context_ime = GTK_IM_CONTEXT_IME (context); @@ -799,7 +799,7 @@ static void gtk_im_context_ime_set_cursor_location (GtkIMContext *context, GdkRectangle *area) { - gint wx = 0, wy = 0; + int wx = 0, wy = 0; GtkIMContextIME *context_ime; COMPOSITIONFORM cf; HWND hwnd; @@ -974,7 +974,7 @@ ERROR_OUT: static GdkWin32MessageFilterReturn gtk_im_context_ime_message_filter (GdkWin32Display *display, MSG *msg, - gint *ret_valp, + int *ret_valp, gpointer data) { GtkIMContext *context; @@ -1006,7 +1006,7 @@ gtk_im_context_ime_message_filter (GdkWin32Display *display, { case WM_IME_COMPOSITION: { - gint wx = 0, wy = 0; + int wx = 0, wy = 0; CANDIDATEFORM cf; get_window_position (context_ime->client_surface, &wx, &wy); @@ -1111,7 +1111,7 @@ gtk_im_context_ime_message_filter (GdkWin32Display *display, * x and y must be initialized to 0. */ static void -get_window_position (GdkSurface *surface, gint *x, gint *y) +get_window_position (GdkSurface *surface, int *x, int *y) { GdkSurface *parent, *toplevel; diff --git a/gtk/gtkimcontextquartz.c b/gtk/gtkimcontextquartz.c index c56c998ea7..4717c1df9d 100644 --- a/gtk/gtkimcontextquartz.c +++ b/gtk/gtkimcontextquartz.c @@ -61,7 +61,7 @@ static void quartz_get_preedit_string (GtkIMContext *context, gchar **str, PangoAttrList **attrs, - gint *cursor_pos) + int *cursor_pos) { GtkIMContextQuartz *qc = GTK_IM_CONTEXT_QUARTZ (context); @@ -288,7 +288,7 @@ static void quartz_set_cursor_location (GtkIMContext *context, GdkRectangle *area) { GtkIMContextQuartz *qc = GTK_IM_CONTEXT_QUARTZ (context); - gint x, y; + int x, y; NSView *nsview; GdkSurface *surface; diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c index 17e8f68505..c3681715ee 100644 --- a/gtk/gtkimcontextsimple.c +++ b/gtk/gtkimcontextsimple.c @@ -63,7 +63,7 @@ struct _GtkIMContextSimplePrivate { guint16 compose_buffer[GTK_MAX_COMPOSE_LEN + 1]; gunichar tentative_match; - gint tentative_match_len; + int tentative_match_len; guint in_hex_sequence : 1; guint modifiers_dropped : 1; @@ -110,7 +110,7 @@ static void gtk_im_context_simple_reset (GtkIMContext static void gtk_im_context_simple_get_preedit_string (GtkIMContext *context, gchar **str, PangoAttrList **attrs, - gint *cursor_pos); + int *cursor_pos); static void init_compose_table_async (GCancellable *cancellable, GAsyncReadyCallback callback, @@ -301,7 +301,7 @@ gtk_im_context_simple_commit_char (GtkIMContext *context, GtkIMContextSimple *context_simple = GTK_IM_CONTEXT_SIMPLE (context); GtkIMContextSimplePrivate *priv = context_simple->priv; gchar buf[10]; - gint len; + int len; g_return_if_fail (g_unichar_validate (ch)); @@ -357,10 +357,10 @@ compare_seq (const void *key, const void *value) static gboolean check_table (GtkIMContextSimple *context_simple, const GtkComposeTable *table, - gint n_compose) + int n_compose) { GtkIMContextSimplePrivate *priv = context_simple->priv; - gint row_stride = table->max_seq_len + 2; + int row_stride = table->max_seq_len + 2; guint16 *seq; /* Will never match, if the sequence in the compose buffer is longer @@ -436,15 +436,15 @@ check_table (GtkIMContextSimple *context_simple, gboolean gtk_check_compact_table (const GtkComposeTableCompact *table, guint16 *compose_buffer, - gint n_compose, + int n_compose, gboolean *compose_finish, gboolean *compose_match, gunichar *output_char) { - gint row_stride; + int row_stride; guint16 *seq_index; guint16 *seq; - gint i; + int i; gboolean match; gunichar value; @@ -537,14 +537,14 @@ gtk_check_compact_table (const GtkComposeTableCompact *table, * permutations of the diacritic marks, then attempt to normalize. */ static gboolean -check_normalize_nfc (gunichar* combination_buffer, gint n_compose) +check_normalize_nfc (gunichar* combination_buffer, int n_compose) { gunichar combination_buffer_temp[GTK_MAX_COMPOSE_LEN]; gchar *combination_utf8_temp = NULL; gchar *nfc_temp = NULL; - gint n_combinations; + int n_combinations; gunichar temp_swap; - gint i; + int i; n_combinations = 1; @@ -598,11 +598,11 @@ check_normalize_nfc (gunichar* combination_buffer, gint n_compose) gboolean gtk_check_algorithmically (const guint16 *compose_buffer, - gint n_compose, + int n_compose, gunichar *output_char) { - gint i; + int i; gunichar combination_buffer[GTK_MAX_COMPOSE_LEN]; gchar *combination_utf8, *nfc; @@ -705,11 +705,11 @@ gtk_check_algorithmically (const guint16 *compose_buffer, static gboolean check_hex (GtkIMContextSimple *context_simple, - gint n_compose) + int n_compose) { GtkIMContextSimplePrivate *priv = context_simple->priv; /* See if this is a hex sequence, return TRUE if so */ - gint i; + int i; GString *str; gulong n; gchar *nptr = NULL; @@ -778,7 +778,7 @@ beep_surface (GdkSurface *surface) static gboolean no_sequence_matches (GtkIMContextSimple *context_simple, - gint n_compose, + int n_compose, GdkEvent *event) { GtkIMContextSimplePrivate *priv = context_simple->priv; @@ -793,7 +793,7 @@ no_sequence_matches (GtkIMContextSimple *context_simple, */ if (priv->tentative_match) { - gint len = priv->tentative_match_len; + int len = priv->tentative_match_len; int i; gtk_im_context_simple_commit_char (context, priv->tentative_match); @@ -859,8 +859,8 @@ canonical_hex_keyval (GdkEvent *event) { guint keyval, event_keyval; guint *keyvals = NULL; - gint n_vals = 0; - gint i; + int n_vals = 0; + int i; event_keyval = gdk_key_event_get_keyval (event); @@ -1216,7 +1216,7 @@ static void gtk_im_context_simple_get_preedit_string (GtkIMContext *context, gchar **str, PangoAttrList **attrs, - gint *cursor_pos) + int *cursor_pos) { GtkIMContextSimple *context_simple = GTK_IM_CONTEXT_SIMPLE (context); GtkIMContextSimplePrivate *priv = context_simple->priv; @@ -1285,8 +1285,8 @@ gtk_im_context_simple_get_preedit_string (GtkIMContext *context, void gtk_im_context_simple_add_table (GtkIMContextSimple *context_simple, guint16 *data, - gint max_seq_len, - gint n_seqs) + int max_seq_len, + int n_seqs) { g_return_if_fail (GTK_IS_IM_CONTEXT_SIMPLE (context_simple)); diff --git a/gtk/gtkimcontextsimple.h b/gtk/gtkimcontextsimple.h index b62cf8c183..f03e7e56b2 100644 --- a/gtk/gtkimcontextsimple.h +++ b/gtk/gtkimcontextsimple.h @@ -67,8 +67,8 @@ GtkIMContext *gtk_im_context_simple_new (void); GDK_AVAILABLE_IN_ALL void gtk_im_context_simple_add_table (GtkIMContextSimple *context_simple, guint16 *data, - gint max_seq_len, - gint n_seqs); + int max_seq_len, + int n_seqs); GDK_AVAILABLE_IN_ALL void gtk_im_context_simple_add_compose_file (GtkIMContextSimple *context_simple, const gchar *compose_file); diff --git a/gtk/gtkimcontextsimpleprivate.h b/gtk/gtkimcontextsimpleprivate.h index 401156a84e..5b79ed2f44 100644 --- a/gtk/gtkimcontextsimpleprivate.h +++ b/gtk/gtkimcontextsimpleprivate.h @@ -27,11 +27,11 @@ G_BEGIN_DECLS extern const GtkComposeTableCompact gtk_compose_table_compact; gboolean gtk_check_algorithmically (const guint16 *compose_buffer, - gint n_compose, + int n_compose, gunichar *output); gboolean gtk_check_compact_table (const GtkComposeTableCompact *table, guint16 *compose_buffer, - gint n_compose, + int n_compose, gboolean *compose_finish, gboolean *compose_match, gunichar *output_char); diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c index f76f183fd2..d9144e30fd 100644 --- a/gtk/gtkimcontextwayland.c +++ b/gtk/gtkimcontextwayland.c @@ -56,8 +56,8 @@ struct _GtkIMContextWaylandClass struct preedit { gchar *text; - gint cursor_begin; - gint cursor_end; + int cursor_begin; + int cursor_end; }; struct surrounding_delete { @@ -76,8 +76,8 @@ struct _GtkIMContextWayland struct { gchar *text; - gint cursor_idx; - gint anchor_idx; + int cursor_idx; + int anchor_idx; } surrounding; enum zwp_text_input_v3_change_cause surrounding_change; @@ -143,8 +143,8 @@ static void text_input_preedit (void *data, struct zwp_text_input_v3 *text_input, const char *text, - gint cursor_begin, - gint cursor_end) + int cursor_begin, + int cursor_end) { GtkIMContextWayland *context; GtkIMContextWaylandGlobal *global = data; @@ -240,7 +240,7 @@ text_input_delete_surrounding_text_apply (GtkIMContextWaylandGlobal *global, { GtkIMContextWayland *context; gboolean retval; - gint len; + int len; struct surrounding_delete defaults = {0}; context = GTK_IM_CONTEXT_WAYLAND (global->current); @@ -492,7 +492,7 @@ gtk_im_context_wayland_finalize (GObject *object) static void pressed_cb (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkIMContextWayland *context) @@ -506,7 +506,7 @@ pressed_cb (GtkGestureClick *gesture, static void released_cb (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkIMContextWayland *context) @@ -572,7 +572,7 @@ static void gtk_im_context_wayland_get_preedit_string (GtkIMContext *context, gchar **str, PangoAttrList **attrs, - gint *cursor_pos) + int *cursor_pos) { GtkIMContextWayland *context_wayland = GTK_IM_CONTEXT_WAYLAND (context); const char *preedit_str; @@ -859,8 +859,8 @@ gtk_im_context_wayland_set_use_preedit (GtkIMContext *context, static void gtk_im_context_wayland_set_surrounding (GtkIMContext *context, const gchar *text, - gint len, - gint cursor_index) + int len, + int cursor_index) { GtkIMContextWayland *context_wayland; @@ -883,7 +883,7 @@ gtk_im_context_wayland_set_surrounding (GtkIMContext *context, static gboolean gtk_im_context_wayland_get_surrounding (GtkIMContext *context, gchar **text, - gint *cursor_index) + int *cursor_index) { GtkIMContextWayland *context_wayland; diff --git a/gtk/gtkimmulticontext.c b/gtk/gtkimmulticontext.c index b503406122..413737b6d3 100644 --- a/gtk/gtkimmulticontext.c +++ b/gtk/gtkimmulticontext.c @@ -64,7 +64,7 @@ static void gtk_im_multicontext_set_client_widget (GtkIMContext static void gtk_im_multicontext_get_preedit_string (GtkIMContext *context, gchar **str, PangoAttrList **attrs, - gint *cursor_pos); + int *cursor_pos); static gboolean gtk_im_multicontext_filter_keypress (GtkIMContext *context, GdkEvent *event); static void gtk_im_multicontext_focus_in (GtkIMContext *context); @@ -76,11 +76,11 @@ static void gtk_im_multicontext_set_use_preedit (GtkIMContext gboolean use_preedit); static gboolean gtk_im_multicontext_get_surrounding (GtkIMContext *context, gchar **text, - gint *cursor_index); + int *cursor_index); static void gtk_im_multicontext_set_surrounding (GtkIMContext *context, const char *text, - gint len, - gint cursor_index); + int len, + int cursor_index); static void gtk_im_multicontext_preedit_start_cb (GtkIMContext *delegate, GtkIMMulticontext *multicontext); @@ -94,8 +94,8 @@ static void gtk_im_multicontext_commit_cb (GtkIMContext * static gboolean gtk_im_multicontext_retrieve_surrounding_cb (GtkIMContext *delegate, GtkIMMulticontext *multicontext); static gboolean gtk_im_multicontext_delete_surrounding_cb (GtkIMContext *delegate, - gint offset, - gint n_chars, + int offset, + int n_chars, GtkIMMulticontext *multicontext); static void propagate_purpose (GtkIMMulticontext *context); @@ -331,7 +331,7 @@ static void gtk_im_multicontext_get_preedit_string (GtkIMContext *context, gchar **str, PangoAttrList **attrs, - gint *cursor_pos) + int *cursor_pos) { GtkIMMulticontext *multicontext = GTK_IM_MULTICONTEXT (context); GtkIMContext *delegate = gtk_im_multicontext_get_delegate (multicontext); @@ -376,7 +376,7 @@ gtk_im_multicontext_filter_keypress (GtkIMContext *context, ch = gdk_keyval_to_unicode (keyval); if (ch != 0 && !g_unichar_iscntrl (ch)) { - gint len; + int len; gchar buf[10]; len = g_unichar_to_utf8 (ch, buf); @@ -462,7 +462,7 @@ gtk_im_multicontext_set_use_preedit (GtkIMContext *context, static gboolean gtk_im_multicontext_get_surrounding (GtkIMContext *context, gchar **text, - gint *cursor_index) + int *cursor_index) { GtkIMMulticontext *multicontext = GTK_IM_MULTICONTEXT (context); GtkIMContext *delegate = gtk_im_multicontext_get_delegate (multicontext); @@ -483,8 +483,8 @@ gtk_im_multicontext_get_surrounding (GtkIMContext *context, static void gtk_im_multicontext_set_surrounding (GtkIMContext *context, const char *text, - gint len, - gint cursor_index) + int len, + int cursor_index) { GtkIMMulticontext *multicontext = GTK_IM_MULTICONTEXT (context); GtkIMContext *delegate = gtk_im_multicontext_get_delegate (multicontext); @@ -535,8 +535,8 @@ gtk_im_multicontext_retrieve_surrounding_cb (GtkIMContext *delegate, static gboolean gtk_im_multicontext_delete_surrounding_cb (GtkIMContext *delegate, - gint offset, - gint n_chars, + int offset, + int n_chars, GtkIMMulticontext *multicontext) { gboolean result; diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c index 775ba0b6da..2ddaa3e839 100644 --- a/gtk/gtkinfobar.c +++ b/gtk/gtkinfobar.c @@ -157,7 +157,7 @@ struct _GtkInfoBarClass { GtkWidgetClass parent_class; - void (* response) (GtkInfoBar *info_bar, gint response_id); + void (* response) (GtkInfoBar *info_bar, int response_id); void (* close) (GtkInfoBar *info_bar); }; @@ -298,7 +298,7 @@ clear_response_data (GtkWidget *widget) static GtkWidget * find_button (GtkInfoBar *info_bar, - gint response_id) + int response_id) { GtkWidget *child; @@ -501,7 +501,7 @@ gtk_info_bar_buildable_interface_init (GtkBuildableIface *iface) iface->custom_finished = gtk_info_bar_buildable_custom_finished; } -static gint +static int get_response_for_widget (GtkInfoBar *info_bar, GtkWidget *widget) { @@ -518,7 +518,7 @@ static void action_widget_activated (GtkWidget *widget, GtkInfoBar *info_bar) { - gint response_id; + int response_id; response_id = get_response_for_widget (info_bar, widget); gtk_info_bar_response (info_bar, response_id); @@ -538,7 +538,7 @@ action_widget_activated (GtkWidget *widget, void gtk_info_bar_add_action_widget (GtkInfoBar *info_bar, GtkWidget *child, - gint response_id) + int response_id) { ResponseData *ad; guint signal_id; @@ -610,7 +610,7 @@ gtk_info_bar_remove_action_widget (GtkInfoBar *info_bar, GtkWidget* gtk_info_bar_add_button (GtkInfoBar *info_bar, const gchar *button_text, - gint response_id) + int response_id) { GtkWidget *button; @@ -633,7 +633,7 @@ add_buttons_valist (GtkInfoBar *info_bar, va_list args) { const gchar* text; - gint response_id; + int response_id; g_return_if_fail (GTK_IS_INFO_BAR (info_bar)); @@ -641,7 +641,7 @@ add_buttons_valist (GtkInfoBar *info_bar, return; text = first_button_text; - response_id = va_arg (args, gint); + response_id = va_arg (args, int); while (text != NULL) { @@ -749,7 +749,7 @@ update_default_response (GtkInfoBar *info_bar, */ void gtk_info_bar_set_response_sensitive (GtkInfoBar *info_bar, - gint response_id, + int response_id, gboolean setting) { GtkWidget *child; @@ -784,7 +784,7 @@ gtk_info_bar_set_response_sensitive (GtkInfoBar *info_bar, */ void gtk_info_bar_set_default_response (GtkInfoBar *info_bar, - gint response_id) + int response_id) { GtkWidget *child; GtkWidget *window; @@ -820,7 +820,7 @@ gtk_info_bar_set_default_response (GtkInfoBar *info_bar, */ void gtk_info_bar_response (GtkInfoBar *info_bar, - gint response_id) + int response_id) { g_return_if_fail (GTK_IS_INFO_BAR (info_bar)); @@ -830,9 +830,9 @@ gtk_info_bar_response (GtkInfoBar *info_bar, typedef struct { gchar *name; - gint response_id; - gint line; - gint col; + int response_id; + int line; + int col; } ActionWidgetInfo; typedef struct @@ -840,11 +840,11 @@ typedef struct GtkInfoBar *info_bar; GtkBuilder *builder; GSList *items; - gint response_id; + int response_id; gboolean is_text; GString *string; - gint line; - gint col; + int line; + int col; } SubParserData; static void diff --git a/gtk/gtkinfobar.h b/gtk/gtkinfobar.h index 834ec197b9..528a1250de 100644 --- a/gtk/gtkinfobar.h +++ b/gtk/gtkinfobar.h @@ -56,14 +56,14 @@ GtkWidget *gtk_info_bar_new_with_buttons (const gchar *first_button GDK_AVAILABLE_IN_ALL void gtk_info_bar_add_action_widget (GtkInfoBar *info_bar, GtkWidget *child, - gint response_id); + int response_id); GDK_AVAILABLE_IN_ALL void gtk_info_bar_remove_action_widget (GtkInfoBar *info_bar, GtkWidget *widget); GDK_AVAILABLE_IN_ALL GtkWidget *gtk_info_bar_add_button (GtkInfoBar *info_bar, const gchar *button_text, - gint response_id); + int response_id); GDK_AVAILABLE_IN_ALL void gtk_info_bar_add_buttons (GtkInfoBar *info_bar, const gchar *first_button_text, @@ -77,15 +77,15 @@ void gtk_info_bar_remove_child (GtkInfoBar *info_bar, GDK_AVAILABLE_IN_ALL void gtk_info_bar_set_response_sensitive (GtkInfoBar *info_bar, - gint response_id, + int response_id, gboolean setting); GDK_AVAILABLE_IN_ALL void gtk_info_bar_set_default_response (GtkInfoBar *info_bar, - gint response_id); + int response_id); GDK_AVAILABLE_IN_ALL void gtk_info_bar_response (GtkInfoBar *info_bar, - gint response_id); + int response_id); GDK_AVAILABLE_IN_ALL void gtk_info_bar_set_message_type (GtkInfoBar *info_bar, diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index a42ff5a29d..5003ba51ae 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -283,9 +283,9 @@ struct _GtkLabel guint mnemonic_keyval; - gint width_chars; - gint max_width_chars; - gint lines; + int width_chars; + int max_width_chars; + int lines; }; struct _GtkLabelClass @@ -294,7 +294,7 @@ struct _GtkLabelClass void (* move_cursor) (GtkLabel *self, GtkMovementStep step, - gint count, + int count, gboolean extend_selection); void (* copy_clipboard) (GtkLabel *self); @@ -338,14 +338,14 @@ typedef struct gboolean visited; /* get set when the link is activated; this flag * gets preserved over later set_markup() calls */ - gint start; /* position of the link in the PangoLayout */ - gint end; + int start; /* position of the link in the PangoLayout */ + int end; } GtkLabelLink; struct _GtkLabelSelectionInfo { - gint selection_anchor; - gint selection_end; + int selection_anchor; + int selection_end; GtkCssNode *selection_node; GdkContentProvider *provider; @@ -358,8 +358,8 @@ struct _GtkLabelSelectionInfo GtkGesture *click_gesture; GtkEventController *motion_controller; - gint drag_start_x; - gint drag_start_y; + int drag_start_x; + int drag_start_y; guint in_drag : 1; guint select_words : 1; @@ -439,8 +439,8 @@ static void gtk_label_leave (GtkEventControllerMotion *controller, static gboolean gtk_label_grab_focus (GtkWidget *widget); static gboolean gtk_label_query_tooltip (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip); @@ -471,8 +471,8 @@ static void gtk_label_update_cursor (GtkLabel *self); static void gtk_label_clear_layout (GtkLabel *self); static void gtk_label_ensure_layout (GtkLabel *self); static void gtk_label_select_region_index (GtkLabel *self, - gint anchor_index, - gint end_index); + int anchor_index, + int end_index); static void gtk_label_update_active_link (GtkWidget *widget, gdouble x, @@ -499,14 +499,14 @@ static void gtk_label_buildable_custom_finished (GtkBuildable *builda /* For selectable labels: */ static void gtk_label_move_cursor (GtkLabel *self, GtkMovementStep step, - gint count, + int count, gboolean extend_selection); static void gtk_label_copy_clipboard (GtkLabel *self); static void gtk_label_select_all (GtkLabel *self); -static gint gtk_label_move_forward_word (GtkLabel *self, - gint start); -static gint gtk_label_move_backward_word (GtkLabel *self, - gint start); +static int gtk_label_move_forward_word (GtkLabel *self, + int start); +static int gtk_label_move_backward_word (GtkLabel *self, + int start); /* For links: */ static void gtk_label_clear_links (GtkLabel *self); @@ -518,12 +518,12 @@ static void emit_activate_link (GtkLabel *self, /* Event controller callbacks */ static void gtk_label_click_gesture_pressed (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkLabel *self); static void gtk_label_click_gesture_released (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkLabel *self); @@ -578,7 +578,7 @@ add_move_binding (GtkWidgetClass *widget_class, guint keyval, guint modmask, GtkMovementStep step, - gint count) + int count) { g_return_if_fail ((modmask & GDK_SHIFT_MASK) == 0); @@ -1936,9 +1936,9 @@ start_element_handler (GMarkupParseContext *context, const gchar *title = NULL; const gchar *class = NULL; gboolean visited = FALSE; - gint line_number; - gint char_number; - gint i; + int line_number; + int char_number; + int i; GtkCssNode *widget_node; GtkStateFlags state; @@ -2019,7 +2019,7 @@ start_element_handler (GMarkupParseContext *context, } else { - gint i; + int i; g_string_append_c (pdata->new_str, '<'); g_string_append (pdata->new_str, element_name); @@ -2567,7 +2567,7 @@ gtk_label_get_ellipsize (GtkLabel *self) **/ void gtk_label_set_width_chars (GtkLabel *self, - gint n_chars) + int n_chars) { g_return_if_fail (GTK_IS_LABEL (self)); @@ -2588,7 +2588,7 @@ gtk_label_set_width_chars (GtkLabel *self, * * Returns: the width of the label in characters. **/ -gint +int gtk_label_get_width_chars (GtkLabel *self) { g_return_val_if_fail (GTK_IS_LABEL (self), -1); @@ -2605,7 +2605,7 @@ gtk_label_get_width_chars (GtkLabel *self) **/ void gtk_label_set_max_width_chars (GtkLabel *self, - gint n_chars) + int n_chars) { g_return_if_fail (GTK_IS_LABEL (self)); @@ -2627,7 +2627,7 @@ gtk_label_set_max_width_chars (GtkLabel *self, * * Returns: the maximum width of the label in characters. **/ -gint +int gtk_label_get_max_width_chars (GtkLabel *self) { g_return_val_if_fail (GTK_IS_LABEL (self), -1); @@ -2970,14 +2970,14 @@ gtk_label_get_request_mode (GtkWidget *widget) static void get_height_for_width (GtkLabel *self, - gint width, - gint *minimum_height, - gint *natural_height, - gint *minimum_baseline, - gint *natural_baseline) + int width, + int *minimum_height, + int *natural_height, + int *minimum_baseline, + int *natural_baseline) { PangoLayout *layout; - gint text_height, baseline; + int text_height, baseline; layout = gtk_label_get_measuring_layout (self, NULL, width * PANGO_SCALE); @@ -2993,13 +2993,13 @@ get_height_for_width (GtkLabel *self, g_object_unref (layout); } -static gint +static int get_char_pixels (GtkWidget *self, PangoLayout *layout) { PangoContext *context; PangoFontMetrics *metrics; - gint char_width, digit_width; + int char_width, digit_width; context = pango_layout_get_context (layout); metrics = pango_context_get_metrics (context, @@ -3020,7 +3020,7 @@ gtk_label_get_preferred_layout_size (GtkLabel *self, int *widest_baseline) { PangoLayout *layout; - gint char_pixels; + int char_pixels; /* "width-chars" Hard-coded minimum width: * - minimum size should be MAX (width-chars, strlen ("...")); @@ -3095,10 +3095,10 @@ gtk_label_get_preferred_layout_size (GtkLabel *self, static void gtk_label_get_preferred_size (GtkWidget *widget, GtkOrientation orientation, - gint *minimum_size, - gint *natural_size, - gint *minimum_baseline, - gint *natural_baseline) + int *minimum_size, + int *natural_size, + int *minimum_baseline, + int *natural_baseline) { GtkLabel *self = GTK_LABEL (widget); PangoRectangle widest_rect; @@ -3174,15 +3174,15 @@ gtk_label_measure (GtkWidget *widget, static void get_layout_location (GtkLabel *self, - gint *xp, - gint *yp) + int *xp, + int *yp) { GtkWidget *widget = GTK_WIDGET (self); - gint req_width, x, y; - gint req_height; + int req_width, x, y; + int req_height; gfloat xalign, yalign; PangoRectangle logical; - gint baseline, layout_baseline, baseline_offset; + int baseline, layout_baseline, baseline_offset; int label_width, label_height; xalign = self->xalign; @@ -3418,7 +3418,7 @@ gtk_label_snapshot (GtkWidget *widget, GtkLabel *self = GTK_LABEL (widget); GtkLabelSelectionInfo *info; GtkStyleContext *context; - gint lx, ly; + int lx, ly; int width, height, x; info = self->select_info; @@ -3439,7 +3439,7 @@ gtk_label_snapshot (GtkWidget *widget, if (info && (info->selection_anchor != info->selection_end)) { - gint range[2]; + int range[2]; cairo_region_t *range_clip; cairo_rectangle_int_t clip_rect; int i; @@ -3449,7 +3449,7 @@ gtk_label_snapshot (GtkWidget *widget, if (range[0] > range[1]) { - gint tmp = range[0]; + int tmp = range[0]; range[0] = range[1]; range[1] = tmp; } @@ -3475,7 +3475,7 @@ gtk_label_snapshot (GtkWidget *widget, { GtkLabelLink *focus_link; GtkLabelLink *active_link; - gint range[2]; + int range[2]; cairo_region_t *range_clip; cairo_rectangle_int_t clip_rect; int i; @@ -3588,11 +3588,11 @@ gtk_label_unrealize (GtkWidget *widget) static gboolean get_layout_index (GtkLabel *self, - gint x, - gint y, - gint *index) + int x, + int y, + int *index) { - gint trailing = 0; + int trailing = 0; const gchar *cluster; const gchar *cluster_end; gboolean inside; @@ -3629,10 +3629,10 @@ get_layout_index (GtkLabel *self, static gboolean range_is_in_ellipsis_full (GtkLabel *self, - gint range_start, - gint range_end, - gint *ellipsis_start, - gint *ellipsis_end) + int range_start, + int range_end, + int *ellipsis_start, + int *ellipsis_end) { PangoLayoutIter *iter; gboolean in_ellipsis; @@ -3683,8 +3683,8 @@ range_is_in_ellipsis_full (GtkLabel *self, static gboolean range_is_in_ellipsis (GtkLabel *self, - gint range_start, - gint range_end) + int range_start, + int range_end) { return range_is_in_ellipsis_full (self, range_start, range_end, NULL, NULL); } @@ -3692,10 +3692,10 @@ range_is_in_ellipsis (GtkLabel *self, static void gtk_label_select_word (GtkLabel *self) { - gint min, max; + int min, max; - gint start_index = gtk_label_move_backward_word (self, self->select_info->selection_end); - gint end_index = gtk_label_move_forward_word (self, self->select_info->selection_end); + int start_index = gtk_label_move_backward_word (self, self->select_info->selection_end); + int end_index = gtk_label_move_forward_word (self, self->select_info->selection_end); min = MIN (self->select_info->selection_anchor, self->select_info->selection_end); @@ -3794,7 +3794,7 @@ gtk_label_focus (GtkWidget *widget, if (info->selectable) { - gint index; + int index; if (info->selection_anchor != info->selection_end) goto out; @@ -3911,7 +3911,7 @@ out: static void gtk_label_click_gesture_pressed (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble widget_x, gdouble widget_y, GtkLabel *self) @@ -3988,14 +3988,14 @@ gtk_label_click_gesture_pressed (GtkGestureClick *gesture, static void gtk_label_click_gesture_released (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkLabel *self) { GtkLabelSelectionInfo *info = self->select_info; GdkEventSequence *sequence; - gint index; + int index; if (info == NULL) return; @@ -4030,8 +4030,8 @@ get_selection_paintable (GtkLabel *self) self->select_info->selection_end) && self->text) { - gint start, end; - gint len; + int start, end; + int len; start = MIN (self->select_info->selection_anchor, self->select_info->selection_end); @@ -4062,7 +4062,7 @@ gtk_label_drag_gesture_begin (GtkGestureDrag *gesture, GdkModifierType state_mask; GdkEventSequence *sequence; GdkEvent *event; - gint min, max, index; + int min, max, index; if (!info || !info->selectable) { @@ -4099,7 +4099,7 @@ gtk_label_drag_gesture_begin (GtkGestureDrag *gesture, /* ensure the anchor is opposite index */ if (index == min) { - gint tmp = min; + int tmp = min; min = max; max = tmp; } @@ -4130,7 +4130,7 @@ gtk_label_drag_gesture_update (GtkGestureDrag *gesture, GtkWidget *widget = GTK_WIDGET (self); GdkEventSequence *sequence; gdouble x, y; - gint index; + int index; if (info == NULL || !info->selectable) return; @@ -4172,9 +4172,9 @@ gtk_label_drag_gesture_update (GtkGestureDrag *gesture, if (info->select_words) { - gint min, max; - gint old_min, old_max; - gint anchor, end; + int min, max; + int old_min, old_max; + int anchor, end; min = gtk_label_move_backward_word (self, index); max = gtk_label_move_forward_word (self, index); @@ -4220,7 +4220,7 @@ gtk_label_update_active_link (GtkWidget *widget, { GtkLabel *self = GTK_LABEL (widget); GtkLabelSelectionInfo *info = self->select_info; - gint index; + int index; if (info == NULL) return; @@ -4350,8 +4350,8 @@ gtk_label_content_get_value (GdkContentProvider *provider, self->select_info->selection_end) && self->text) { - gint start, end; - gint len; + int start, end; + int len; char *str; start = MIN (self->select_info->selection_anchor, @@ -4534,8 +4534,8 @@ gtk_label_get_selectable (GtkLabel *self) static void gtk_label_select_region_index (GtkLabel *self, - gint anchor_index, - gint end_index) + int anchor_index, + int end_index) { g_return_if_fail (GTK_IS_LABEL (self)); gboolean anchor_changed; @@ -4544,7 +4544,7 @@ gtk_label_select_region_index (GtkLabel *self, if (self->select_info && self->select_info->selectable) { GdkClipboard *clipboard; - gint s, e; + int s, e; /* Ensure that we treat an ellipsized region like a single * character with respect to selection. @@ -4668,8 +4668,8 @@ gtk_label_select_region_index (GtkLabel *self, **/ void gtk_label_select_region (GtkLabel *self, - gint start_offset, - gint end_offset) + int start_offset, + int end_offset) { g_return_if_fail (GTK_IS_LABEL (self)); @@ -4700,8 +4700,8 @@ gtk_label_select_region (GtkLabel *self, **/ gboolean gtk_label_get_selection_bounds (GtkLabel *self, - gint *start, - gint *end) + int *start, + int *end) { g_return_val_if_fail (GTK_IS_LABEL (self), FALSE); @@ -4717,9 +4717,9 @@ gtk_label_get_selection_bounds (GtkLabel *self, } else { - gint start_index, end_index; - gint start_offset, end_offset; - gint len; + int start_index, end_index; + int start_offset, end_offset; + int len; start_index = MIN (self->select_info->selection_anchor, self->select_info->selection_end); @@ -4739,7 +4739,7 @@ gtk_label_get_selection_bounds (GtkLabel *self, if (start_offset > end_offset) { - gint tmp = start_offset; + int tmp = start_offset; start_offset = end_offset; end_offset = tmp; } @@ -4793,8 +4793,8 @@ gtk_label_get_layout (GtkLabel *self) **/ void gtk_label_get_layout_offsets (GtkLabel *self, - gint *x, - gint *y) + int *x, + int *y) { g_return_if_fail (GTK_IS_LABEL (self)); @@ -4986,19 +4986,19 @@ get_better_cursor (GtkLabel *self, } -static gint +static int gtk_label_move_logically (GtkLabel *self, - gint start, - gint count) + int start, + int count) { - gint offset = g_utf8_pointer_to_offset (self->text, + int offset = g_utf8_pointer_to_offset (self->text, self->text + start); if (self->text) { const PangoLogAttr *log_attrs; - gint n_attrs; - gint length; + int n_attrs; + int length; gtk_label_ensure_layout (self); @@ -5027,12 +5027,12 @@ gtk_label_move_logically (GtkLabel *self, return g_utf8_offset_to_pointer (self->text, offset) - self->text; } -static gint +static int gtk_label_move_visually (GtkLabel *self, - gint start, - gint count) + int start, + int count) { - gint index; + int index; index = start; @@ -5092,19 +5092,19 @@ gtk_label_move_visually (GtkLabel *self, return index; } -static gint +static int gtk_label_move_forward_word (GtkLabel *self, - gint start) + int start) { - gint new_pos = g_utf8_pointer_to_offset (self->text, + int new_pos = g_utf8_pointer_to_offset (self->text, self->text + start); - gint length; + int length; length = g_utf8_strlen (self->text, -1); if (new_pos < length) { const PangoLogAttr *log_attrs; - gint n_attrs; + int n_attrs; gtk_label_ensure_layout (self); @@ -5120,17 +5120,17 @@ gtk_label_move_forward_word (GtkLabel *self, } -static gint +static int gtk_label_move_backward_word (GtkLabel *self, - gint start) + int start) { - gint new_pos = g_utf8_pointer_to_offset (self->text, + int new_pos = g_utf8_pointer_to_offset (self->text, self->text + start); if (new_pos > 0) { const PangoLogAttr *log_attrs; - gint n_attrs; + int n_attrs; gtk_label_ensure_layout (self); @@ -5149,11 +5149,11 @@ gtk_label_move_backward_word (GtkLabel *self, static void gtk_label_move_cursor (GtkLabel *self, GtkMovementStep step, - gint count, + int count, gboolean extend_selection) { - gint old_pos; - gint new_pos; + int old_pos; + int new_pos; if (self->select_info == NULL) return; @@ -5170,8 +5170,8 @@ gtk_label_move_cursor (GtkLabel *self, { case GTK_MOVEMENT_VISUAL_POSITIONS: { - gint end_x, end_y; - gint anchor_x, anchor_y; + int end_x, end_y; + int anchor_x, anchor_y; gboolean end_is_left; get_better_cursor (self, self->select_info->selection_end, &end_x, &end_y); @@ -5279,8 +5279,8 @@ gtk_label_copy_clipboard (GtkLabel *self) { if (self->text && self->select_info) { - gint start, end; - gint len; + int start, end; + int len; GdkClipboard *clipboard; start = MIN (self->select_info->selection_anchor, @@ -5596,14 +5596,14 @@ gtk_label_get_current_uri (GtkLabel *self) static gboolean gtk_label_query_tooltip (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip) { GtkLabel *self = GTK_LABEL (widget); GtkLabelSelectionInfo *info = self->select_info; - gint index = -1; + int index = -1; if (info && info->links) { @@ -5640,7 +5640,7 @@ gtk_label_query_tooltip (GtkWidget *widget, tooltip); } -gint +int _gtk_label_get_cursor_position (GtkLabel *self) { if (self->select_info && self->select_info->selectable) @@ -5650,7 +5650,7 @@ _gtk_label_get_cursor_position (GtkLabel *self) return 0; } -gint +int _gtk_label_get_selection_bound (GtkLabel *self) { if (self->select_info && self->select_info->selectable) @@ -5672,7 +5672,7 @@ _gtk_label_get_selection_bound (GtkLabel *self) */ void gtk_label_set_lines (GtkLabel *self, - gint lines) + int lines) { g_return_if_fail (GTK_IS_LABEL (self)); @@ -5694,7 +5694,7 @@ gtk_label_set_lines (GtkLabel *self, * * Returns: The number of lines */ -gint +int gtk_label_get_lines (GtkLabel *self) { g_return_val_if_fail (GTK_IS_LABEL (self), -1); @@ -5702,7 +5702,7 @@ gtk_label_get_lines (GtkLabel *self) return self->lines; } -gint +int _gtk_label_get_n_links (GtkLabel *self) { if (self->select_info) @@ -5713,7 +5713,7 @@ _gtk_label_get_n_links (GtkLabel *self) const gchar * _gtk_label_get_link_uri (GtkLabel *self, - gint idx) + int idx) { if (self->select_info) return self->select_info->links[idx].uri; @@ -5723,9 +5723,9 @@ _gtk_label_get_link_uri (GtkLabel *self, void _gtk_label_get_link_extent (GtkLabel *self, - gint idx, - gint *start, - gint *end) + int idx, + int *start, + int *end) { if (self->select_info) { @@ -5763,7 +5763,7 @@ _gtk_label_get_link_at (GtkLabel *self, void _gtk_label_activate_link (GtkLabel *self, - gint idx) + int idx) { if (self->select_info) { @@ -5775,7 +5775,7 @@ _gtk_label_activate_link (GtkLabel *self, gboolean _gtk_label_get_link_visited (GtkLabel *self, - gint idx) + int idx) { if (self->select_info) return self->select_info->links[idx].visited; @@ -5785,7 +5785,7 @@ _gtk_label_get_link_visited (GtkLabel *self, gboolean _gtk_label_get_link_focused (GtkLabel *self, - gint idx) + int idx) { GtkLabelSelectionInfo *info = self->select_info; diff --git a/gtk/gtklabel.h b/gtk/gtklabel.h index 7a89b6a2fe..367972fb3f 100644 --- a/gtk/gtklabel.h +++ b/gtk/gtklabel.h @@ -101,17 +101,17 @@ GDK_AVAILABLE_IN_ALL void gtk_label_set_width_chars (GtkLabel *self, int n_chars); GDK_AVAILABLE_IN_ALL -gint gtk_label_get_width_chars (GtkLabel *self); +int gtk_label_get_width_chars (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_set_max_width_chars (GtkLabel *self, int n_chars); GDK_AVAILABLE_IN_ALL -gint gtk_label_get_max_width_chars (GtkLabel *self); +int gtk_label_get_max_width_chars (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_set_lines (GtkLabel *self, - gint lines); + int lines); GDK_AVAILABLE_IN_ALL -gint gtk_label_get_lines (GtkLabel *self); +int gtk_label_get_lines (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_set_wrap (GtkLabel *self, gboolean wrap); @@ -129,19 +129,19 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_label_get_selectable (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_select_region (GtkLabel *self, - gint start_offset, - gint end_offset); + int start_offset, + int end_offset); GDK_AVAILABLE_IN_ALL gboolean gtk_label_get_selection_bounds (GtkLabel *self, - gint *start, - gint *end); + int *start, + int *end); GDK_AVAILABLE_IN_ALL PangoLayout *gtk_label_get_layout (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_get_layout_offsets (GtkLabel *self, - gint *x, - gint *y); + int *x, + int *y); GDK_AVAILABLE_IN_ALL void gtk_label_set_single_line_mode (GtkLabel *self, diff --git a/gtk/gtklabelprivate.h b/gtk/gtklabelprivate.h index f99c50fca5..42b624a59d 100644 --- a/gtk/gtklabelprivate.h +++ b/gtk/gtklabelprivate.h @@ -26,24 +26,24 @@ G_BEGIN_DECLS void _gtk_label_mnemonics_visible_apply_recursively (GtkWidget *widget, gboolean mnemonics_visible); -gint _gtk_label_get_cursor_position (GtkLabel *label); -gint _gtk_label_get_selection_bound (GtkLabel *label); +int _gtk_label_get_cursor_position (GtkLabel *label); +int _gtk_label_get_selection_bound (GtkLabel *label); -gint _gtk_label_get_n_links (GtkLabel *label); -gint _gtk_label_get_link_at (GtkLabel *label, - gint pos); +int _gtk_label_get_n_links (GtkLabel *label); +int _gtk_label_get_link_at (GtkLabel *label, + int pos); void _gtk_label_activate_link (GtkLabel *label, - gint idx); + int idx); const gchar *_gtk_label_get_link_uri (GtkLabel *label, - gint idx); + int idx); void _gtk_label_get_link_extent (GtkLabel *label, - gint idx, - gint *start, - gint *end); + int idx, + int *start, + int *end); gboolean _gtk_label_get_link_visited (GtkLabel *label, - gint idx); + int idx); gboolean _gtk_label_get_link_focused (GtkLabel *label, - gint idx); + int idx); G_END_DECLS diff --git a/gtk/gtklevelbar.c b/gtk/gtklevelbar.c index 321c152128..41811c89b8 100644 --- a/gtk/gtklevelbar.c +++ b/gtk/gtklevelbar.c @@ -219,7 +219,7 @@ gtk_level_bar_offset_free (GtkLevelBarOffset *offset) g_slice_free (GtkLevelBarOffset, offset); } -static gint +static int offset_find_func (gconstpointer data, gconstpointer user_data) { @@ -229,7 +229,7 @@ offset_find_func (gconstpointer data, return g_strcmp0 (name, offset->name); } -static gint +static int offset_sort_func (gconstpointer a, gconstpointer b) { @@ -278,18 +278,18 @@ gtk_level_bar_value_in_interval (GtkLevelBar *self, } #endif -static gint +static int gtk_level_bar_get_num_blocks (GtkLevelBar *self) { if (self->bar_mode == GTK_LEVEL_BAR_MODE_CONTINUOUS) return 1; else if (self->bar_mode == GTK_LEVEL_BAR_MODE_DISCRETE) - return MAX (1, (gint) (round (self->max_value) - round (self->min_value))); + return MAX (1, (int) (round (self->max_value) - round (self->min_value))); return 0; } -static gint +static int gtk_level_bar_get_num_block_nodes (GtkLevelBar *self) { if (self->bar_mode == GTK_LEVEL_BAR_MODE_CONTINUOUS) @@ -300,11 +300,11 @@ gtk_level_bar_get_num_block_nodes (GtkLevelBar *self) static void gtk_level_bar_get_min_block_size (GtkLevelBar *self, - gint *block_width, - gint *block_height) + int *block_width, + int *block_height) { guint i, n_blocks; - gint width, height; + int width, height; *block_width = *block_height = 0; n_blocks = gtk_level_bar_get_num_block_nodes (self); @@ -359,7 +359,7 @@ gtk_level_bar_render_trough (GtkGizmo *gizmo, } else { - gint num_blocks, i; + int num_blocks, i; num_blocks = gtk_level_bar_get_num_blocks (self); @@ -379,8 +379,8 @@ gtk_level_bar_measure_trough (GtkGizmo *gizmo, { GtkWidget *widget = GTK_WIDGET (gizmo); GtkLevelBar *self = GTK_LEVEL_BAR (gtk_widget_get_parent (widget)); - gint num_blocks, size; - gint block_width, block_height; + int num_blocks, size; + int block_width, block_height; num_blocks = gtk_level_bar_get_num_blocks (self); gtk_level_bar_get_min_block_size (self, &block_width, &block_height); @@ -437,7 +437,7 @@ gtk_level_bar_allocate_trough_continuous (GtkLevelBar *self, if (self->orientation == GTK_ORIENTATION_HORIZONTAL) { - block_area.width = (gint) floor (block_area.width * fill_percentage); + block_area.width = (int) floor (block_area.width * fill_percentage); block_area.width = MAX (block_area.width, block_min); if (inverted) @@ -445,7 +445,7 @@ gtk_level_bar_allocate_trough_continuous (GtkLevelBar *self, } else { - block_area.height = (gint) floor (block_area.height * fill_percentage); + block_area.height = (int) floor (block_area.height * fill_percentage); block_area.height = MAX (block_area.height, block_min); if (inverted) @@ -464,8 +464,8 @@ gtk_level_bar_allocate_trough_discrete (GtkLevelBar *self, int baseline) { GtkAllocation block_area; - gint num_blocks, i; - gint block_width, block_height; + int num_blocks, i; + int block_width, block_height; gtk_level_bar_get_min_block_size (self, &block_width, &block_height); num_blocks = gtk_level_bar_get_num_blocks (self); @@ -475,13 +475,13 @@ gtk_level_bar_allocate_trough_discrete (GtkLevelBar *self, if (self->orientation == GTK_ORIENTATION_HORIZONTAL) { - block_width = MAX (block_width, (gint) floor (width / num_blocks)); + block_width = MAX (block_width, (int) floor (width / num_blocks)); block_height = height; } else { block_width = width; - block_height = MAX (block_height, (gint) floor (height / num_blocks)); + block_height = MAX (block_height, (int) floor (height / num_blocks)); } block_area.x = 0; @@ -573,7 +573,7 @@ update_level_style_classes (GtkLevelBar *self) const gchar *value_class = NULL; GtkLevelBarOffset *offset, *prev_offset; GList *l; - gint num_filled, num_blocks, i; + int num_filled, num_blocks, i; gboolean inverted; value = gtk_level_bar_get_value (self); @@ -607,7 +607,7 @@ update_level_style_classes (GtkLevelBar *self) if (self->bar_mode == GTK_LEVEL_BAR_MODE_CONTINUOUS) num_filled = 1; else - num_filled = MIN (num_blocks, (gint) round (self->cur_value) - (gint) round (self->min_value)); + num_filled = MIN (num_blocks, (int) round (self->cur_value) - (int) round (self->min_value)); for (i = 0; i < num_filled; i++) { @@ -883,7 +883,7 @@ static void gtk_level_bar_finalize (GObject *obj) { GtkLevelBar *self = GTK_LEVEL_BAR (obj); - gint i; + int i; g_list_free_full (self->offsets, (GDestroyNotify) gtk_level_bar_offset_free); diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c index 21084de8a7..38755b92db 100644 --- a/gtk/gtklinkbutton.c +++ b/gtk/gtklinkbutton.c @@ -121,8 +121,8 @@ static void gtk_link_button_popup_menu (GtkWidget *widget, const char *action_name, GVariant *parameters); static gboolean gtk_link_button_query_tooltip_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data); @@ -583,8 +583,8 @@ gtk_link_button_new_with_label (const gchar *uri, static gboolean gtk_link_button_query_tooltip_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c index b770e85e4f..0601c3da65 100644 --- a/gtk/gtklistbox.c +++ b/gtk/gtklistbox.c @@ -147,7 +147,7 @@ struct _GtkListBoxClass void (*toggle_cursor_row) (GtkListBox *box); void (*move_cursor) (GtkListBox *box, GtkMovementStep step, - gint count, + int count, gboolean extend, gboolean modify); void (*selected_rows_changed) (GtkListBox *box); @@ -161,8 +161,8 @@ typedef struct GSequenceIter *iter; GtkWidget *header; GtkActionHelper *action_helper; - gint y; - gint height; + int y; + int height; guint visible :1; guint selected :1; guint activatable :1; @@ -237,7 +237,7 @@ static void gtk_list_box_add_move_binding (GtkWidget guint keyval, GdkModifierType modmask, GtkMovementStep step, - gint count); + int count); static void gtk_list_box_update_cursor (GtkListBox *box, GtkListBoxRow *row, gboolean grab_focus); @@ -260,7 +260,7 @@ static void gtk_list_box_activate_cursor_row (GtkListBo static void gtk_list_box_toggle_cursor_row (GtkListBox *box); static void gtk_list_box_move_cursor (GtkListBox *box, GtkMovementStep step, - gint count, + int count, gboolean extend, gboolean modify); static void gtk_list_box_parent_cb (GObject *object, @@ -749,7 +749,7 @@ gtk_list_box_get_selected_row (GtkListBox *box) */ GtkListBoxRow * gtk_list_box_get_row_at_index (GtkListBox *box, - gint index_) + int index_) { GSequenceIter *iter; @@ -791,7 +791,7 @@ row_y_cmp_func (gconstpointer a, */ GtkListBoxRow * gtk_list_box_get_row_at_y (GtkListBox *box, - gint y) + int y) { GSequenceIter *iter; @@ -1248,7 +1248,7 @@ gtk_list_box_invalidate_filter (GtkListBox *box) gtk_widget_queue_resize (GTK_WIDGET (box)); } -static gint +static int do_sort (GtkListBoxRow *a, GtkListBoxRow *b, GtkListBox *box) @@ -1457,7 +1457,7 @@ gtk_list_box_add_move_binding (GtkWidgetClass *widget_class, guint keyval, GdkModifierType modmask, GtkMovementStep step, - gint count) + int count) { gtk_widget_class_add_binding_signal (widget_class, keyval, modmask, @@ -1482,7 +1482,7 @@ ensure_row_visible (GtkListBox *box, GtkListBoxRow *row) { GtkWidget *header; - gint y, height; + int y, height; graphene_rect_t rect; if (!box->adjustment) @@ -2016,7 +2016,7 @@ gtk_list_box_focus (GtkWidget *widget, static void list_box_add_visible_rows (GtkListBox *box, - gint n) + int n) { int was_zero; @@ -2426,8 +2426,8 @@ gtk_list_box_measure (GtkWidget *widget, iter = g_sequence_iter_next (iter)) { GtkListBoxRow *row; - gint row_min; - gint row_nat; + int row_min; + int row_nat; row = g_sequence_get (iter); @@ -2475,7 +2475,7 @@ gtk_list_box_measure (GtkWidget *widget, iter = g_sequence_iter_next (iter)) { GtkListBoxRow *row; - gint row_min = 0; + int row_min = 0; row = g_sequence_get (iter); if (!row_is_visible (row)) @@ -2607,7 +2607,7 @@ gtk_list_box_prepend (GtkListBox *box, void gtk_list_box_insert (GtkListBox *box, GtkWidget *child, - gint position) + int position) { GtkListBoxRow *row; GSequenceIter *prev = NULL; @@ -2727,15 +2727,15 @@ gtk_list_box_toggle_cursor_row (GtkListBox *box) static void gtk_list_box_move_cursor (GtkListBox *box, GtkMovementStep step, - gint count, + int count, gboolean extend, gboolean modify) { GtkListBoxRow *row; - gint page_size; + int page_size; GSequenceIter *iter; - gint start_y; - gint end_y; + int start_y; + int end_y; int height; row = NULL; @@ -2750,7 +2750,7 @@ gtk_list_box_move_cursor (GtkListBox *box, case GTK_MOVEMENT_DISPLAY_LINES: if (box->cursor_row != NULL) { - gint i = count; + int i = count; iter = ROW_PRIV (box->cursor_row)->iter; @@ -3091,7 +3091,7 @@ gtk_list_box_row_set_header (GtkListBoxRow *row, * * Returns: the index of the @row, or -1 if the @row is not in a listbox */ -gint +int gtk_list_box_row_get_index (GtkListBoxRow *row) { GtkListBoxRowPrivate *priv = ROW_PRIV (row); diff --git a/gtk/gtklistbox.h b/gtk/gtklistbox.h index da77299bc0..b39f55154a 100644 --- a/gtk/gtklistbox.h +++ b/gtk/gtklistbox.h @@ -93,9 +93,9 @@ typedef gboolean (*GtkListBoxFilterFunc) (GtkListBoxRow *row, * Returns: < 0 if @row1 should be before @row2, 0 if they are * equal and > 0 otherwise */ -typedef gint (*GtkListBoxSortFunc) (GtkListBoxRow *row1, - GtkListBoxRow *row2, - gpointer user_data); +typedef int (*GtkListBoxSortFunc) (GtkListBoxRow *row1, + GtkListBoxRow *row2, + gpointer user_data); /** * GtkListBoxUpdateHeaderFunc: @@ -142,7 +142,7 @@ GDK_AVAILABLE_IN_ALL void gtk_list_box_row_set_header (GtkListBoxRow *row, GtkWidget *header); GDK_AVAILABLE_IN_ALL -gint gtk_list_box_row_get_index (GtkListBoxRow *row); +int gtk_list_box_row_get_index (GtkListBoxRow *row); GDK_AVAILABLE_IN_ALL void gtk_list_box_row_changed (GtkListBoxRow *row); @@ -170,7 +170,7 @@ void gtk_list_box_prepend (GtkListBox GDK_AVAILABLE_IN_ALL void gtk_list_box_insert (GtkListBox *box, GtkWidget *child, - gint position); + int position); GDK_AVAILABLE_IN_ALL void gtk_list_box_remove (GtkListBox *box, GtkWidget *child); @@ -178,10 +178,10 @@ GDK_AVAILABLE_IN_ALL GtkListBoxRow* gtk_list_box_get_selected_row (GtkListBox *box); GDK_AVAILABLE_IN_ALL GtkListBoxRow* gtk_list_box_get_row_at_index (GtkListBox *box, - gint index_); + int index_); GDK_AVAILABLE_IN_ALL GtkListBoxRow* gtk_list_box_get_row_at_y (GtkListBox *box, - gint y); + int y); GDK_AVAILABLE_IN_ALL void gtk_list_box_select_row (GtkListBox *box, GtkListBoxRow *row); diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c index 3e6a3eaa49..edd4630f0f 100644 --- a/gtk/gtkliststore.c +++ b/gtk/gtkliststore.c @@ -66,7 +66,7 @@ * GtkListStore *list_store; * GtkTreePath *path; * GtkTreeIter iter; - * gint i; + * int i; * * list_store = gtk_list_store_new (N_COLUMNS, * G_TYPE_STRING, @@ -181,10 +181,10 @@ struct _GtkListStorePrivate GList *sort_list; GType *column_headers; - gint stamp; - gint n_columns; - gint sort_column_id; - gint length; + int stamp; + int n_columns; + int sort_column_id; + int length; GtkSortType order; @@ -202,9 +202,9 @@ static void gtk_list_store_sortable_init (GtkTreeSortableIface *ifac static void gtk_list_store_buildable_init (GtkBuildableIface *iface); static void gtk_list_store_finalize (GObject *object); static GtkTreeModelFlags gtk_list_store_get_flags (GtkTreeModel *tree_model); -static gint gtk_list_store_get_n_columns (GtkTreeModel *tree_model); +static int gtk_list_store_get_n_columns (GtkTreeModel *tree_model); static GType gtk_list_store_get_column_type (GtkTreeModel *tree_model, - gint index); + int index); static gboolean gtk_list_store_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path); @@ -212,7 +212,7 @@ static GtkTreePath *gtk_list_store_get_path (GtkTreeModel *tree_mode GtkTreeIter *iter); static void gtk_list_store_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value); static gboolean gtk_list_store_iter_next (GtkTreeModel *tree_model, GtkTreeIter *iter); @@ -223,21 +223,21 @@ static gboolean gtk_list_store_iter_children (GtkTreeModel *tree_mode GtkTreeIter *parent); static gboolean gtk_list_store_iter_has_child (GtkTreeModel *tree_model, GtkTreeIter *iter); -static gint gtk_list_store_iter_n_children (GtkTreeModel *tree_model, +static int gtk_list_store_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter); static gboolean gtk_list_store_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n); + int n); static gboolean gtk_list_store_iter_parent (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *child); static void gtk_list_store_set_n_columns (GtkListStore *list_store, - gint n_columns); + int n_columns); static void gtk_list_store_set_column_type (GtkListStore *list_store, - gint column, + int column, GType type); static void gtk_list_store_increment_stamp (GtkListStore *list_store); @@ -263,15 +263,15 @@ static gboolean gtk_list_store_row_drop_possible (GtkTreeDragDest *drag_dest, static void gtk_list_store_sort (GtkListStore *list_store); static void gtk_list_store_sort_iter_changed (GtkListStore *list_store, GtkTreeIter *iter, - gint column); + int column); static gboolean gtk_list_store_get_sort_column_id (GtkTreeSortable *sortable, - gint *sort_column_id, + int *sort_column_id, GtkSortType *order); static void gtk_list_store_set_sort_column_id (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkSortType order); static void gtk_list_store_set_sort_func (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkTreeIterCompareFunc func, gpointer data, GDestroyNotify destroy); @@ -412,12 +412,12 @@ iter_is_valid (GtkTreeIter *iter, * Returns: a new #GtkListStore */ GtkListStore * -gtk_list_store_new (gint n_columns, +gtk_list_store_new (int n_columns, ...) { GtkListStore *retval; va_list args; - gint i; + int i; g_return_val_if_fail (n_columns > 0, NULL); @@ -457,11 +457,11 @@ gtk_list_store_new (gint n_columns, * Returns: (transfer full): a new #GtkListStore **/ GtkListStore * -gtk_list_store_newv (gint n_columns, +gtk_list_store_newv (int n_columns, GType *types) { GtkListStore *retval; - gint i; + int i; g_return_val_if_fail (n_columns > 0, NULL); @@ -496,11 +496,11 @@ gtk_list_store_newv (gint n_columns, **/ void gtk_list_store_set_column_types (GtkListStore *list_store, - gint n_columns, + int n_columns, GType *types) { GtkListStorePrivate *priv; - gint i; + int i; g_return_if_fail (GTK_IS_LIST_STORE (list_store)); @@ -522,7 +522,7 @@ gtk_list_store_set_column_types (GtkListStore *list_store, static void gtk_list_store_set_n_columns (GtkListStore *list_store, - gint n_columns) + int n_columns) { GtkListStorePrivate *priv = list_store->priv; int i; @@ -542,7 +542,7 @@ gtk_list_store_set_n_columns (GtkListStore *list_store, static void gtk_list_store_set_column_type (GtkListStore *list_store, - gint column, + int column, GType type) { GtkListStorePrivate *priv = list_store->priv; @@ -589,7 +589,7 @@ gtk_list_store_get_flags (GtkTreeModel *tree_model) return GTK_TREE_MODEL_ITERS_PERSIST | GTK_TREE_MODEL_LIST_ONLY; } -static gint +static int gtk_list_store_get_n_columns (GtkTreeModel *tree_model) { GtkListStore *list_store = GTK_LIST_STORE (tree_model); @@ -602,7 +602,7 @@ gtk_list_store_get_n_columns (GtkTreeModel *tree_model) static GType gtk_list_store_get_column_type (GtkTreeModel *tree_model, - gint index) + int index) { GtkListStore *list_store = GTK_LIST_STORE (tree_model); GtkListStorePrivate *priv = list_store->priv; @@ -622,7 +622,7 @@ gtk_list_store_get_iter (GtkTreeModel *tree_model, GtkListStore *list_store = GTK_LIST_STORE (tree_model); GtkListStorePrivate *priv = list_store->priv; GSequence *seq; - gint i; + int i; priv->columns_dirty = TRUE; @@ -664,13 +664,13 @@ gtk_list_store_get_path (GtkTreeModel *tree_model, static void gtk_list_store_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value) { GtkListStore *list_store = GTK_LIST_STORE (tree_model); GtkListStorePrivate *priv = list_store->priv; GtkTreeDataList *list; - gint tmp_column = column; + int tmp_column = column; g_return_if_fail (column < priv->n_columns); g_return_if_fail (iter_is_valid (iter, list_store)); @@ -761,7 +761,7 @@ gtk_list_store_iter_has_child (GtkTreeModel *tree_model, return FALSE; } -static gint +static int gtk_list_store_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter) { @@ -780,7 +780,7 @@ static gboolean gtk_list_store_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n) + int n) { GtkListStore *list_store = GTK_LIST_STORE (tree_model); GtkListStorePrivate *priv = list_store->priv; @@ -814,14 +814,14 @@ gtk_list_store_iter_parent (GtkTreeModel *tree_model, static gboolean gtk_list_store_real_set_value (GtkListStore *list_store, GtkTreeIter *iter, - gint column, + int column, GValue *value, gboolean sort) { GtkListStorePrivate *priv = list_store->priv; GtkTreeDataList *list; GtkTreeDataList *prev; - gint old_column = column; + int old_column = column; GValue real_value = G_VALUE_INIT; gboolean converted = FALSE; gboolean retval = FALSE; @@ -924,7 +924,7 @@ gtk_list_store_real_set_value (GtkListStore *list_store, void gtk_list_store_set_value (GtkListStore *list_store, GtkTreeIter *iter, - gint column, + int column, GValue *value) { GtkListStorePrivate *priv; @@ -976,12 +976,12 @@ gtk_list_store_set_vector_internal (GtkListStore *list_store, GtkTreeIter *iter, gboolean *emit_signal, gboolean *maybe_need_sort, - gint *columns, + int *columns, GValue *values, - gint n_values) + int n_values) { GtkListStorePrivate *priv = list_store->priv; - gint i; + int i; GtkTreeIterCompareFunc func = NULL; func = gtk_list_store_get_compare_func (list_store); @@ -1010,10 +1010,10 @@ gtk_list_store_set_valist_internal (GtkListStore *list_store, va_list var_args) { GtkListStorePrivate *priv = list_store->priv; - gint column; + int column; GtkTreeIterCompareFunc func = NULL; - column = va_arg (var_args, gint); + column = va_arg (var_args, int); func = gtk_list_store_get_compare_func (list_store); if (func != _gtk_tree_data_list_compare_func) @@ -1056,7 +1056,7 @@ gtk_list_store_set_valist_internal (GtkListStore *list_store, g_value_unset (&value); - column = va_arg (var_args, gint); + column = va_arg (var_args, int); } } @@ -1077,9 +1077,9 @@ gtk_list_store_set_valist_internal (GtkListStore *list_store, void gtk_list_store_set_valuesv (GtkListStore *list_store, GtkTreeIter *iter, - gint *columns, + int *columns, GValue *values, - gint n_values) + int n_values) { GtkListStorePrivate *priv; gboolean emit_signal = FALSE; @@ -1244,13 +1244,13 @@ gtk_list_store_remove (GtkListStore *list_store, void gtk_list_store_insert (GtkListStore *list_store, GtkTreeIter *iter, - gint position) + int position) { GtkListStorePrivate *priv; GtkTreePath *path; GSequence *seq; GSequenceIter *ptr; - gint length; + int length; g_return_if_fail (GTK_IS_LIST_STORE (list_store)); g_return_if_fail (iter != NULL); @@ -1576,7 +1576,7 @@ gtk_list_store_drag_data_received (GtkTreeDragDest *drag_dest, GtkTreeDataList *copy_prev = NULL; GtkTreeDataList *copy_iter = NULL; GtkTreePath *path; - gint col; + int col; col = 0; while (dl) @@ -1624,7 +1624,7 @@ gtk_list_store_row_drop_possible (GtkTreeDragDest *drag_dest, GtkTreePath *dest_path, const GValue *value) { - gint *indices; + int *indices; GtkTreeModel *src_model = NULL; GtkTreePath *src_path = NULL; gboolean retval = FALSE; @@ -1661,14 +1661,14 @@ gtk_list_store_row_drop_possible (GtkTreeDragDest *drag_dest, /* Sorting and reordering */ /* Reordering */ -static gint +static int gtk_list_store_reorder_func (GSequenceIter *a, GSequenceIter *b, gpointer user_data) { GHashTable *new_positions = user_data; - gint apos = GPOINTER_TO_INT (g_hash_table_lookup (new_positions, a)); - gint bpos = GPOINTER_TO_INT (g_hash_table_lookup (new_positions, b)); + int apos = GPOINTER_TO_INT (g_hash_table_lookup (new_positions, a)); + int bpos = GPOINTER_TO_INT (g_hash_table_lookup (new_positions, b)); if (apos < bpos) return -1; @@ -1690,14 +1690,14 @@ gtk_list_store_reorder_func (GSequenceIter *a, **/ void gtk_list_store_reorder (GtkListStore *store, - gint *new_order) + int *new_order) { GtkListStorePrivate *priv; - gint i; + int i; GtkTreePath *path; GHashTable *new_positions; GSequenceIter *ptr; - gint *order; + int *order; g_return_if_fail (GTK_IS_LIST_STORE (store)); g_return_if_fail (!GTK_LIST_STORE_IS_SORTED (store)); @@ -1705,7 +1705,7 @@ gtk_list_store_reorder (GtkListStore *store, priv = store->priv; - order = g_new (gint, g_sequence_get_length (priv->seq)); + order = g_new (int, g_sequence_get_length (priv->seq)); for (i = 0; i < g_sequence_get_length (priv->seq); i++) order[new_order[i]] = i; @@ -1787,7 +1787,7 @@ gtk_list_store_swap (GtkListStore *store, { GtkListStorePrivate *priv; GHashTable *old_positions; - gint *order; + int *order; GtkTreePath *path; g_return_if_fail (GTK_IS_LIST_STORE (store)); @@ -1817,12 +1817,12 @@ gtk_list_store_swap (GtkListStore *store, static void gtk_list_store_move_to (GtkListStore *store, GtkTreeIter *iter, - gint new_pos) + int new_pos) { GtkListStorePrivate *priv = store->priv; GHashTable *old_positions; GtkTreePath *path; - gint *order; + int *order; old_positions = save_positions (priv->seq); @@ -1852,7 +1852,7 @@ gtk_list_store_move_before (GtkListStore *store, GtkTreeIter *iter, GtkTreeIter *position) { - gint pos; + int pos; g_return_if_fail (GTK_IS_LIST_STORE (store)); g_return_if_fail (!GTK_LIST_STORE_IS_SORTED (store)); @@ -1883,7 +1883,7 @@ gtk_list_store_move_after (GtkListStore *store, GtkTreeIter *iter, GtkTreeIter *position) { - gint pos; + int pos; g_return_if_fail (GTK_IS_LIST_STORE (store)); g_return_if_fail (!GTK_LIST_STORE_IS_SORTED (store)); @@ -1900,7 +1900,7 @@ gtk_list_store_move_after (GtkListStore *store, } /* Sorting */ -static gint +static int gtk_list_store_compare_func (GSequenceIter *a, GSequenceIter *b, gpointer user_data) @@ -1909,7 +1909,7 @@ gtk_list_store_compare_func (GSequenceIter *a, GtkListStorePrivate *priv = list_store->priv; GtkTreeIter iter_a; GtkTreeIter iter_b; - gint retval; + int retval; GtkTreeIterCompareFunc func; gpointer data; @@ -1957,7 +1957,7 @@ static void gtk_list_store_sort (GtkListStore *list_store) { GtkListStorePrivate *priv = list_store->priv; - gint *new_order; + int *new_order; GtkTreePath *path; GHashTable *old_positions; @@ -2005,7 +2005,7 @@ iter_is_sorted (GtkListStore *list_store, static void gtk_list_store_sort_iter_changed (GtkListStore *list_store, GtkTreeIter *iter, - gint column) + int column) { GtkListStorePrivate *priv = list_store->priv; @@ -2018,7 +2018,7 @@ gtk_list_store_sort_iter_changed (GtkListStore *list_store, if (!iter_is_sorted (list_store, iter)) { GHashTable *old_positions; - gint *order; + int *order; old_positions = save_positions (priv->seq); g_sequence_sort_changed_iter (iter->user_data, @@ -2035,7 +2035,7 @@ gtk_list_store_sort_iter_changed (GtkListStore *list_store, static gboolean gtk_list_store_get_sort_column_id (GtkTreeSortable *sortable, - gint *sort_column_id, + int *sort_column_id, GtkSortType *order) { GtkListStore *list_store = GTK_LIST_STORE (sortable); @@ -2055,7 +2055,7 @@ gtk_list_store_get_sort_column_id (GtkTreeSortable *sortable, static void gtk_list_store_set_sort_column_id (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkSortType order) { GtkListStore *list_store = GTK_LIST_STORE (sortable); @@ -2095,7 +2095,7 @@ gtk_list_store_set_sort_column_id (GtkTreeSortable *sortable, static void gtk_list_store_set_sort_func (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkTreeIterCompareFunc func, gpointer data, GDestroyNotify destroy) @@ -2185,7 +2185,7 @@ gtk_list_store_has_default_sort_func (GtkTreeSortable *sortable) void gtk_list_store_insert_with_values (GtkListStore *list_store, GtkTreeIter *iter, - gint position, + int position, ...) { GtkListStorePrivate *priv; @@ -2193,7 +2193,7 @@ gtk_list_store_insert_with_values (GtkListStore *list_store, GSequence *seq; GSequenceIter *ptr; GtkTreeIter tmp_iter; - gint length; + int length; gboolean changed = FALSE; gboolean maybe_need_sort = FALSE; va_list var_args; @@ -2260,17 +2260,17 @@ gtk_list_store_insert_with_values (GtkListStore *list_store, void gtk_list_store_insert_with_valuesv (GtkListStore *list_store, GtkTreeIter *iter, - gint position, - gint *columns, + int position, + int *columns, GValue *values, - gint n_values) + int n_values) { GtkListStorePrivate *priv; GtkTreePath *path; GSequence *seq; GSequenceIter *ptr; GtkTreeIter tmp_iter; - gint length; + int length; gboolean changed = FALSE; gboolean maybe_need_sort = FALSE; @@ -2337,11 +2337,11 @@ typedef struct { GSList *column_type_names; GType *column_types; GValue *values; - gint *colids; + int *colids; ColInfo **columns; - gint last_row; - gint n_columns; - gint row_column; + int last_row; + int n_columns; + int row_column; gboolean is_data; const gchar *domain; } SubParserData; @@ -2358,7 +2358,7 @@ list_store_start_element (GtkBuildableParseContext *context, if (strcmp (element_name, "col") == 0) { - gint id = -1; + int id = -1; const gchar *id_str; const gchar *msg_context = NULL; gboolean translatable = FALSE; @@ -2537,7 +2537,7 @@ list_store_text (GtkBuildableParseContext *context, GError **error) { SubParserData *data = (SubParserData*)user_data; - gint i; + int i; gchar *string; ColInfo *info; @@ -2608,7 +2608,7 @@ gtk_list_store_buildable_custom_tag_start (GtkBuildable *buildable, } else if (strcmp (tagname, "data") == 0) { - gint n_columns = gtk_list_store_get_n_columns (GTK_TREE_MODEL (buildable)); + int n_columns = gtk_list_store_get_n_columns (GTK_TREE_MODEL (buildable)); if (n_columns == 0) g_error ("Cannot append data to an empty model"); @@ -2616,7 +2616,7 @@ gtk_list_store_buildable_custom_tag_start (GtkBuildable *buildable, data->builder = builder; data->object = G_OBJECT (buildable); data->values = g_new0 (GValue, n_columns); - data->colids = g_new0 (gint, n_columns); + data->colids = g_new0 (int, n_columns); data->columns = g_new0 (ColInfo*, n_columns); data->column_types = GTK_LIST_STORE (buildable)->priv->column_headers; data->n_columns = n_columns; diff --git a/gtk/gtkliststore.h b/gtk/gtkliststore.h index 6a9ae2bb7c..7320d572ba 100644 --- a/gtk/gtkliststore.h +++ b/gtk/gtkliststore.h @@ -61,14 +61,14 @@ struct _GtkListStoreClass GDK_AVAILABLE_IN_ALL GType gtk_list_store_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkListStore *gtk_list_store_new (gint n_columns, +GtkListStore *gtk_list_store_new (int n_columns, ...); GDK_AVAILABLE_IN_ALL -GtkListStore *gtk_list_store_newv (gint n_columns, +GtkListStore *gtk_list_store_newv (int n_columns, GType *types); GDK_AVAILABLE_IN_ALL void gtk_list_store_set_column_types (GtkListStore *list_store, - gint n_columns, + int n_columns, GType *types); /* NOTE: use gtk_tree_model_get to get values from a GtkListStore */ @@ -76,7 +76,7 @@ void gtk_list_store_set_column_types (GtkListStore *list_store, GDK_AVAILABLE_IN_ALL void gtk_list_store_set_value (GtkListStore *list_store, GtkTreeIter *iter, - gint column, + int column, GValue *value); GDK_AVAILABLE_IN_ALL void gtk_list_store_set (GtkListStore *list_store, @@ -85,9 +85,9 @@ void gtk_list_store_set (GtkListStore *list_store, GDK_AVAILABLE_IN_ALL void gtk_list_store_set_valuesv (GtkListStore *list_store, GtkTreeIter *iter, - gint *columns, + int *columns, GValue *values, - gint n_values); + int n_values); GDK_AVAILABLE_IN_ALL void gtk_list_store_set_valist (GtkListStore *list_store, GtkTreeIter *iter, @@ -98,7 +98,7 @@ gboolean gtk_list_store_remove (GtkListStore *list_store, GDK_AVAILABLE_IN_ALL void gtk_list_store_insert (GtkListStore *list_store, GtkTreeIter *iter, - gint position); + int position); GDK_AVAILABLE_IN_ALL void gtk_list_store_insert_before (GtkListStore *list_store, GtkTreeIter *iter, @@ -110,15 +110,15 @@ void gtk_list_store_insert_after (GtkListStore *list_store, GDK_AVAILABLE_IN_ALL void gtk_list_store_insert_with_values (GtkListStore *list_store, GtkTreeIter *iter, - gint position, + int position, ...); GDK_AVAILABLE_IN_ALL void gtk_list_store_insert_with_valuesv (GtkListStore *list_store, GtkTreeIter *iter, - gint position, - gint *columns, + int position, + int *columns, GValue *values, - gint n_values); + int n_values); GDK_AVAILABLE_IN_ALL void gtk_list_store_prepend (GtkListStore *list_store, GtkTreeIter *iter); @@ -132,7 +132,7 @@ gboolean gtk_list_store_iter_is_valid (GtkListStore *list_store, GtkTreeIter *iter); GDK_AVAILABLE_IN_ALL void gtk_list_store_reorder (GtkListStore *store, - gint *new_order); + int *new_order); GDK_AVAILABLE_IN_ALL void gtk_list_store_swap (GtkListStore *store, GtkTreeIter *a, diff --git a/gtk/gtkmagnifier.c b/gtk/gtkmagnifier.c index 049ea2e082..358690fea8 100644 --- a/gtk/gtkmagnifier.c +++ b/gtk/gtkmagnifier.c @@ -34,8 +34,8 @@ struct _GtkMagnifierPrivate { GdkPaintable *paintable; gdouble magnification; - gint x; - gint y; + int x; + int y; gboolean resize; }; @@ -136,7 +136,7 @@ gtk_magnifier_measure (GtkWidget *widget, { GtkMagnifier *magnifier = GTK_MAGNIFIER (widget); GtkMagnifierPrivate *priv = gtk_magnifier_get_instance_private (magnifier); - gint size; + int size; if (priv->resize) { diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index c13a85edce..3d62da6f04 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -146,8 +146,8 @@ static GtkWindowGroup *gtk_main_get_window_group (GtkWidget *widget); -static gint pre_initialized = FALSE; -static gint gtk_initialized = FALSE; +static int pre_initialized = FALSE; +static int gtk_initialized = FALSE; static GList *current_events = NULL; typedef struct { @@ -314,8 +314,8 @@ gtk_check_version (guint required_major, guint required_minor, guint required_micro) { - gint gtk_effective_micro = 100 * GTK_MINOR_VERSION + GTK_MICRO_VERSION; - gint required_effective_micro = 100 * required_minor + required_micro; + int gtk_effective_micro = 100 * GTK_MINOR_VERSION + GTK_MICRO_VERSION; + int required_effective_micro = 100 * required_minor + required_micro; if (required_major > GTK_MAJOR_VERSION) return "GTK version too old (major mismatch)"; @@ -688,7 +688,7 @@ do_post_parse_initialization (void) guint gtk_get_display_debug_flags (GdkDisplay *display) { - gint i; + int i; if (display == NULL) display = gdk_display_get_default (); @@ -712,7 +712,7 @@ void gtk_set_display_debug_flags (GdkDisplay *display, guint flags) { - gint i; + int i; for (i = 0; i < N_DEBUG_DISPLAYS; i++) { @@ -763,7 +763,7 @@ gtk_set_debug_flags (guint flags) gboolean gtk_simulate_touchscreen (void) { - static gint test_touchscreen; + static int test_touchscreen; if (test_touchscreen == 0) test_touchscreen = g_getenv ("GTK_TEST_TOUCHSCREEN") != NULL ? 1 : -1; @@ -1996,7 +1996,7 @@ gtk_propagate_event_internal (GtkWidget *widget, GdkEvent *event, GtkWidget *topmost) { - gint handled_event = FALSE; + int handled_event = FALSE; GtkWidget *target = widget; GtkWidgetStack widget_array; int i; diff --git a/gtk/gtkmarshalers.list b/gtk/gtkmarshalers.list index e6c2606c50..d673c2e7d5 100644 --- a/gtk/gtkmarshalers.list +++ b/gtk/gtkmarshalers.list @@ -6,11 +6,11 @@ # BOOLEAN for boolean types (gboolean) # CHAR for signed char types (gchar) # UCHAR for unsigned char types (guchar) -# INT for signed integer types (gint) +# INT for signed integer types (int) # UINT for unsigned integer types (guint) # LONG for signed long integer types (glong) # ULONG for unsigned long integer types (gulong) -# ENUM for enumeration types (gint) +# ENUM for enumeration types (int) # FLAGS for flag enumeration types (guint) # FLOAT for single-precision float types (gfloat) # DOUBLE for double-precision float types (gdouble) diff --git a/gtk/gtkmediastream.c b/gtk/gtkmediastream.c index 09c1230595..60a1a6d1c9 100644 --- a/gtk/gtkmediastream.c +++ b/gtk/gtkmediastream.c @@ -1178,7 +1178,7 @@ gtk_media_stream_gerror (GtkMediaStream *self, void gtk_media_stream_error (GtkMediaStream *self, GQuark domain, - gint code, + int code, const gchar *format, ...) { @@ -1212,7 +1212,7 @@ gtk_media_stream_error (GtkMediaStream *self, void gtk_media_stream_error_valist (GtkMediaStream *self, GQuark domain, - gint code, + int code, const gchar *format, va_list args) { diff --git a/gtk/gtkmediastream.h b/gtk/gtkmediastream.h index 9f17a6638a..72d7f4ddd1 100644 --- a/gtk/gtkmediastream.h +++ b/gtk/gtkmediastream.h @@ -140,13 +140,13 @@ void gtk_media_stream_gerror (GtkMediaStream GDK_AVAILABLE_IN_ALL void gtk_media_stream_error (GtkMediaStream *self, GQuark domain, - gint code, + int code, const gchar *format, ...) G_GNUC_PRINTF (4, 5); GDK_AVAILABLE_IN_ALL void gtk_media_stream_error_valist (GtkMediaStream *self, GQuark domain, - gint code, + int code, const gchar *format, va_list args) G_GNUC_PRINTF (4, 0); diff --git a/gtk/gtkmenusectionbox.c b/gtk/gtkmenusectionbox.c index f014502460..01c1a4a8d2 100644 --- a/gtk/gtkmenusectionbox.c +++ b/gtk/gtkmenusectionbox.c @@ -48,14 +48,14 @@ struct _GtkMenuSectionBox gboolean iconic; gboolean inline_buttons; gboolean circular; - gint depth; + int depth; GtkPopoverMenuFlags flags; GtkSizeGroup *indicators; }; typedef struct { - gint n_items; + int n_items; gboolean previous_is_iconic; } MenuData; @@ -91,7 +91,7 @@ gtk_menu_section_box_sync_separators (GtkMenuSectionBox *box, gboolean has_separator; gboolean has_label; gboolean separator_condition; - gint n_items_before; + int n_items_before; GtkWidget *child; n_items_before = data->n_items; @@ -203,7 +203,7 @@ gtk_popover_item_activate (GtkWidget *button, } static void -gtk_menu_section_box_remove_func (gint position, +gtk_menu_section_box_remove_func (int position, gpointer user_data) { GtkMenuSectionBox *box = user_data; @@ -291,7 +291,7 @@ open_submenu (GtkWidget *button, static void gtk_menu_section_box_insert_func (GtkMenuTrackerItem *item, - gint position, + int position, gpointer user_data) { GtkMenuSectionBox *box = user_data; diff --git a/gtk/gtkmenutracker.c b/gtk/gtkmenutracker.c index c9b59d183b..ba3bbfc6aa 100644 --- a/gtk/gtkmenutracker.c +++ b/gtk/gtkmenutracker.c @@ -87,14 +87,14 @@ static GtkMenuTrackerSection * gtk_menu_tracker_section_new (GtkMenuTracker GMenuModel *model, gboolean with_separators, gboolean separator_label, - gint offset, + int offset, const gchar *action_namespace); static void gtk_menu_tracker_section_free (GtkMenuTrackerSection *section); static GtkMenuTrackerSection * gtk_menu_tracker_section_find_model (GtkMenuTrackerSection *section, gpointer model, - gint *offset) + int *offset) { GSList *item; @@ -159,18 +159,18 @@ gtk_menu_tracker_section_find_model (GtkMenuTrackerSection *section, * have any items in us or if we are completely empty and sync if our * separator is shown or not. */ -static gint +static int gtk_menu_tracker_section_sync_separators (GtkMenuTrackerSection *section, GtkMenuTracker *tracker, - gint offset, + int offset, gboolean could_have_separator, GMenuModel *parent_model, - gint parent_index) + int parent_index) { gboolean should_have_separator; - gint n_items = 0; + int n_items = 0; GSList *item; - gint i = 0; + int i = 0; for (item = section->items; item; item = item->next) { @@ -228,7 +228,7 @@ gtk_menu_tracker_item_visibility_changed (GtkMenuTrackerItem *item, GtkMenuTrackerSection *section; gboolean is_now_visible; gboolean was_visible; - gint offset = 0; + int offset = 0; is_now_visible = gtk_menu_tracker_item_get_is_visible (item); @@ -255,11 +255,11 @@ gtk_menu_tracker_item_visibility_changed (GtkMenuTrackerItem *item, gtk_menu_tracker_section_sync_separators (tracker->toplevel, tracker, 0, FALSE, NULL, 0); } -static gint +static int gtk_menu_tracker_section_measure (GtkMenuTrackerSection *section) { GSList *item; - gint n_items; + int n_items; if (section == NULL) return 1; @@ -278,15 +278,15 @@ gtk_menu_tracker_section_measure (GtkMenuTrackerSection *section) static void gtk_menu_tracker_remove_items (GtkMenuTracker *tracker, GSList **change_point, - gint offset, - gint n_items) + int offset, + int n_items) { - gint i; + int i; for (i = 0; i < n_items; i++) { GtkMenuTrackerSection *subsection; - gint n; + int n; subsection = (*change_point)->data; *change_point = g_slist_delete_link (*change_point, *change_point); @@ -303,10 +303,10 @@ static void gtk_menu_tracker_add_items (GtkMenuTracker *tracker, GtkMenuTrackerSection *section, GSList **change_point, - gint offset, + int offset, GMenuModel *model, - gint position, - gint n_items) + int position, + int n_items) { while (n_items--) { @@ -410,16 +410,16 @@ gtk_menu_tracker_add_items (GtkMenuTracker *tracker, static void gtk_menu_tracker_model_changed (GMenuModel *model, - gint position, - gint removed, - gint added, + int position, + int removed, + int added, gpointer user_data) { GtkMenuTracker *tracker = user_data; GtkMenuTrackerSection *section; GSList **change_point; - gint offset = 0; - gint i; + int offset = 0; + int i; /* First find which section the changed model corresponds to, and the * position of that section within the overall menu. @@ -477,7 +477,7 @@ gtk_menu_tracker_section_new (GtkMenuTracker *tracker, GMenuModel *model, gboolean with_separators, gboolean separator_label, - gint offset, + int offset, const gchar *action_namespace) { GtkMenuTrackerSection *section; diff --git a/gtk/gtkmenutrackeritem.c b/gtk/gtkmenutrackeritem.c index 64b898917d..2cf2effa8a 100644 --- a/gtk/gtkmenutrackeritem.c +++ b/gtk/gtkmenutrackeritem.c @@ -483,7 +483,7 @@ gtk_menu_tracker_item_init_observer_iface (GtkActionObserverInterface *iface) GtkMenuTrackerItem * _gtk_menu_tracker_item_new (GtkActionObservable *observable, GMenuModel *model, - gint item_index, + int item_index, gboolean mac_os_mode, const gchar *action_namespace, gboolean is_separator) diff --git a/gtk/gtkmenutrackeritemprivate.h b/gtk/gtkmenutrackeritemprivate.h index 0e08f7ecb3..2b81866314 100644 --- a/gtk/gtkmenutrackeritemprivate.h +++ b/gtk/gtkmenutrackeritemprivate.h @@ -44,7 +44,7 @@ GType gtk_menu_tracker_item_role_get_type (void) G GtkMenuTrackerItem * _gtk_menu_tracker_item_new (GtkActionObservable *observable, GMenuModel *model, - gint item_index, + int item_index, gboolean mac_os_mode, const gchar *action_namespace, gboolean is_separator); diff --git a/gtk/gtkmenutrackerprivate.h b/gtk/gtkmenutrackerprivate.h index 210fe2d255..92a0f47739 100644 --- a/gtk/gtkmenutrackerprivate.h +++ b/gtk/gtkmenutrackerprivate.h @@ -25,10 +25,10 @@ typedef struct _GtkMenuTracker GtkMenuTracker; typedef void (* GtkMenuTrackerInsertFunc) (GtkMenuTrackerItem *item, - gint position, + int position, gpointer user_data); -typedef void (* GtkMenuTrackerRemoveFunc) (gint position, +typedef void (* GtkMenuTrackerRemoveFunc) (int position, gpointer user_data); diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c index e3f057c125..c6d81cbd4b 100644 --- a/gtk/gtkmodules.c +++ b/gtk/gtkmodules.c @@ -150,7 +150,7 @@ _gtk_get_module_path (const gchar *type) gchar **paths = get_module_path(); gchar **path; gchar **result; - gint count = 0; + int count = 0; for (path = paths; *path; path++) count++; @@ -160,7 +160,7 @@ _gtk_get_module_path (const gchar *type) count = 0; for (path = get_module_path (); *path; path++) { - gint use_version, use_host; + int use_version, use_host; for (use_version = TRUE; use_version >= FALSE; use_version--) for (use_host = TRUE; use_host >= FALSE; use_host--) diff --git a/gtk/gtkmountoperation-stub.c b/gtk/gtkmountoperation-stub.c index 30ecb9d0c8..be8472a016 100644 --- a/gtk/gtkmountoperation-stub.c +++ b/gtk/gtkmountoperation-stub.c @@ -44,7 +44,7 @@ _gtk_mount_operation_lookup_context_free (GtkMountOperationLookupContext *contex gboolean _gtk_mount_operation_lookup_info (GtkMountOperationLookupContext *context, GPid pid, - gint size_pixels, + int size_pixels, gchar **out_name, gchar **out_command_line, GdkTexture **out_texture) diff --git a/gtk/gtkmountoperation-x11.c b/gtk/gtkmountoperation-x11.c index 678d54c64a..5d2f10c01b 100644 --- a/gtk/gtkmountoperation-x11.c +++ b/gtk/gtkmountoperation-x11.c @@ -521,7 +521,7 @@ get_window_list (GdkDisplay *display, struct _GtkMountOperationLookupContext { - /* Hash from pid (gint) -> XID (gint) + /* Hash from pid (int) -> XID (int) * * Note that XIDs are at most 27 bits - however, also note that sizeof(XID) == 8 on * x86_64 - that's just xlib brokenness. So it's safe to stuff the XID into a pointer. @@ -535,8 +535,8 @@ _gtk_mount_operation_lookup_context_get (GdkDisplay *display) { GtkMountOperationLookupContext *context; Window *mapping; - gint mapping_length; - gint n; + int mapping_length; + int n; context = g_new0 (GtkMountOperationLookupContext, 1); @@ -554,7 +554,7 @@ _gtk_mount_operation_lookup_context_get (GdkDisplay *display) &mapping_length); for (n = 0; n < mapping_length; n++) { - gint pid; + int pid; if (!get_cardinal (context->display, GDK_DISPLAY_XDISPLAY (context->display), @@ -566,7 +566,7 @@ _gtk_mount_operation_lookup_context_get (GdkDisplay *display) g_hash_table_insert (context->pid_to_window, GINT_TO_POINTER (pid), - GINT_TO_POINTER ((gint) mapping[n])); + GINT_TO_POINTER ((int) mapping[n])); } g_free (mapping); @@ -928,7 +928,7 @@ get_name_for_window_with_pid (GtkMountOperationLookupContext *context, static GdkTexture * get_texture_for_window_with_pid (GtkMountOperationLookupContext *context, GPid pid, - gint size_pixels) + int size_pixels) { Window window; GdkTexture *ret; @@ -954,8 +954,8 @@ get_texture_for_window_with_pid (GtkMountOperationLookupContext *context, if (window != None) { - gint width; - gint height; + int width; + int height; guchar *pixdata; if (read_rgb_icon (context->display, @@ -992,7 +992,7 @@ static const gchar *well_known_commands[] = gboolean _gtk_mount_operation_lookup_info (GtkMountOperationLookupContext *context, GPid pid, - gint size_pixels, + int size_pixels, gchar **out_name, gchar **out_command_line, GdkTexture **out_texture) diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c index cfaa834b9c..a54d109f58 100644 --- a/gtk/gtkmountoperation.c +++ b/gtk/gtkmountoperation.c @@ -338,7 +338,7 @@ remember_button_toggled (GtkToggleButton *button, static void pw_dialog_got_response (GtkDialog *dialog, - gint response_id, + int response_id, GtkMountOperation *mount_op) { GtkMountOperationPrivate *priv = mount_op->priv; @@ -910,7 +910,7 @@ gtk_mount_operation_ask_password (GMountOperation *mount_op, static void question_dialog_button_clicked (GtkDialog *dialog, - gint button_number, + int button_number, GMountOperation *op) { GtkMountOperationPrivate *priv; @@ -1065,7 +1065,7 @@ gtk_mount_operation_ask_question (GMountOperation *op, static void show_processes_button_clicked (GtkDialog *dialog, - gint button_number, + int button_number, GMountOperation *op) { GtkMountOperationPrivate *priv; @@ -1088,7 +1088,7 @@ show_processes_button_clicked (GtkDialog *dialog, g_object_unref (op); } -static gint +static int pid_equal (gconstpointer a, gconstpointer b) { @@ -1107,7 +1107,7 @@ diff_sorted_arrays (GArray *array1, GArray *added_indices, GArray *removed_indices) { - gint order; + int order; guint n1, n2; guint elem_size; @@ -1289,8 +1289,8 @@ update_process_list_store (GtkMountOperation *mount_operation, * items as appropriate */ current_pids = g_array_new (FALSE, FALSE, sizeof (GPid)); - pid_indices_to_add = g_array_new (FALSE, FALSE, sizeof (gint)); - pid_indices_to_remove = g_array_new (FALSE, FALSE, sizeof (gint)); + pid_indices_to_add = g_array_new (FALSE, FALSE, sizeof (int)); + pid_indices_to_remove = g_array_new (FALSE, FALSE, sizeof (int)); if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list_store), &iter)) { @@ -1445,8 +1445,8 @@ do_popup_menu_for_process_tree_view (GtkWidget *widget, gdk_event_get_position (event, &x, &y); if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (op->priv->process_tree_view), - (gint) x, - (gint) y, + (int) x, + (int) y, &path, NULL, NULL, diff --git a/gtk/gtkmountoperationprivate.h b/gtk/gtkmountoperationprivate.h index 40b63e9ae9..7750946368 100644 --- a/gtk/gtkmountoperationprivate.h +++ b/gtk/gtkmountoperationprivate.h @@ -37,7 +37,7 @@ GtkMountOperationLookupContext *_gtk_mount_operation_lookup_context_get (GdkDis gboolean _gtk_mount_operation_lookup_info (GtkMountOperationLookupContext *context, GPid pid, - gint size_pixels, + int size_pixels, gchar **out_name, gchar **out_command_line, GdkTexture **out_texture); diff --git a/gtk/gtknativedialog.c b/gtk/gtknativedialog.c index eed21777fd..3fad9880fc 100644 --- a/gtk/gtknativedialog.c +++ b/gtk/gtknativedialog.c @@ -66,7 +66,7 @@ struct _GtkNativeDialogPrivate guint modal : 1; /* Run state */ - gint run_response_id; + int run_response_id; GMainLoop *run_loop; /* Non-NULL when in run */ }; diff --git a/gtk/gtknativedialog.h b/gtk/gtknativedialog.h index f6a2dc20ae..09f8546f19 100644 --- a/gtk/gtknativedialog.h +++ b/gtk/gtknativedialog.h @@ -36,7 +36,7 @@ struct _GtkNativeDialogClass { GObjectClass parent_class; - void (* response) (GtkNativeDialog *self, gint response_id); + void (* response) (GtkNativeDialog *self, int response_id); /* */ void (* show) (GtkNativeDialog *self); diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 2b7e54f332..b0c6cacedb 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -192,18 +192,18 @@ struct _GtkNotebookClass gboolean (* focus_tab) (GtkNotebook *notebook, GtkNotebookTab type); gboolean (* change_current_page) (GtkNotebook *notebook, - gint offset); + int offset); void (* move_focus_out) (GtkNotebook *notebook, GtkDirectionType direction); gboolean (* reorder_tab) (GtkNotebook *notebook, GtkDirectionType direction, gboolean move_to_last); /* More vfuncs */ - gint (* insert_page) (GtkNotebook *notebook, + int (* insert_page) (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label, - gint position); + int position); GtkNotebook * (* create_window) (GtkNotebook *notebook, GtkWidget *page); @@ -243,15 +243,15 @@ struct _GtkNotebook GList *first_tab; /* The first tab visible (for scrolling notebooks) */ GList *focus_tab; - gint drag_begin_x; - gint drag_begin_y; - gint drag_offset_x; - gint drag_offset_y; - gint drag_surface_x; - gint drag_surface_y; - gint mouse_x; - gint mouse_y; - gint pressed_button; + int drag_begin_x; + int drag_begin_y; + int drag_offset_x; + int drag_offset_y; + int drag_surface_x; + int drag_surface_y; + int mouse_x; + int mouse_y; + int pressed_button; GQuark group; @@ -741,7 +741,7 @@ static gboolean gtk_notebook_select_page (GtkNotebook *notebook, static gboolean gtk_notebook_focus_tab (GtkNotebook *notebook, GtkNotebookTab type); static gboolean gtk_notebook_change_current_page (GtkNotebook *notebook, - gint offset); + int offset); static void gtk_notebook_move_focus_out (GtkNotebook *notebook, GtkDirectionType direction_type); static gboolean gtk_notebook_reorder_tab (GtkNotebook *notebook, @@ -801,22 +801,22 @@ static void gtk_notebook_remove (GtkNotebook *notebook, GtkWidget *widget); /*** GtkNotebook Methods ***/ -static gint gtk_notebook_real_insert_page (GtkNotebook *notebook, +static int gtk_notebook_real_insert_page (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label, - gint position); + int position); static GtkNotebook *gtk_notebook_create_window (GtkNotebook *notebook, GtkWidget *page); static void gtk_notebook_measure_tabs (GtkGizmo *gizmo, GtkOrientation orientation, - gint for_size, - gint *minimum, - gint *natural, - gint *minimum_baseline, - gint *natural_baseline); + int for_size, + int *minimum, + int *natural, + int *minimum_baseline, + int *natural_baseline); static void gtk_notebook_allocate_tabs (GtkGizmo *gizmo, int width, int height, @@ -828,21 +828,21 @@ static void gtk_notebook_snapshot_tabs (GtkGizmo *gizmo, static void gtk_notebook_real_remove (GtkNotebook *notebook, GList *list); static void gtk_notebook_update_labels (GtkNotebook *notebook); -static gint gtk_notebook_timer (GtkNotebook *notebook); +static int gtk_notebook_timer (GtkNotebook *notebook); static void gtk_notebook_set_scroll_timer (GtkNotebook *notebook); -static gint gtk_notebook_page_compare (gconstpointer a, +static int gtk_notebook_page_compare (gconstpointer a, gconstpointer b); static GList* gtk_notebook_find_child (GtkNotebook *notebook, GtkWidget *child); static GList * gtk_notebook_search_page (GtkNotebook *notebook, GList *list, - gint direction, + int direction, gboolean find_visible); static void gtk_notebook_child_reordered (GtkNotebook *notebook, GtkNotebookPage *page); -static gint gtk_notebook_insert_notebook_page (GtkNotebook *notebook, - GtkNotebookPage *page, - int position); +static int gtk_notebook_insert_notebook_page (GtkNotebook *notebook, + GtkNotebookPage *page, + int position); /*** GtkNotebook Size Allocate Functions ***/ static void gtk_notebook_pages_allocate (GtkNotebook *notebook, @@ -851,7 +851,7 @@ static void gtk_notebook_pages_allocate (GtkNotebook *notebook, static void gtk_notebook_calc_tabs (GtkNotebook *notebook, GList *start, GList **end, - gint *tab_space, + int *tab_space, guint direction); /*** GtkNotebook Page Switch Methods ***/ @@ -862,7 +862,7 @@ static void gtk_notebook_real_switch_page (GtkNotebook *notebook, /*** GtkNotebook Page Switch Functions ***/ static void gtk_notebook_switch_page (GtkNotebook *notebook, GtkNotebookPage *page); -static gint gtk_notebook_page_select (GtkNotebook *notebook, +static int gtk_notebook_page_select (GtkNotebook *notebook, gboolean move_focus); static void gtk_notebook_switch_focus_tab (GtkNotebook *notebook, GList *new_child); @@ -1556,7 +1556,7 @@ gtk_notebook_focus_tab (GtkNotebook *notebook, static gboolean gtk_notebook_change_current_page (GtkNotebook *notebook, - gint offset) + int offset) { GList *current = NULL; @@ -1666,7 +1666,7 @@ gtk_notebook_move_focus_out (GtkNotebook *notebook, g_object_unref (notebook); } -static gint +static int reorder_tab (GtkNotebook *notebook, GList *position, GList *tab) { GList *elem; @@ -1714,7 +1714,7 @@ gtk_notebook_reorder_tab (GtkNotebook *notebook, { GtkDirectionType effective_direction = get_effective_direction (notebook, direction_type); GList *last, *child, *element; - gint page_num, old_page_num, i; + int page_num, old_page_num, i; if (!gtk_widget_is_focus (GTK_WIDGET (notebook)) || !notebook->show_tabs) return FALSE; @@ -1947,9 +1947,9 @@ gtk_notebook_unmap (GtkWidget *widget) static void gtk_notebook_distribute_arrow_width (GtkNotebook *notebook, GtkPackType type, - gint size, - gint *out_left, - gint *out_right) + int size, + int *out_left, + int *out_right) { GtkRequestedSize sizes[2]; @@ -1991,14 +1991,14 @@ static void gtk_notebook_measure_arrows (GtkNotebook *notebook, GtkPackType type, GtkOrientation orientation, - gint for_size, - gint *minimum, - gint *natural, - gint *minimum_baseline, - gint *natural_baseline) + int for_size, + int *minimum, + int *natural, + int *minimum_baseline, + int *natural_baseline) { - gint child1_min, child1_nat; - gint child2_min, child2_nat; + int child1_min, child1_nat; + int child2_min, child2_nat; if (orientation == GTK_ORIENTATION_HORIZONTAL) { @@ -2035,7 +2035,7 @@ gtk_notebook_measure_arrows (GtkNotebook *notebook, } else { - gint child1_size, child2_size; + int child1_size, child2_size; if (for_size > -1) gtk_notebook_distribute_arrow_width (notebook, type, for_size, &child1_size, &child2_size); @@ -2079,9 +2079,9 @@ static void gtk_notebook_get_preferred_tabs_size (GtkNotebook *notebook, GtkRequisition *requisition) { - gint tab_width = 0; - gint tab_height = 0; - gint tab_max = 0; + int tab_width = 0; + int tab_height = 0; + int tab_max = 0; guint vis_pages = 0; GList *children; GtkNotebookPage *page; @@ -2144,7 +2144,7 @@ gtk_notebook_get_preferred_tabs_size (GtkNotebook *notebook, if (notebook->scrollable) { - gint arrow_height, unused; + int arrow_height, unused; gtk_notebook_measure_arrows (notebook, GTK_PACK_START, GTK_ORIENTATION_VERTICAL, @@ -2175,7 +2175,7 @@ gtk_notebook_get_preferred_tabs_size (GtkNotebook *notebook, if (notebook->scrollable) { - gint start_arrow_width, end_arrow_width, unused; + int start_arrow_width, end_arrow_width, unused; gtk_notebook_measure_arrows (notebook, GTK_PACK_START, @@ -2204,7 +2204,7 @@ gtk_notebook_get_preferred_tabs_size (GtkNotebook *notebook, if (notebook->scrollable) { - gint arrow_width, unused; + int arrow_width, unused; gtk_notebook_measure_arrows (notebook, GTK_PACK_START, GTK_ORIENTATION_HORIZONTAL, @@ -2236,7 +2236,7 @@ gtk_notebook_get_preferred_tabs_size (GtkNotebook *notebook, if (notebook->scrollable) { - gint start_arrow_height, end_arrow_height, unused; + int start_arrow_height, end_arrow_height, unused; gtk_notebook_measure_arrows (notebook, GTK_PACK_START, @@ -2274,11 +2274,11 @@ gtk_notebook_get_preferred_tabs_size (GtkNotebook *notebook, static void gtk_notebook_measure_tabs (GtkGizmo *gizmo, GtkOrientation orientation, - gint size, - gint *minimum, - gint *natural, - gint *minimum_baseline, - gint *natural_baseline) + int size, + int *minimum, + int *natural, + int *minimum_baseline, + int *natural_baseline) { GtkWidget *widget = gtk_widget_get_parent (GTK_WIDGET (gizmo)); GtkNotebook *notebook = GTK_NOTEBOOK (gtk_widget_get_parent (widget)); @@ -2333,10 +2333,10 @@ gtk_notebook_show_arrows (GtkNotebook *notebook) static GtkNotebookArrow gtk_notebook_get_arrow (GtkNotebook *notebook, - gint x, - gint y) + int x, + int y) { - gint i; + int i; if (gtk_notebook_show_arrows (notebook)) { @@ -2385,7 +2385,7 @@ gtk_notebook_do_arrow (GtkNotebook *notebook, static gboolean gtk_notebook_arrow_button_press (GtkNotebook *notebook, GtkNotebookArrow arrow, - gint button) + int button) { GtkWidget *widget = GTK_WIDGET (notebook); gboolean is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL; @@ -2585,7 +2585,7 @@ get_drop_position (GtkNotebook *notebook) GList *children, *last_child; GtkNotebookPage *page; gboolean is_rtl; - gint x, y; + int x, y; x = notebook->mouse_x; y = notebook->mouse_y; @@ -2685,7 +2685,7 @@ gtk_notebook_stop_reorder (GtkNotebook *notebook) { if (notebook->operation == DRAG_OPERATION_REORDER) { - gint old_page_num, page_num, i; + int old_page_num, page_num, i; GList *element; element = get_drop_position (notebook); @@ -2766,7 +2766,7 @@ get_pointer_position (GtkNotebook *notebook) { GtkWidget *widget = GTK_WIDGET (notebook); graphene_rect_t area; - gint width, height; + int width, height; gboolean is_rtl; if (!notebook->scrollable) @@ -2779,7 +2779,7 @@ get_pointer_position (GtkNotebook *notebook) if (notebook->tab_pos == GTK_POS_TOP || notebook->tab_pos == GTK_POS_BOTTOM) { - gint x = notebook->mouse_x; + int x = notebook->mouse_x; is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL; @@ -2792,7 +2792,7 @@ get_pointer_position (GtkNotebook *notebook) } else { - gint y = notebook->mouse_y; + int y = notebook->mouse_y; if (y > height - SCROLL_THRESHOLD) return POINTER_AFTER; @@ -2829,10 +2829,10 @@ scroll_notebook_timer (gpointer data) static gboolean check_threshold (GtkNotebook *notebook, - gint current_x, - gint current_y) + int current_x, + int current_y) { - gint dnd_threshold; + int dnd_threshold; graphene_rect_t rectangle; GtkSettings *settings; @@ -2966,7 +2966,7 @@ gtk_notebook_motion (GtkEventController *controller, static void update_arrow_state (GtkNotebook *notebook) { - gint i; + int i; gboolean is_rtl, left; is_rtl = gtk_widget_get_direction (GTK_WIDGET (notebook)) == GTK_TEXT_DIR_RTL; @@ -3035,7 +3035,7 @@ update_arrow_nodes (GtkNotebook *notebook) gboolean arrow[4]; const char *up_icon_name; const char *down_icon_name; - gint i; + int i; if (notebook->tab_pos == GTK_POS_LEFT || notebook->tab_pos == GTK_POS_RIGHT) @@ -3329,7 +3329,7 @@ do_detach_tab (GtkNotebook *from, GtkWidget *tab_label, *menu_label; gboolean tab_expand, tab_fill, reorderable, detachable; GList *element; - gint page_num; + int page_num; GtkNotebookPage *page; menu_label = gtk_notebook_get_menu_label (from, child); @@ -3390,7 +3390,7 @@ gtk_notebook_remove (GtkNotebook *notebook, { GtkNotebookPage *page; GList *children, *list; - gint page_num = 0; + int page_num = 0; children = notebook->children; while (children) @@ -3447,7 +3447,7 @@ focus_tabs_in (GtkNotebook *notebook) static gboolean focus_tabs_move (GtkNotebook *notebook, GtkDirectionType direction, - gint search_direction) + int search_direction) { GList *new_page; @@ -3479,7 +3479,7 @@ focus_child_in (GtkNotebook *notebook, static gboolean focus_action_in (GtkNotebook *notebook, - gint action, + int action, GtkDirectionType direction) { if (notebook->action_widget[action] && @@ -3499,8 +3499,8 @@ gtk_notebook_focus (GtkWidget *widget, GtkNotebook *notebook = GTK_NOTEBOOK (widget); GtkWidget *old_focus_child; GtkDirectionType effective_direction; - gint first_action; - gint last_action; + int first_action; + int last_action; gboolean widget_is_focus; @@ -3802,11 +3802,11 @@ page_visible_cb (GtkWidget *child, static void measure_tab (GtkGizmo *gizmo, GtkOrientation orientation, - gint for_size, - gint *minimum, - gint *natural, - gint *minimum_baseline, - gint *natural_baseline) + int for_size, + int *minimum, + int *natural, + int *minimum_baseline, + int *natural_baseline) { GtkNotebook *notebook = g_object_get_data (G_OBJECT (gizmo), "notebook"); GList *l; @@ -3910,12 +3910,12 @@ gtk_notebook_tab_drop_leave (GtkEventController *controller, g_clear_handle_id (¬ebook->switch_page_timer, g_source_remove); } -static gint +static int gtk_notebook_insert_notebook_page (GtkNotebook *notebook, GtkNotebookPage *page, int position) { - gint nchildren; + int nchildren; GList *list; GtkWidget *sibling; GtkEventController *controller; @@ -4007,12 +4007,12 @@ gtk_notebook_insert_notebook_page (GtkNotebook *notebook, return gtk_notebook_page_num (notebook, page->child); } -static gint +static int gtk_notebook_real_insert_page (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label, - gint position) + int position) { GtkNotebookPage *page; int ret; @@ -4067,7 +4067,7 @@ gtk_notebook_set_scroll_timer (GtkNotebook *notebook) } } -static gint +static int gtk_notebook_page_compare (gconstpointer a, gconstpointer b) { @@ -4121,7 +4121,7 @@ gtk_notebook_real_remove (GtkNotebook *notebook, { GtkNotebookPage *page; GList * next_list; - gint need_resize = FALSE; + int need_resize = FALSE; GtkWidget *tab_label; gboolean destroying; int position; @@ -4213,7 +4213,7 @@ gtk_notebook_update_labels (GtkNotebook *notebook) GtkNotebookPage *page; GList *list; char string[32]; - gint page_num = 1; + int page_num = 1; if (!notebook->show_tabs && !notebook->menu) return; @@ -4263,7 +4263,7 @@ gtk_notebook_update_labels (GtkNotebook *notebook) static GList * gtk_notebook_search_page (GtkNotebook *notebook, GList *list, - gint direction, + int direction, gboolean find_visible) { GtkNotebookPage *page = NULL; @@ -4321,7 +4321,7 @@ gtk_notebook_snapshot_tabs (GtkGizmo *gizmo, GtkNotebookPage *page; GList *children; gboolean showarrow; - gint step = STEP_PREV; + int step = STEP_PREV; gboolean is_rtl; GtkPositionType tab_pos; guint i; @@ -4442,7 +4442,7 @@ gtk_notebook_allocate_arrows (GtkNotebook *notebook, GtkAllocation *allocation) { GtkAllocation arrow_allocation; - gint size1, size2, min, nat; + int size1, size2, min, nat; guint i, ii; switch (notebook->tab_pos) @@ -4545,7 +4545,7 @@ gtk_notebook_tab_space (GtkNotebook *notebook, int notebook_height, gboolean *show_arrows, GtkAllocation *tabs_allocation, - gint *tab_space) + int *tab_space) { GList *children; GtkPositionType tab_pos = get_effective_tab_pos (notebook); @@ -4630,10 +4630,10 @@ static void gtk_notebook_calculate_shown_tabs (GtkNotebook *notebook, gboolean show_arrows, const GtkAllocation *tabs_allocation, - gint tab_space, + int tab_space, GList **last_child, - gint *n, - gint *remaining_space) + int *n, + int *remaining_space) { GList *children; GtkNotebookPage *page; @@ -4794,7 +4794,7 @@ gtk_notebook_calculate_shown_tabs (GtkNotebook *notebook, else /* !show_arrows */ { GtkOrientation tab_expand_orientation; - gint c = 0; + int c = 0; *n = 0; if (notebook->tab_pos == GTK_POS_TOP || notebook->tab_pos == GTK_POS_BOTTOM) @@ -4830,7 +4830,7 @@ gtk_notebook_calculate_shown_tabs (GtkNotebook *notebook, static gboolean get_allocate_at_bottom (GtkWidget *widget, - gint search_direction) + int search_direction) { gboolean is_rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL); GtkPositionType tab_pos = get_effective_tab_pos (GTK_NOTEBOOK (widget)); @@ -4859,17 +4859,17 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook, GList **children, GList *last_child, gboolean showarrow, - gint direction, - gint *remaining_space, - gint *expanded_tabs, + int direction, + int *remaining_space, + int *expanded_tabs, const GtkAllocation *allocation) { GtkWidget *widget; GtkNotebookPage *page; gboolean allocate_at_bottom; - gint tab_extra_space; + int tab_extra_space; GtkPositionType tab_pos; - gint left_x, right_x, top_y, bottom_y, anchor; + int left_x, right_x, top_y, bottom_y, anchor; gboolean gap_left, packing_changed; GtkAllocation child_allocation; GtkOrientation tab_expand_orientation; @@ -5161,8 +5161,8 @@ gtk_notebook_pages_allocate (GtkNotebook *notebook, GList *last_child = NULL; gboolean showarrow = FALSE; GtkAllocation tabs_allocation; - gint tab_space, remaining_space; - gint expanded_tabs; + int tab_space, remaining_space; + int expanded_tabs; if (!notebook->show_tabs || !gtk_notebook_has_current_page (notebook)) return; @@ -5197,7 +5197,7 @@ static void gtk_notebook_calc_tabs (GtkNotebook *notebook, GList *start, GList **end, - gint *tab_space, + int *tab_space, guint direction) { GtkNotebookPage *page = NULL; @@ -5373,7 +5373,7 @@ gtk_notebook_switch_page (GtkNotebook *notebook, page_num); } -static gint +static int gtk_notebook_page_select (GtkNotebook *notebook, gboolean move_focus) { @@ -5536,7 +5536,7 @@ gtk_notebook_menu_label_unparent (GtkWidget *widget) * Returns: the index (starting from 0) of the appended * page in the notebook, or -1 if function fails */ -gint +int gtk_notebook_append_page (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label) @@ -5567,7 +5567,7 @@ gtk_notebook_append_page (GtkNotebook *notebook, * Returns: the index (starting from 0) of the appended * page in the notebook, or -1 if function fails */ -gint +int gtk_notebook_append_page_menu (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, @@ -5593,7 +5593,7 @@ gtk_notebook_append_page_menu (GtkNotebook *notebook, * Returns: the index (starting from 0) of the prepended * page in the notebook, or -1 if function fails */ -gint +int gtk_notebook_prepend_page (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label) @@ -5624,7 +5624,7 @@ gtk_notebook_prepend_page (GtkNotebook *notebook, * Returns: the index (starting from 0) of the prepended * page in the notebook, or -1 if function fails */ -gint +int gtk_notebook_prepend_page_menu (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, @@ -5652,11 +5652,11 @@ gtk_notebook_prepend_page_menu (GtkNotebook *notebook, * Returns: the index (starting from 0) of the inserted * page in the notebook, or -1 if function fails */ -gint +int gtk_notebook_insert_page (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, - gint position) + int position) { g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), -1); g_return_val_if_fail (GTK_IS_WIDGET (child), -1); @@ -5666,7 +5666,7 @@ gtk_notebook_insert_page (GtkNotebook *notebook, } -static gint +static int gtk_notebook_page_compare_tab (gconstpointer a, gconstpointer b) { @@ -5716,12 +5716,12 @@ gtk_notebook_mnemonic_activate_switch_page (GtkWidget *child, * Returns: the index (starting from 0) of the inserted * page in the notebook */ -gint +int gtk_notebook_insert_page_menu (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label, - gint position) + int position) { GtkNotebookClass *class; @@ -5746,7 +5746,7 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook, */ void gtk_notebook_remove_page (GtkNotebook *notebook, - gint page_num) + int page_num) { GList *list = NULL; @@ -5778,7 +5778,7 @@ gtk_notebook_remove_page (GtkNotebook *notebook, * page in the notebook. If the notebook has no pages, * then -1 will be returned. */ -gint +int gtk_notebook_get_current_page (GtkNotebook *notebook) { g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), -1); @@ -5802,7 +5802,7 @@ gtk_notebook_get_current_page (GtkNotebook *notebook) */ GtkWidget* gtk_notebook_get_nth_page (GtkNotebook *notebook, - gint page_num) + int page_num) { GtkNotebookPage *page; GList *list; @@ -5831,7 +5831,7 @@ gtk_notebook_get_nth_page (GtkNotebook *notebook, * * Returns: the number of pages in the notebook */ -gint +int gtk_notebook_get_n_pages (GtkNotebook *notebook) { g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), 0); @@ -5850,12 +5850,12 @@ gtk_notebook_get_n_pages (GtkNotebook *notebook) * Returns: the index of the page containing @child, or * -1 if @child is not in the notebook */ -gint +int gtk_notebook_page_num (GtkNotebook *notebook, GtkWidget *child) { GList *children; - gint num; + int num; g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), -1); @@ -5892,7 +5892,7 @@ gtk_notebook_page_num (GtkNotebook *notebook, */ void gtk_notebook_set_current_page (GtkNotebook *notebook, - gint page_num) + int page_num) { GList *list; @@ -6025,7 +6025,7 @@ gtk_notebook_set_show_tabs (GtkNotebook *notebook, { GtkNotebookPage *page; GList *children; - gint i; + int i; g_return_if_fail (GTK_IS_NOTEBOOK (notebook)); @@ -6100,7 +6100,7 @@ gtk_notebook_update_tab_pos (GtkNotebook *notebook) GTK_STYLE_CLASS_TOP, GTK_STYLE_CLASS_BOTTOM }; - gint i; + int i; tab_pos = get_effective_tab_pos (notebook); @@ -6694,13 +6694,13 @@ gtk_notebook_child_reordered (GtkNotebook *notebook, void gtk_notebook_reorder_child (GtkNotebook *notebook, GtkWidget *child, - gint position) + int position) { GList *list, *new_list; GtkNotebookPage *page; - gint old_pos; - gint max_pos; - gint i; + int old_pos; + int max_pos; + int i; g_return_if_fail (GTK_IS_NOTEBOOK (notebook)); g_return_if_fail (GTK_IS_WIDGET (child)); diff --git a/gtk/gtknotebook.h b/gtk/gtknotebook.h index 54a0b8a8ee..9d869fe5f8 100644 --- a/gtk/gtknotebook.h +++ b/gtk/gtknotebook.h @@ -63,37 +63,37 @@ GType gtk_notebook_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkWidget * gtk_notebook_new (void); GDK_AVAILABLE_IN_ALL -gint gtk_notebook_append_page (GtkNotebook *notebook, +int gtk_notebook_append_page (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label); GDK_AVAILABLE_IN_ALL -gint gtk_notebook_append_page_menu (GtkNotebook *notebook, +int gtk_notebook_append_page_menu (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label); GDK_AVAILABLE_IN_ALL -gint gtk_notebook_prepend_page (GtkNotebook *notebook, +int gtk_notebook_prepend_page (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label); GDK_AVAILABLE_IN_ALL -gint gtk_notebook_prepend_page_menu (GtkNotebook *notebook, +int gtk_notebook_prepend_page_menu (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label); GDK_AVAILABLE_IN_ALL -gint gtk_notebook_insert_page (GtkNotebook *notebook, +int gtk_notebook_insert_page (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, - gint position); + int position); GDK_AVAILABLE_IN_ALL -gint gtk_notebook_insert_page_menu (GtkNotebook *notebook, +int gtk_notebook_insert_page_menu (GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label, - gint position); + int position); GDK_AVAILABLE_IN_ALL void gtk_notebook_remove_page (GtkNotebook *notebook, - gint page_num); + int page_num); /*********************************************************** * Tabs drag and drop * @@ -112,18 +112,18 @@ const gchar *gtk_notebook_get_group_name (GtkNotebook *notebook); ***********************************************************/ GDK_AVAILABLE_IN_ALL -gint gtk_notebook_get_current_page (GtkNotebook *notebook); +int gtk_notebook_get_current_page (GtkNotebook *notebook); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_notebook_get_nth_page (GtkNotebook *notebook, - gint page_num); + int page_num); GDK_AVAILABLE_IN_ALL -gint gtk_notebook_get_n_pages (GtkNotebook *notebook); +int gtk_notebook_get_n_pages (GtkNotebook *notebook); GDK_AVAILABLE_IN_ALL -gint gtk_notebook_page_num (GtkNotebook *notebook, +int gtk_notebook_page_num (GtkNotebook *notebook, GtkWidget *child); GDK_AVAILABLE_IN_ALL void gtk_notebook_set_current_page (GtkNotebook *notebook, - gint page_num); + int page_num); GDK_AVAILABLE_IN_ALL void gtk_notebook_next_page (GtkNotebook *notebook); GDK_AVAILABLE_IN_ALL @@ -198,7 +198,7 @@ const gchar * gtk_notebook_get_menu_label_text (GtkNotebook *notebook, GDK_AVAILABLE_IN_ALL void gtk_notebook_reorder_child (GtkNotebook *notebook, GtkWidget *child, - gint position); + int position); GDK_AVAILABLE_IN_ALL gboolean gtk_notebook_get_tab_reorderable (GtkNotebook *notebook, GtkWidget *child); diff --git a/gtk/gtkpadcontroller.c b/gtk/gtkpadcontroller.c index 357670adc9..8fe2b39108 100644 --- a/gtk/gtkpadcontroller.c +++ b/gtk/gtkpadcontroller.c @@ -114,8 +114,8 @@ G_DEFINE_TYPE (GtkPadController, gtk_pad_controller, GTK_TYPE_EVENT_CONTROLLER) static const ActionEntryData * gtk_pad_action_find_match (GtkPadController *controller, GtkPadActionType type, - gint index, - gint mode) + int index, + int mode) { guint i; @@ -167,7 +167,7 @@ gtk_pad_controller_handle_mode_switch (GtkPadController *controller, if (GDK_IS_WAYLAND_DISPLAY (gdk_device_get_display (pad))) { const ActionEntryData *entry; - gint elem, idx, n_features; + int elem, idx, n_features; for (elem = GTK_PAD_ACTION_BUTTON; elem <= GTK_PAD_ACTION_STRIP; elem++) { @@ -421,7 +421,7 @@ gtk_pad_controller_new (GActionGroup *group, NULL); } -static gint +static int entry_compare_func (gconstpointer a, gconstpointer b) { @@ -474,9 +474,9 @@ gtk_pad_controller_add_entry (GtkPadController *controller, void gtk_pad_controller_set_action_entries (GtkPadController *controller, const GtkPadActionEntry *entries, - gint n_entries) + int n_entries) { - gint i; + int i; g_return_if_fail (GTK_IS_PAD_CONTROLLER (controller)); g_return_if_fail (entries != NULL); diff --git a/gtk/gtkpadcontroller.h b/gtk/gtkpadcontroller.h index b0749d626e..40a6a2fc20 100644 --- a/gtk/gtkpadcontroller.h +++ b/gtk/gtkpadcontroller.h @@ -84,12 +84,12 @@ GtkPadController *gtk_pad_controller_new (GActionGroup *group, GDK_AVAILABLE_IN_ALL void gtk_pad_controller_set_action_entries (GtkPadController *controller, const GtkPadActionEntry *entries, - gint n_entries); + int n_entries); GDK_AVAILABLE_IN_ALL void gtk_pad_controller_set_action (GtkPadController *controller, GtkPadActionType type, - gint index, - gint mode, + int index, + int mode, const gchar *label, const gchar *action_name); diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c index 2e353c0033..b45913dc3d 100644 --- a/gtk/gtkpagesetupunixdialog.c +++ b/gtk/gtkpagesetupunixdialog.c @@ -480,7 +480,7 @@ fill_paper_sizes_from_printer (GtkPageSetupUnixDialog *dialog, GList *list, *l; GtkPageSetup *current_page_setup, *page_setup; GtkPaperSize *paper_size; - gint i; + int i; g_list_store_remove_all (dialog->page_setup_list); @@ -608,7 +608,7 @@ double_to_string (gdouble d, gchar *val, *p; struct lconv *locale_data; const gchar *decimal_point; - gint decimal_point_len; + int decimal_point_len; locale_data = localeconv (); decimal_point = locale_data->decimal_point; @@ -637,7 +637,7 @@ double_to_string (gdouble d, static void custom_paper_dialog_response_cb (GtkDialog *custom_paper_dialog, - gint response_id, + int response_id, gpointer user_data) { GtkPageSetupUnixDialog *dialog = GTK_PAGE_SETUP_UNIX_DIALOG (user_data); diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index b76a09d564..7c6d07ab4d 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -142,12 +142,12 @@ struct _GtkPaned GtkGesture *pan_gesture; /* Used for touch */ GtkGesture *drag_gesture; /* Used for mice */ - gint start_child_size; - gint drag_pos; - gint last_allocation; - gint max_position; - gint min_position; - gint original_position; + int start_child_size; + int drag_pos; + int last_allocation; + int max_position; + int min_position; + int original_position; guint in_recursion : 1; guint resize_start_child : 1; @@ -226,9 +226,9 @@ static void gtk_paned_unrealize (GtkWidget *widget); static void gtk_paned_css_changed (GtkWidget *widget, GtkCssStyleChange *change); static void gtk_paned_calc_position (GtkPaned *paned, - gint allocation, - gint start_child_req, - gint end_child_req); + int allocation, + int start_child_req, + int end_child_req); static void gtk_paned_set_focus_child (GtkWidget *widget, GtkWidget *child); static void gtk_paned_set_saved_focus (GtkPaned *paned, @@ -1057,14 +1057,14 @@ gtk_paned_dispose (GObject *object) static void gtk_paned_compute_position (GtkPaned *paned, - gint allocation, - gint start_child_req, - gint end_child_req, - gint *min_pos, - gint *max_pos, - gint *out_pos) + int allocation, + int start_child_req, + int end_child_req, + int *min_pos, + int *max_pos, + int *out_pos) { - gint min, max, pos; + int min, max, pos; min = paned->shrink_start_child ? 0 : start_child_req; @@ -1114,12 +1114,12 @@ gtk_paned_compute_position (GtkPaned *paned, static void gtk_paned_get_preferred_size_for_orientation (GtkWidget *widget, - gint size, - gint *minimum, - gint *natural) + int size, + int *minimum, + int *natural) { GtkPaned *paned = GTK_PANED (widget); - gint child_min, child_nat; + int child_min, child_nat; *minimum = *natural = 0; @@ -1145,7 +1145,7 @@ gtk_paned_get_preferred_size_for_orientation (GtkWidget *widget, if (paned->start_child && gtk_widget_get_visible (paned->start_child) && paned->end_child && gtk_widget_get_visible (paned->end_child)) { - gint handle_size; + int handle_size; gtk_widget_measure (paned->handle_widget, paned->orientation, @@ -1160,20 +1160,20 @@ gtk_paned_get_preferred_size_for_orientation (GtkWidget *widget, static void gtk_paned_get_preferred_size_for_opposite_orientation (GtkWidget *widget, - gint size, - gint *minimum, - gint *natural) + int size, + int *minimum, + int *natural) { GtkPaned *paned = GTK_PANED (widget); - gint for_start_child, for_end_child; - gint child_min, child_nat; + int for_start_child, for_end_child; + int child_min, child_nat; if (size > -1 && paned->start_child && gtk_widget_get_visible (paned->start_child) && paned->end_child && gtk_widget_get_visible (paned->end_child)) { - gint start_child_req, end_child_req; - gint handle_size; + int start_child_req, end_child_req; + int handle_size; gtk_widget_measure (paned->handle_widget, OPPOSITE_ORIENTATION (paned->orientation), @@ -1261,7 +1261,7 @@ gtk_paned_size_allocate (GtkWidget *widget, GtkAllocation start_child_allocation; GtkAllocation end_child_allocation; GtkAllocation handle_allocation; - gint handle_size; + int handle_size; gtk_widget_measure (paned->handle_widget, paned->orientation, @@ -1271,7 +1271,7 @@ gtk_paned_size_allocate (GtkWidget *widget, if (paned->orientation == GTK_ORIENTATION_HORIZONTAL) { - gint start_child_width, end_child_width; + int start_child_width, end_child_width; gtk_widget_measure (paned->start_child, GTK_ORIENTATION_HORIZONTAL, height, @@ -1323,7 +1323,7 @@ gtk_paned_size_allocate (GtkWidget *widget, } else { - gint start_child_height, end_child_height; + int start_child_height, end_child_height; gtk_widget_measure (paned->start_child, GTK_ORIENTATION_VERTICAL, width, @@ -1493,9 +1493,9 @@ update_drag (GtkPaned *paned, int xpos, int ypos) { - gint pos; - gint handle_size; - gint size; + int pos; + int handle_size; + int size; if (paned->orientation == GTK_ORIENTATION_HORIZONTAL) pos = xpos; @@ -1801,7 +1801,7 @@ gtk_paned_get_shrink_end_child (GtkPaned *paned) * * Returns: position of the divider **/ -gint +int gtk_paned_get_position (GtkPaned *paned) { g_return_val_if_fail (GTK_IS_PANED (paned), 0); @@ -1819,7 +1819,7 @@ gtk_paned_get_position (GtkPaned *paned) **/ void gtk_paned_set_position (GtkPaned *paned, - gint position) + int position) { g_return_if_fail (GTK_IS_PANED (paned)); @@ -1867,13 +1867,13 @@ gtk_paned_set_position (GtkPaned *paned, static void gtk_paned_calc_position (GtkPaned *paned, - gint allocation, - gint start_child_req, - gint end_child_req) + int allocation, + int start_child_req, + int end_child_req) { - gint old_position; - gint old_min_position; - gint old_max_position; + int old_position; + int old_min_position; + int old_max_position; old_position = paned->start_child_size; old_min_position = paned->min_position; @@ -2221,9 +2221,9 @@ gtk_paned_move_handle (GtkPaned *paned, { if (gtk_widget_is_focus (GTK_WIDGET (paned))) { - gint old_position; - gint new_position; - gint increment; + int old_position; + int new_position; + int increment; enum { SINGLE_STEP_SIZE = 1, diff --git a/gtk/gtkpaned.h b/gtk/gtkpaned.h index cb35932f2e..af8919a2cc 100644 --- a/gtk/gtkpaned.h +++ b/gtk/gtkpaned.h @@ -79,10 +79,10 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_paned_get_shrink_end_child (GtkPaned *paned); GDK_AVAILABLE_IN_ALL -gint gtk_paned_get_position (GtkPaned *paned); +int gtk_paned_get_position (GtkPaned *paned); GDK_AVAILABLE_IN_ALL void gtk_paned_set_position (GtkPaned *paned, - gint position); + int position); GDK_AVAILABLE_IN_ALL void gtk_paned_set_wide_handle (GtkPaned *paned, diff --git a/gtk/gtkpango.c b/gtk/gtkpango.c index 28341813a7..bce931cdf0 100644 --- a/gtk/gtkpango.c +++ b/gtk/gtkpango.c @@ -61,7 +61,7 @@ _gtk_pango_get_default_attributes (AtkAttributeSet *attributes, PangoLayout *layout) { PangoContext *context; - gint i; + int i; PangoWrapMode mode; context = pango_layout_get_context (layout); @@ -169,9 +169,9 @@ _gtk_pango_get_default_attributes (AtkAttributeSet *attributes, AtkAttributeSet * _gtk_pango_get_run_attributes (AtkAttributeSet *attributes, PangoLayout *layout, - gint offset, - gint *start_offset, - gint *end_offset) + int offset, + int *start_offset, + int *end_offset) { PangoAttrIterator *iter; PangoAttrList *attr; @@ -180,7 +180,7 @@ _gtk_pango_get_run_attributes (AtkAttributeSet *attributes, PangoAttrColor *pango_color; PangoAttrLanguage *pango_lang; PangoAttrFloat *pango_float; - gint index, start_index, end_index; + int index, start_index, end_index; gboolean is_next; glong len; const gchar *text; @@ -336,13 +336,13 @@ _gtk_pango_get_run_attributes (AtkAttributeSet *attributes, * * Returns: the new position */ -static gint +static int _gtk_pango_move_chars (PangoLayout *layout, - gint offset, - gint count) + int offset, + int count) { const PangoLogAttr *attrs; - gint n_attrs; + int n_attrs; attrs = pango_layout_get_log_attrs_readonly (layout, &n_attrs); @@ -382,13 +382,13 @@ _gtk_pango_move_chars (PangoLayout *layout, * * Returns: the new position */ -static gint +static int _gtk_pango_move_words (PangoLayout *layout, - gint offset, - gint count) + int offset, + int count) { const PangoLogAttr *attrs; - gint n_attrs; + int n_attrs; attrs = pango_layout_get_log_attrs_readonly (layout, &n_attrs); @@ -428,13 +428,13 @@ _gtk_pango_move_words (PangoLayout *layout, * * Returns: the new position */ -static gint +static int _gtk_pango_move_sentences (PangoLayout *layout, - gint offset, - gint count) + int offset, + int count) { const PangoLogAttr *attrs; - gint n_attrs; + int n_attrs; attrs = pango_layout_get_log_attrs_readonly (layout, &n_attrs); @@ -470,10 +470,10 @@ _gtk_pango_move_sentences (PangoLayout *layout, */ static gboolean _gtk_pango_is_inside_word (PangoLayout *layout, - gint offset) + int offset) { const PangoLogAttr *attrs; - gint n_attrs; + int n_attrs; attrs = pango_layout_get_log_attrs_readonly (layout, &n_attrs); @@ -499,10 +499,10 @@ _gtk_pango_is_inside_word (PangoLayout *layout, */ static gboolean _gtk_pango_is_inside_sentence (PangoLayout *layout, - gint offset) + int offset) { const PangoLogAttr *attrs; - gint n_attrs; + int n_attrs; attrs = pango_layout_get_log_attrs_readonly (layout, &n_attrs); @@ -519,13 +519,13 @@ _gtk_pango_is_inside_sentence (PangoLayout *layout, static void pango_layout_get_line_before (PangoLayout *layout, AtkTextBoundary boundary_type, - gint offset, - gint *start_offset, - gint *end_offset) + int offset, + int *start_offset, + int *end_offset) { PangoLayoutIter *iter; PangoLayoutLine *line, *prev_line = NULL, *prev_prev_line = NULL; - gint index, start_index, end_index; + int index, start_index, end_index; const gchar *text; gboolean found = FALSE; @@ -592,13 +592,13 @@ pango_layout_get_line_before (PangoLayout *layout, static void pango_layout_get_line_at (PangoLayout *layout, AtkTextBoundary boundary_type, - gint offset, - gint *start_offset, - gint *end_offset) + int offset, + int *start_offset, + int *end_offset) { PangoLayoutIter *iter; PangoLayoutLine *line, *prev_line = NULL; - gint index, start_index, end_index; + int index, start_index, end_index; const gchar *text; gboolean found = FALSE; @@ -656,13 +656,13 @@ pango_layout_get_line_at (PangoLayout *layout, static void pango_layout_get_line_after (PangoLayout *layout, AtkTextBoundary boundary_type, - gint offset, - gint *start_offset, - gint *end_offset) + int offset, + int *start_offset, + int *end_offset) { PangoLayoutIter *iter; PangoLayoutLine *line, *prev_line = NULL; - gint index, start_index, end_index; + int index, start_index, end_index; const gchar *text; gboolean found = FALSE; @@ -746,14 +746,14 @@ pango_layout_get_line_after (PangoLayout *layout, gchar * _gtk_pango_get_text_before (PangoLayout *layout, AtkTextBoundary boundary_type, - gint offset, - gint *start_offset, - gint *end_offset) + int offset, + int *start_offset, + int *end_offset) { const gchar *text; - gint start, end; + int start, end; const PangoLogAttr *attrs; - gint n_attrs; + int n_attrs; text = pango_layout_get_text (layout); @@ -851,14 +851,14 @@ _gtk_pango_get_text_before (PangoLayout *layout, gchar * _gtk_pango_get_text_after (PangoLayout *layout, AtkTextBoundary boundary_type, - gint offset, - gint *start_offset, - gint *end_offset) + int offset, + int *start_offset, + int *end_offset) { const gchar *text; - gint start, end; + int start, end; const PangoLogAttr *attrs; - gint n_attrs; + int n_attrs; text = pango_layout_get_text (layout); @@ -962,14 +962,14 @@ _gtk_pango_get_text_after (PangoLayout *layout, gchar * _gtk_pango_get_text_at (PangoLayout *layout, AtkTextBoundary boundary_type, - gint offset, - gint *start_offset, - gint *end_offset) + int offset, + int *start_offset, + int *end_offset) { const gchar *text; - gint start, end; + int start, end; const PangoLogAttr *attrs; - gint n_attrs; + int n_attrs; text = pango_layout_get_text (layout); diff --git a/gtk/gtkpango.h b/gtk/gtkpango.h index 4c3e97cba7..6bffb9223d 100644 --- a/gtk/gtkpango.h +++ b/gtk/gtkpango.h @@ -37,25 +37,25 @@ AtkAttributeSet *_gtk_pango_get_default_attributes (AtkAttributeSet *attributes, AtkAttributeSet *_gtk_pango_get_run_attributes (AtkAttributeSet *attributes, PangoLayout *layout, - gint offset, - gint *start_offset, - gint *end_offset); + int offset, + int *start_offset, + int *end_offset); gchar *_gtk_pango_get_text_before (PangoLayout *layout, AtkTextBoundary boundary_type, - gint offset, - gint *start_offset, - gint *end_offset); + int offset, + int *start_offset, + int *end_offset); gchar *_gtk_pango_get_text_at (PangoLayout *layout, AtkTextBoundary boundary_type, - gint offset, - gint *start_offset, - gint *end_offset); + int offset, + int *start_offset, + int *end_offset); gchar *_gtk_pango_get_text_after (PangoLayout *layout, AtkTextBoundary boundary_type, - gint offset, - gint *start_offset, - gint *end_offset); + int offset, + int *start_offset, + int *end_offset); PangoAttrList *_gtk_pango_attr_list_merge (PangoAttrList *into, PangoAttrList *from); diff --git a/gtk/gtkpapersize.c b/gtk/gtkpapersize.c index 119b1a9eee..0144425fc5 100644 --- a/gtk/gtkpapersize.c +++ b/gtk/gtkpapersize.c @@ -400,7 +400,7 @@ gtk_paper_size_new_from_ipp (const gchar *ipp_name, float x_dimension; float y_dimension; gchar *display_name = NULL; - gint i; + int i; /* Find paper size according to its name */ for (i = 0; i < G_N_ELEMENTS (standard_names_offsets); i++) diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index cdaf541ef5..d4f74d8016 100644 --- a/gtk/gtkpathbar.c +++ b/gtk/gtkpathbar.c @@ -446,11 +446,11 @@ gtk_path_bar_size_allocate (GtkWidget *widget, GtkTextDirection direction; GtkAllocation child_allocation; GList *list, *first_button; - gint width; - gint allocation_width; + int width; + int allocation_width; gboolean need_sliders = TRUE; - gint up_slider_offset = 0; - gint down_slider_offset = 0; + int up_slider_offset = 0; + int down_slider_offset = 0; GtkRequisition child_requisition; /* No path is set; we don't have to allocate anything. */ @@ -487,7 +487,7 @@ gtk_path_bar_size_allocate (GtkWidget *widget, else { gboolean reached_end = FALSE; - gint slider_space = 2 * path_bar->slider_width; + int slider_space = 2 * path_bar->slider_width; if (path_bar->first_scrolled_button) first_button = path_bar->first_scrolled_button; @@ -689,7 +689,7 @@ gtk_path_bar_scroll_down (GtkPathBar *path_bar) GtkAllocation allocation, button_allocation; GList *list; GList *down_button = NULL; - gint space_available; + int space_available; if (gtk_widget_get_child_visible (BUTTON_DATA (path_bar->button_list->data)->button)) { diff --git a/gtk/gtkpicture.c b/gtk/gtkpicture.c index 31d814e381..a60f7c626d 100644 --- a/gtk/gtkpicture.c +++ b/gtk/gtkpicture.c @@ -541,13 +541,13 @@ gtk_picture_new_for_resource (const char *resource_path) } typedef struct { - gint scale_factor; + int scale_factor; } LoaderData; static void on_loader_size_prepared (GdkPixbufLoader *loader, - gint width, - gint height, + int width, + int height, gpointer user_data) { LoaderData *loader_data = user_data; @@ -568,7 +568,7 @@ on_loader_size_prepared (GdkPixbufLoader *loader, static GdkPaintable * load_scalable_with_loader (GFile *file, - gint scale_factor) + int scale_factor) { GdkPixbufLoader *loader; GBytes *bytes; diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index e22d1ca188..03a5cf05e7 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -150,9 +150,9 @@ struct _GtkPlacesSidebar { /* DND */ gboolean dragging_over; GtkWidget *drag_row; - gint drag_row_height; - gint drag_row_x; - gint drag_row_y; + int drag_row_height; + int drag_row_x; + int drag_row_y; GtkWidget *row_placeholder; DropState drop_state; @@ -270,12 +270,12 @@ static void check_unmount_and_eject (GMount *mount, gboolean *show_unmount, gboolean *show_eject); static void on_row_pressed (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkSidebarRow *row); static void on_row_released (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkSidebarRow *row); @@ -423,7 +423,7 @@ add_place (GtkPlacesSidebar *sidebar, #else gpointer *cloud_provider_account, #endif - const gint index, + const int index, const gchar *tooltip) { gboolean show_eject, show_unmount; @@ -583,7 +583,7 @@ static void add_special_dirs (GtkPlacesSidebar *sidebar) { GList *dirs; - gint index; + int index; dirs = NULL; for (index = 0; index < G_USER_N_DIRECTORIES; index++) @@ -980,7 +980,7 @@ update_places (GtkPlacesSidebar *sidebar) GList *volumes; GVolume *volume; GSList *bookmarks, *sl; - gint index; + int index; gchar *original_uri, *name, *identifier; GtkListBoxRow *selected; gchar *home_uri; @@ -1506,7 +1506,7 @@ check_valid_drop_target (GtkPlacesSidebar *sidebar, gboolean valid = FALSE; gchar *uri; GFile *dest_file; - gint drag_action; + int drag_action; g_return_val_if_fail (value != NULL, TRUE); @@ -1659,8 +1659,8 @@ drag_motion_callback (GtkDropTarget *target, GtkListBoxRow *row; GtkPlacesSidebarPlaceType place_type; gchar *drop_target_uri = NULL; - gint row_index; - gint row_placeholder_index; + int row_index; + int row_placeholder_index; const GValue *value; sidebar->dragging_over = TRUE; @@ -1775,7 +1775,7 @@ drag_motion_callback (GtkDropTarget *target, static void reorder_bookmarks (GtkPlacesSidebar *sidebar, GtkSidebarRow *row, - gint new_position) + int new_position) { gchar *uri; GFile *file; @@ -1792,7 +1792,7 @@ reorder_bookmarks (GtkPlacesSidebar *sidebar, static void drop_files_as_bookmarks (GtkPlacesSidebar *sidebar, GSList *files, - gint position) + int position) { GSList *l; @@ -1822,7 +1822,7 @@ drag_drop_callback (GtkDropTarget *target, double y, GtkPlacesSidebar *sidebar) { - gint target_order_index; + int target_order_index; GtkPlacesSidebarPlaceType target_place_type; GtkPlacesSidebarSectionType target_section_type; gchar *target_uri; @@ -2351,7 +2351,7 @@ static void update_popover_shadowing (GtkWidget *row, gboolean shown) { - gint count; + int count; count = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "popover-count")); count = shown ? count + 1 : count - 1; @@ -3382,7 +3382,7 @@ on_row_activated (GtkListBox *list_box, static void on_row_pressed (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkSidebarRow *row) @@ -3400,8 +3400,8 @@ on_row_pressed (GtkGestureClick *gesture, if (section_type == SECTION_BOOKMARKS) { sidebar->drag_row = GTK_WIDGET (row); - sidebar->drag_row_x = (gint)x; - sidebar->drag_row_y = (gint)y; + sidebar->drag_row_x = (int)x; + sidebar->drag_row_y = (int)y; } g_object_unref (sidebar); @@ -3409,7 +3409,7 @@ on_row_pressed (GtkGestureClick *gesture, static void on_row_released (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkSidebarRow *row) @@ -3543,7 +3543,7 @@ long_press_cb (GtkGesture *gesture, popup_menu_cb (GTK_SIDEBAR_ROW (row)); } -static gint +static int list_box_sort_func (GtkListBoxRow *row1, GtkListBoxRow *row2, gpointer user_data) @@ -3551,8 +3551,8 @@ list_box_sort_func (GtkListBoxRow *row1, GtkPlacesSidebarSectionType section_type_1, section_type_2; GtkPlacesSidebarPlaceType place_type_1, place_type_2; gchar *label_1, *label_2; - gint index_1, index_2; - gint retval = 0; + int index_1, index_2; + int retval = 0; g_object_get (row1, "label", &label_1, @@ -4889,7 +4889,7 @@ gtk_places_sidebar_get_shortcuts (GtkPlacesSidebar *sidebar) */ GFile * gtk_places_sidebar_get_nth_bookmark (GtkPlacesSidebar *sidebar, - gint n) + int n) { GtkWidget *row; int k; diff --git a/gtk/gtkplacessidebarprivate.h b/gtk/gtkplacessidebarprivate.h index a3b011b612..8d037a0d84 100644 --- a/gtk/gtkplacessidebarprivate.h +++ b/gtk/gtkplacessidebarprivate.h @@ -95,7 +95,7 @@ void gtk_places_sidebar_remove_shortcut (GtkPlacesSideb GListModel * gtk_places_sidebar_get_shortcuts (GtkPlacesSidebar *sidebar); GFile * gtk_places_sidebar_get_nth_bookmark (GtkPlacesSidebar *sidebar, - gint n); + int n); void gtk_places_sidebar_set_drop_targets_visible (GtkPlacesSidebar *sidebar, gboolean visible); gboolean gtk_places_sidebar_get_show_trash (GtkPlacesSidebar *sidebar); diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c index eb2b9baf7d..7316bd1478 100644 --- a/gtk/gtkplacesview.c +++ b/gtk/gtkplacesview.c @@ -529,7 +529,7 @@ populate_servers (GtkPlacesView *view) GtkWidget *child; gchar **uris; gsize num_uris; - gint i; + int i; server_list = server_list_load (view); @@ -2067,7 +2067,7 @@ listbox_header_func (GtkListBoxRow *row, } } -static gint +static int listbox_sort_func (GtkListBoxRow *row1, GtkListBoxRow *row2, gpointer user_data) @@ -2078,7 +2078,7 @@ listbox_sort_func (GtkListBoxRow *row1, gchar *path2; gboolean *is_placeholder1; gboolean *is_placeholder2; - gint retval; + int retval; row1_is_network = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row1), "is-network")); row2_is_network = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row2), "is-network")); diff --git a/gtk/gtkplacesviewrow.c b/gtk/gtkplacesviewrow.c index e3deff9a84..cc23339311 100644 --- a/gtk/gtkplacesviewrow.c +++ b/gtk/gtkplacesviewrow.c @@ -59,7 +59,7 @@ struct _GtkPlacesViewRow GCancellable *cancellable; - gint is_network : 1; + int is_network : 1; }; G_DEFINE_TYPE (GtkPlacesViewRow, gtk_places_view_row, GTK_TYPE_LIST_BOX_ROW) diff --git a/gtk/gtkpointerfocusprivate.h b/gtk/gtkpointerfocusprivate.h index 02ab6e5c82..afbf55bedd 100644 --- a/gtk/gtkpointerfocusprivate.h +++ b/gtk/gtkpointerfocusprivate.h @@ -24,7 +24,7 @@ typedef struct _GtkPointerFocus GtkPointerFocus; struct _GtkPointerFocus { - gint ref_count; + int ref_count; GdkDevice *device; GdkEventSequence *sequence; GtkWindow *toplevel; diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c index 7b925243ec..90a19cb6e0 100644 --- a/gtk/gtkpopover.c +++ b/gtk/gtkpopover.c @@ -1050,20 +1050,20 @@ gtk_popover_finalize (GObject *object) static void gtk_popover_get_gap_coords (GtkPopover *popover, - gint *initial_x_out, - gint *initial_y_out, - gint *tip_x_out, - gint *tip_y_out, - gint *final_x_out, - gint *final_y_out) + int *initial_x_out, + int *initial_y_out, + int *tip_x_out, + int *tip_y_out, + int *final_x_out, + int *final_y_out) { GtkWidget *widget = GTK_WIDGET (popover); GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover); GdkRectangle rect = { 0 }; - gint base, tip, tip_pos; - gint initial_x, initial_y; - gint tip_x, tip_y; - gint final_x, final_y; + int base, tip, tip_pos; + int initial_x, initial_y; + int tip_x, tip_y; + int final_x, final_y; GtkPositionType pos; int border_top, border_right, border_bottom; int border_radius; @@ -1176,9 +1176,9 @@ gtk_popover_apply_tail_path (GtkPopover *popover, cairo_t *cr) { GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover); - gint initial_x, initial_y; - gint tip_x, tip_y; - gint final_x, final_y; + int initial_x, initial_y; + int tip_x, tip_y; + int final_x, final_y; GtkBorder border; GtkWidget *parent; @@ -1252,7 +1252,7 @@ gtk_popover_update_shape (GtkPopover *popover) gdk_surface_set_input_region (priv->surface, NULL); } -static gint +static int get_border_radius (GtkWidget *widget) { GtkCssStyle *style; @@ -1261,13 +1261,13 @@ get_border_radius (GtkWidget *widget) return round (_gtk_css_number_value_get (style->border->border_top_left_radius, 100)); } -static gint +static int get_minimal_size (GtkPopover *popover, GtkOrientation orientation) { GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover); GtkPositionType pos; - gint minimal_size; + int minimal_size; int tail_gap_width = priv->has_arrow ? TAIL_GAP_WIDTH : 0; minimal_size = 2 * get_border_radius (GTK_WIDGET (popover)); diff --git a/gtk/gtkpopovermenubar.c b/gtk/gtkpopovermenubar.c index 005fc5e50f..4922faf55a 100644 --- a/gtk/gtkpopovermenubar.c +++ b/gtk/gtkpopovermenubar.c @@ -354,7 +354,7 @@ static GParamSpec * bar_props[LAST_PROP]; G_DEFINE_TYPE (GtkPopoverMenuBar, gtk_popover_menu_bar, GTK_TYPE_WIDGET) static void -tracker_remove (gint position, +tracker_remove (int position, gpointer user_data) { GtkWidget *bar = user_data; @@ -383,7 +383,7 @@ popover_unmap (GtkPopover *popover, static void tracker_insert (GtkMenuTrackerItem *item, - gint position, + int position, gpointer user_data) { GtkPopoverMenuBar *bar = user_data; diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c index 2071379a1b..d89cd02182 100644 --- a/gtk/gtkprintbackend.c +++ b/gtk/gtkprintbackend.c @@ -134,7 +134,7 @@ gtk_print_backend_load_modules (void) GtkPrintBackend *backend; gchar *setting; gchar **backends; - gint i; + int i; GtkSettings *settings; GIOExtensionPoint *ep; @@ -582,11 +582,11 @@ store_entry (GtkEntry *entry, static void password_dialog_response (GtkWidget *dialog, - gint response_id, + int response_id, GtkPrintBackend *backend) { GtkPrintBackendPrivate *priv = backend->priv; - gint i, auth_info_len; + int i, auth_info_len; if (response_id == GTK_RESPONSE_OK) gtk_print_backend_set_password (backend, priv->auth_info_required, priv->auth_info, priv->store_auth_info); @@ -627,8 +627,8 @@ request_password (GtkPrintBackend *backend, GtkWidget *focus = NULL; GtkWidget *content_area; gchar *markup; - gint length; - gint i; + int length; + int i; gchar **ai_required = (gchar **) auth_info_required; gchar **ai_default = (gchar **) auth_info_default; gchar **ai_display = (gchar **) auth_info_display; diff --git a/gtk/gtkprintbackendprivate.h b/gtk/gtkprintbackendprivate.h index c6505b7c7c..54d8347d1c 100644 --- a/gtk/gtkprintbackendprivate.h +++ b/gtk/gtkprintbackendprivate.h @@ -216,7 +216,7 @@ void gtk_printer_set_icon_name (GtkPrinter *printer, const gchar *icon); GDK_AVAILABLE_IN_ALL gboolean gtk_printer_set_job_count (GtkPrinter *printer, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_printer_set_location (GtkPrinter *printer, const gchar *location); diff --git a/gtk/gtkprinter.c b/gtk/gtkprinter.c index fabbe1f4da..b74a8c63c0 100644 --- a/gtk/gtkprinter.c +++ b/gtk/gtkprinter.c @@ -66,7 +66,7 @@ struct _GtkPrinterPrivate guint accepts_ps : 1; gchar *state_message; - gint job_count; + int job_count; GtkPrintBackend *backend; }; @@ -575,7 +575,7 @@ gtk_printer_set_icon_name (GtkPrinter *printer, * * Returns: the number of jobs on @printer */ -gint +int gtk_printer_get_job_count (GtkPrinter *printer) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); @@ -587,7 +587,7 @@ gtk_printer_get_job_count (GtkPrinter *printer) gboolean gtk_printer_set_job_count (GtkPrinter *printer, - gint count) + int count) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); @@ -1079,7 +1079,7 @@ gtk_printer_get_capabilities (GtkPrinter *printer) * Returns: 0 if the printer match, a negative value if @a < @b, * or a positive value if @a > @b */ -gint +int gtk_printer_compare (GtkPrinter *a, GtkPrinter *b) { diff --git a/gtk/gtkprinter.h b/gtk/gtkprinter.h index fac90fa74c..dea92fcfd3 100644 --- a/gtk/gtkprinter.h +++ b/gtk/gtkprinter.h @@ -97,7 +97,7 @@ const gchar * gtk_printer_get_location (GtkPrinter *pri GDK_AVAILABLE_IN_ALL const gchar * gtk_printer_get_icon_name (GtkPrinter *printer); GDK_AVAILABLE_IN_ALL -gint gtk_printer_get_job_count (GtkPrinter *printer); +int gtk_printer_get_job_count (GtkPrinter *printer); GDK_AVAILABLE_IN_ALL gboolean gtk_printer_is_active (GtkPrinter *printer); GDK_AVAILABLE_IN_ALL @@ -117,7 +117,7 @@ GList *gtk_printer_list_papers (GtkPrinter *pri GDK_AVAILABLE_IN_ALL GtkPageSetup *gtk_printer_get_default_page_size (GtkPrinter *printer); GDK_AVAILABLE_IN_ALL -gint gtk_printer_compare (GtkPrinter *a, +int gtk_printer_compare (GtkPrinter *a, GtkPrinter *b); GDK_AVAILABLE_IN_ALL gboolean gtk_printer_has_details (GtkPrinter *printer); diff --git a/gtk/gtkprinteroptionwidget.c b/gtk/gtkprinteroptionwidget.c index 93589648c4..800b76ed88 100644 --- a/gtk/gtkprinteroptionwidget.c +++ b/gtk/gtkprinteroptionwidget.c @@ -644,7 +644,7 @@ check_toggled_cb (GtkToggleButton *toggle_button, static void dialog_response_callback (GtkDialog *dialog, - gint response_id, + int response_id, GtkPrinterOptionWidget *widget) { GtkPrinterOptionWidgetPrivate *priv = widget->priv; @@ -1075,7 +1075,7 @@ static gchar * trim_long_filename (const gchar *filename) { const gchar *home; - gint len, offset; + int len, offset; gchar *result; home = g_get_home_dir (); diff --git a/gtk/gtkprintjob.c b/gtk/gtkprintjob.c index 8a98f5510d..2e6dfbca9c 100644 --- a/gtk/gtkprintjob.c +++ b/gtk/gtkprintjob.c @@ -75,9 +75,9 @@ struct _GtkPrintJob GtkPrintPages print_pages; GtkPageRange *page_ranges; - gint num_page_ranges; + int num_page_ranges; GtkPageSet page_set; - gint num_copies; + int num_copies; gdouble scale; guint number_up; GtkNumberUpLayout number_up_layout; @@ -724,7 +724,7 @@ gtk_print_job_set_pages (GtkPrintJob *job, */ GtkPageRange * gtk_print_job_get_page_ranges (GtkPrintJob *job, - gint *n_ranges) + int *n_ranges) { *n_ranges = job->num_page_ranges; return job->page_ranges; @@ -742,7 +742,7 @@ gtk_print_job_get_page_ranges (GtkPrintJob *job, void gtk_print_job_set_page_ranges (GtkPrintJob *job, GtkPageRange *ranges, - gint n_ranges) + int n_ranges) { g_free (job->page_ranges); job->page_ranges = ranges; @@ -785,7 +785,7 @@ gtk_print_job_set_page_set (GtkPrintJob *job, * * Returns: the number of copies */ -gint +int gtk_print_job_get_num_copies (GtkPrintJob *job) { return job->num_copies; @@ -800,7 +800,7 @@ gtk_print_job_get_num_copies (GtkPrintJob *job) */ void gtk_print_job_set_num_copies (GtkPrintJob *job, - gint num_copies) + int num_copies) { job->num_copies = num_copies; } diff --git a/gtk/gtkprintjob.h b/gtk/gtkprintjob.h index f580dced83..25983ad602 100644 --- a/gtk/gtkprintjob.h +++ b/gtk/gtkprintjob.h @@ -94,21 +94,21 @@ void gtk_print_job_set_pages (GtkPrintJob *job, GtkPrintPages pages); GDK_AVAILABLE_IN_ALL GtkPageRange * gtk_print_job_get_page_ranges (GtkPrintJob *job, - gint *n_ranges); + int *n_ranges); GDK_AVAILABLE_IN_ALL void gtk_print_job_set_page_ranges (GtkPrintJob *job, GtkPageRange *ranges, - gint n_ranges); + int n_ranges); GDK_AVAILABLE_IN_ALL GtkPageSet gtk_print_job_get_page_set (GtkPrintJob *job); GDK_AVAILABLE_IN_ALL void gtk_print_job_set_page_set (GtkPrintJob *job, GtkPageSet page_set); GDK_AVAILABLE_IN_ALL -gint gtk_print_job_get_num_copies (GtkPrintJob *job); +int gtk_print_job_get_num_copies (GtkPrintJob *job); GDK_AVAILABLE_IN_ALL void gtk_print_job_set_num_copies (GtkPrintJob *job, - gint num_copies); + int num_copies); GDK_AVAILABLE_IN_ALL gdouble gtk_print_job_get_scale (GtkPrintJob *job); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkprintoperation-private.h b/gtk/gtkprintoperation-private.h index 6a7b509978..15708a03d2 100644 --- a/gtk/gtkprintoperation-private.h +++ b/gtk/gtkprintoperation-private.h @@ -40,10 +40,10 @@ struct _GtkPrintOperationPrivate GtkPageSetup *default_page_setup; GtkPrintSettings *print_settings; gchar *job_name; - gint nr_of_pages; - gint nr_of_pages_to_print; - gint page_position; - gint current_page; + int nr_of_pages; + int nr_of_pages_to_print; + int page_position; + int current_page; GtkUnit unit; gchar *export_filename; guint use_full_page : 1; @@ -65,9 +65,9 @@ struct _GtkPrintOperationPrivate GtkPrintPages print_pages; GtkPageRange *page_ranges; - gint num_page_ranges; + int num_page_ranges; - gint manual_num_copies; + int manual_num_copies; guint manual_collation : 1; guint manual_reverse : 1; guint manual_orientation : 1; diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c index 87d97e240e..1095d7440c 100644 --- a/gtk/gtkprintoperation-unix.c +++ b/gtk/gtkprintoperation-unix.c @@ -225,7 +225,7 @@ gtk_print_operation_unix_launch_preview (GtkPrintOperation *op, gboolean settings_used = FALSE; GdkDisplay *display; GError *error = NULL; - gint fd; + int fd; gboolean retval; cairo_surface_destroy (surface); @@ -609,7 +609,7 @@ finish_print (PrintResponseData *rdata, static void handle_print_response (GtkWidget *dialog, - gint response, + int response, gpointer data) { GtkPrintUnixDialog *pd = GTK_PRINT_UNIX_DIALOG (dialog); @@ -749,7 +749,7 @@ write_preview (void *closure, const unsigned char *data, unsigned int length) { - gint fd = GPOINTER_TO_INT (closure); + int fd = GPOINTER_TO_INT (closure); gssize written; while (length > 0) @@ -774,7 +774,7 @@ write_preview (void *closure, static void close_preview (void *data) { - gint fd = GPOINTER_TO_INT (data); + int fd = GPOINTER_TO_INT (data); close (fd); } @@ -787,7 +787,7 @@ gtk_print_operation_unix_create_preview_surface (GtkPrintOperation *op, gchar **target) { gchar *filename; - gint fd; + int fd; GtkPaperSize *paper_size; gdouble w, h; cairo_surface_t *surface; @@ -920,7 +920,7 @@ page_setup_data_free (gpointer data) static void handle_page_setup_response (GtkWidget *dialog, - gint response, + int response, gpointer data) { GtkPageSetupUnixDialog *psd; diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c index 9f21634fc4..1410eea5a0 100644 --- a/gtk/gtkprintoperation.c +++ b/gtk/gtkprintoperation.c @@ -151,7 +151,7 @@ typedef struct _PrintPagesData PrintPagesData; static void preview_iface_init (GtkPrintOperationPreviewIface *iface); static GtkPageSetup *create_page_setup (GtkPrintOperation *op); static void common_render_page (GtkPrintOperation *op, - gint page_nr); + int page_nr); static void increment_page_sequence (PrintPagesData *data); static void prepare_data (PrintPagesData *data); static void clamp_page_ranges (PrintPagesData *data); @@ -258,7 +258,7 @@ gtk_print_operation_init (GtkPrintOperation *operation) static void preview_iface_render_page (GtkPrintOperationPreview *preview, - gint page_nr) + int page_nr) { GtkPrintOperation *op; @@ -297,7 +297,7 @@ preview_iface_end_preview (GtkPrintOperationPreview *preview) static gboolean preview_iface_is_selected (GtkPrintOperationPreview *preview, - gint page_nr) + int page_nr) { GtkPrintOperation *op = GTK_PRINT_OPERATION (preview); GtkPrintOperationPrivate *priv = gtk_print_operation_get_instance_private (op); @@ -500,20 +500,20 @@ gtk_print_operation_get_property (GObject *object, struct _PrintPagesData { GtkPrintOperation *op; - gint uncollated_copies; - gint collated_copies; - gint uncollated, collated, total; + int uncollated_copies; + int collated_copies; + int uncollated, collated, total; - gint range, num_ranges; + int range, num_ranges; GtkPageRange *ranges; GtkPageRange one_range; - gint page; - gint sheet; - gint first_position, last_position; - gint first_sheet; - gint num_of_sheets; - gint *pages; + int page; + int sheet; + int first_position, last_position; + int first_sheet; + int num_of_sheets; + int *pages; GtkWidget *progress; @@ -865,13 +865,13 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class) * static void * draw_page (GtkPrintOperation *operation, * GtkPrintContext *context, - * gint page_nr, + * int page_nr, * gpointer user_data) * { * cairo_t *cr; * PangoLayout *layout; * gdouble width, text_height; - * gint layout_height; + * int layout_height; * PangoFontDescription *desc; * * cr = gtk_print_context_get_cairo_context (context); @@ -1555,7 +1555,7 @@ gtk_print_operation_set_job_name (GtkPrintOperation *op, **/ void gtk_print_operation_set_n_pages (GtkPrintOperation *op, - gint n_pages) + int n_pages) { GtkPrintOperationPrivate *priv = gtk_print_operation_get_instance_private (op); @@ -1586,7 +1586,7 @@ gtk_print_operation_set_n_pages (GtkPrintOperation *op, **/ void gtk_print_operation_set_current_page (GtkPrintOperation *op, - gint current_page) + int current_page) { GtkPrintOperationPrivate *priv = gtk_print_operation_get_instance_private (op); @@ -2058,8 +2058,8 @@ static void clamp_page_ranges (PrintPagesData *data) { GtkPrintOperationPrivate *priv = gtk_print_operation_get_instance_private (data->op); - gint num_of_correct_ranges; - gint i; + int num_of_correct_ranges; + int i; num_of_correct_ranges = 0; @@ -2096,7 +2096,7 @@ static void increment_page_sequence (PrintPagesData *data) { GtkPrintOperationPrivate *priv = gtk_print_operation_get_instance_private (data->op); - gint inc; + int inc; if (data->total == -1) { @@ -2351,7 +2351,7 @@ gtk_print_operation_draw_page_finish (GtkPrintOperation *op) static void common_render_page (GtkPrintOperation *op, - gint page_nr) + int page_nr) { GtkPrintOperationPrivate *priv = gtk_print_operation_get_instance_private (op); GtkPageSetup *page_setup; @@ -2397,7 +2397,7 @@ common_render_page (GtkPrintOperation *op, gdouble x_step, y_step; gdouble x_scale, y_scale, scale; gdouble horizontal_offset = 0.0, vertical_offset = 0.0; - gint columns, rows, x, y, tmp_length; + int columns, rows, x, y, tmp_length; page_setup = gtk_print_context_get_page_setup (print_context); orientation = gtk_page_setup_get_orientation (page_setup); @@ -2582,7 +2582,7 @@ prepare_data (PrintPagesData *data) GtkPrintOperationPrivate *priv = gtk_print_operation_get_instance_private (data->op); GtkPageSetup *page_setup; gboolean paginated = FALSE; - gint i, j, counter; + int i, j, counter; if (priv->manual_collation) { @@ -2657,7 +2657,7 @@ prepare_data (PrintPagesData *data) for (i = 0; i < data->num_ranges; i++) priv->nr_of_pages_to_print += data->ranges[i].end - data->ranges[i].start + 1; - data->pages = g_new (gint, priv->nr_of_pages_to_print); + data->pages = g_new (int, priv->nr_of_pages_to_print); counter = 0; for (i = 0; i < data->num_ranges; i++) for (j = data->ranges[i].start; j <= data->ranges[i].end; j++) @@ -2797,7 +2797,7 @@ print_pages_idle (gpointer user_data) static void handle_progress_response (GtkWidget *dialog, - gint response, + int response, gpointer data) { GtkPrintOperation *op = (GtkPrintOperation *)data; @@ -3250,7 +3250,7 @@ gtk_print_operation_get_has_selection (GtkPrintOperation *op) * * Returns: the number of pages that will be printed **/ -gint +int gtk_print_operation_get_n_pages_to_print (GtkPrintOperation *op) { GtkPrintOperationPrivate *priv = gtk_print_operation_get_instance_private (op); diff --git a/gtk/gtkprintoperation.h b/gtk/gtkprintoperation.h index c10ba4b7b9..4751290210 100644 --- a/gtk/gtkprintoperation.h +++ b/gtk/gtkprintoperation.h @@ -161,11 +161,11 @@ struct _GtkPrintOperationClass GtkPrintContext *context); void (*request_page_setup) (GtkPrintOperation *operation, GtkPrintContext *context, - gint page_nr, + int page_nr, GtkPageSetup *setup); void (*draw_page) (GtkPrintOperation *operation, GtkPrintContext *context, - gint page_nr); + int page_nr); void (*end_print) (GtkPrintOperation *operation, GtkPrintContext *context); void (*status_changed) (GtkPrintOperation *operation); @@ -237,10 +237,10 @@ void gtk_print_operation_set_job_name (GtkPrintOper const gchar *job_name); GDK_AVAILABLE_IN_ALL void gtk_print_operation_set_n_pages (GtkPrintOperation *op, - gint n_pages); + int n_pages); GDK_AVAILABLE_IN_ALL void gtk_print_operation_set_current_page (GtkPrintOperation *op, - gint current_page); + int current_page); GDK_AVAILABLE_IN_ALL void gtk_print_operation_set_use_full_page (GtkPrintOperation *op, gboolean full_page); @@ -298,7 +298,7 @@ void gtk_print_operation_set_embed_page_setup (GtkPrintOper GDK_AVAILABLE_IN_ALL gboolean gtk_print_operation_get_embed_page_setup (GtkPrintOperation *op); GDK_AVAILABLE_IN_ALL -gint gtk_print_operation_get_n_pages_to_print (GtkPrintOperation *op); +int gtk_print_operation_get_n_pages_to_print (GtkPrintOperation *op); GDK_AVAILABLE_IN_ALL GtkPageSetup *gtk_print_run_page_setup_dialog (GtkWindow *parent, diff --git a/gtk/gtkprintoperationpreview.c b/gtk/gtkprintoperationpreview.c index 98cca3ffdb..f81d49b832 100644 --- a/gtk/gtkprintoperationpreview.c +++ b/gtk/gtkprintoperationpreview.c @@ -125,7 +125,7 @@ gtk_print_operation_preview_base_init (gpointer g_iface) */ void gtk_print_operation_preview_render_page (GtkPrintOperationPreview *preview, - gint page_nr) + int page_nr) { g_return_if_fail (GTK_IS_PRINT_OPERATION_PREVIEW (preview)); @@ -161,7 +161,7 @@ gtk_print_operation_preview_end_preview (GtkPrintOperationPreview *preview) */ gboolean gtk_print_operation_preview_is_selected (GtkPrintOperationPreview *preview, - gint page_nr) + int page_nr) { g_return_val_if_fail (GTK_IS_PRINT_OPERATION_PREVIEW (preview), FALSE); diff --git a/gtk/gtkprintoperationpreview.h b/gtk/gtkprintoperationpreview.h index 29345c7f27..387b629a17 100644 --- a/gtk/gtkprintoperationpreview.h +++ b/gtk/gtkprintoperationpreview.h @@ -50,9 +50,9 @@ struct _GtkPrintOperationPreviewIface /* methods */ void (*render_page) (GtkPrintOperationPreview *preview, - gint page_nr); + int page_nr); gboolean (*is_selected) (GtkPrintOperationPreview *preview, - gint page_nr); + int page_nr); void (*end_preview) (GtkPrintOperationPreview *preview); /* Padding for future expansion */ @@ -71,12 +71,12 @@ GType gtk_print_operation_preview_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL void gtk_print_operation_preview_render_page (GtkPrintOperationPreview *preview, - gint page_nr); + int page_nr); GDK_AVAILABLE_IN_ALL void gtk_print_operation_preview_end_preview (GtkPrintOperationPreview *preview); GDK_AVAILABLE_IN_ALL gboolean gtk_print_operation_preview_is_selected (GtkPrintOperationPreview *preview, - gint page_nr); + int page_nr); G_END_DECLS diff --git a/gtk/gtkprintsettings.c b/gtk/gtkprintsettings.c index 5195f52536..e0a1e9582f 100644 --- a/gtk/gtkprintsettings.c +++ b/gtk/gtkprintsettings.c @@ -408,10 +408,10 @@ gtk_print_settings_set_length (GtkPrintSettings *settings, * * Returns: the integer value of @key */ -gint +int gtk_print_settings_get_int_with_default (GtkPrintSettings *settings, const gchar *key, - gint def) + int def) { const gchar *val; @@ -431,7 +431,7 @@ gtk_print_settings_get_int_with_default (GtkPrintSettings *settings, * * Returns: the integer value of @key */ -gint +int gtk_print_settings_get_int (GtkPrintSettings *settings, const gchar *key) { @@ -449,7 +449,7 @@ gtk_print_settings_get_int (GtkPrintSettings *settings, void gtk_print_settings_set_int (GtkPrintSettings *settings, const gchar *key, - gint value) + int value) { gchar buf[128]; g_sprintf (buf, "%d", value); @@ -1051,7 +1051,7 @@ gtk_print_settings_set_number_up_layout (GtkPrintSettings *settings, * * Returns: the number of copies to print */ -gint +int gtk_print_settings_get_n_copies (GtkPrintSettings *settings) { return gtk_print_settings_get_int_with_default (settings, GTK_PRINT_SETTINGS_N_COPIES, 1); @@ -1066,7 +1066,7 @@ gtk_print_settings_get_n_copies (GtkPrintSettings *settings) */ void gtk_print_settings_set_n_copies (GtkPrintSettings *settings, - gint num_copies) + int num_copies) { gtk_print_settings_set_int (settings, GTK_PRINT_SETTINGS_N_COPIES, num_copies); @@ -1080,7 +1080,7 @@ gtk_print_settings_set_n_copies (GtkPrintSettings *settings, * * Returns: the number of pages per sheet */ -gint +int gtk_print_settings_get_number_up (GtkPrintSettings *settings) { return gtk_print_settings_get_int_with_default (settings, GTK_PRINT_SETTINGS_NUMBER_UP, 1); @@ -1095,7 +1095,7 @@ gtk_print_settings_get_number_up (GtkPrintSettings *settings) */ void gtk_print_settings_set_number_up (GtkPrintSettings *settings, - gint number_up) + int number_up) { gtk_print_settings_set_int (settings, GTK_PRINT_SETTINGS_NUMBER_UP, number_up); @@ -1109,7 +1109,7 @@ gtk_print_settings_set_number_up (GtkPrintSettings *settings, * * Returns: the resolution in dpi */ -gint +int gtk_print_settings_get_resolution (GtkPrintSettings *settings) { return gtk_print_settings_get_int_with_default (settings, GTK_PRINT_SETTINGS_RESOLUTION, 300); @@ -1126,7 +1126,7 @@ gtk_print_settings_get_resolution (GtkPrintSettings *settings) */ void gtk_print_settings_set_resolution (GtkPrintSettings *settings, - gint resolution) + int resolution) { gtk_print_settings_set_int (settings, GTK_PRINT_SETTINGS_RESOLUTION, resolution); @@ -1144,7 +1144,7 @@ gtk_print_settings_set_resolution (GtkPrintSettings *settings, * * Returns: the horizontal resolution in dpi */ -gint +int gtk_print_settings_get_resolution_x (GtkPrintSettings *settings) { return gtk_print_settings_get_int_with_default (settings, GTK_PRINT_SETTINGS_RESOLUTION_X, 300); @@ -1158,7 +1158,7 @@ gtk_print_settings_get_resolution_x (GtkPrintSettings *settings) * * Returns: the vertical resolution in dpi */ -gint +int gtk_print_settings_get_resolution_y (GtkPrintSettings *settings) { return gtk_print_settings_get_int_with_default (settings, GTK_PRINT_SETTINGS_RESOLUTION_Y, 300); @@ -1176,8 +1176,8 @@ gtk_print_settings_get_resolution_y (GtkPrintSettings *settings) */ void gtk_print_settings_set_resolution_xy (GtkPrintSettings *settings, - gint resolution_x, - gint resolution_y) + int resolution_x, + int resolution_y) { gtk_print_settings_set_int (settings, GTK_PRINT_SETTINGS_RESOLUTION_X, resolution_x); @@ -1323,12 +1323,12 @@ gtk_print_settings_set_print_pages (GtkPrintSettings *settings, */ GtkPageRange * gtk_print_settings_get_page_ranges (GtkPrintSettings *settings, - gint *num_ranges) + int *num_ranges) { const gchar *val; gchar **range_strs; GtkPageRange *ranges; - gint i, n; + int i, n; val = gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_PAGE_RANGES); @@ -1349,16 +1349,16 @@ gtk_print_settings_get_page_ranges (GtkPrintSettings *settings, for (i = 0; i < n; i++) { - gint start, end; + int start, end; gchar *str; - start = (gint)strtol (range_strs[i], &str, 10); + start = (int)strtol (range_strs[i], &str, 10); end = start; if (*str == '-') { str++; - end = (gint)strtol (str, NULL, 10); + end = (int)strtol (str, NULL, 10); } ranges[i].start = start; @@ -1382,10 +1382,10 @@ gtk_print_settings_get_page_ranges (GtkPrintSettings *settings, void gtk_print_settings_set_page_ranges (GtkPrintSettings *settings, GtkPageRange *page_ranges, - gint num_ranges) + int num_ranges) { GString *s; - gint i; + int i; s = g_string_new (""); diff --git a/gtk/gtkprintsettings.h b/gtk/gtkprintsettings.h index 6587400674..e019a54323 100644 --- a/gtk/gtkprintsettings.h +++ b/gtk/gtkprintsettings.h @@ -47,8 +47,8 @@ typedef struct _GtkPageRange GtkPageRange; */ struct _GtkPageRange { - gint start; - gint end; + int start; + int end; }; GDK_AVAILABLE_IN_ALL @@ -128,16 +128,16 @@ void gtk_print_settings_set_length (GtkPrintSettings gdouble value, GtkUnit unit); GDK_AVAILABLE_IN_ALL -gint gtk_print_settings_get_int (GtkPrintSettings *settings, +int gtk_print_settings_get_int (GtkPrintSettings *settings, const gchar *key); GDK_AVAILABLE_IN_ALL -gint gtk_print_settings_get_int_with_default (GtkPrintSettings *settings, +int gtk_print_settings_get_int_with_default (GtkPrintSettings *settings, const gchar *key, - gint def); + int def); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_int (GtkPrintSettings *settings, const gchar *key, - gint value); + int value); #define GTK_PRINT_SETTINGS_PRINTER "printer" #define GTK_PRINT_SETTINGS_ORIENTATION "orientation" @@ -260,33 +260,33 @@ GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_quality (GtkPrintSettings *settings, GtkPrintQuality quality); GDK_AVAILABLE_IN_ALL -gint gtk_print_settings_get_n_copies (GtkPrintSettings *settings); +int gtk_print_settings_get_n_copies (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_n_copies (GtkPrintSettings *settings, - gint num_copies); + int num_copies); GDK_AVAILABLE_IN_ALL -gint gtk_print_settings_get_number_up (GtkPrintSettings *settings); +int gtk_print_settings_get_number_up (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_number_up (GtkPrintSettings *settings, - gint number_up); + int number_up); GDK_AVAILABLE_IN_ALL GtkNumberUpLayout gtk_print_settings_get_number_up_layout (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_number_up_layout (GtkPrintSettings *settings, GtkNumberUpLayout number_up_layout); GDK_AVAILABLE_IN_ALL -gint gtk_print_settings_get_resolution (GtkPrintSettings *settings); +int gtk_print_settings_get_resolution (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_resolution (GtkPrintSettings *settings, - gint resolution); + int resolution); GDK_AVAILABLE_IN_ALL -gint gtk_print_settings_get_resolution_x (GtkPrintSettings *settings); +int gtk_print_settings_get_resolution_x (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL -gint gtk_print_settings_get_resolution_y (GtkPrintSettings *settings); +int gtk_print_settings_get_resolution_y (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_resolution_xy (GtkPrintSettings *settings, - gint resolution_x, - gint resolution_y); + int resolution_x, + int resolution_y); GDK_AVAILABLE_IN_ALL gdouble gtk_print_settings_get_printer_lpi (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL @@ -304,11 +304,11 @@ void gtk_print_settings_set_print_pages (GtkPrintSettings GtkPrintPages pages); GDK_AVAILABLE_IN_ALL GtkPageRange * gtk_print_settings_get_page_ranges (GtkPrintSettings *settings, - gint *num_ranges); + int *num_ranges); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_page_ranges (GtkPrintSettings *settings, GtkPageRange *page_ranges, - gint num_ranges); + int num_ranges); GDK_AVAILABLE_IN_ALL GtkPageSet gtk_print_settings_get_page_set (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index eac69cecaf..75645e0b7c 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -146,7 +146,7 @@ static void printer_status_cb (GtkPrintBackend *backend, static void update_collate_icon (GtkToggleButton *toggle_button, GtkPrintUnixDialog *dialog); static void error_dialogs (GtkPrintUnixDialog *print_dialog, - gint print_dialog_response_id, + int print_dialog_response_id, gpointer data); static gboolean page_range_entry_focus_changed (GtkWidget *entry, GParamSpec *pspec, @@ -177,7 +177,7 @@ static void draw_page (GtkDrawingArea *da, static gboolean dialog_get_collate (GtkPrintUnixDialog *dialog); static gboolean dialog_get_reverse (GtkPrintUnixDialog *dialog); -static gint dialog_get_n_copies (GtkPrintUnixDialog *dialog); +static int dialog_get_n_copies (GtkPrintUnixDialog *dialog); static gboolean set_active_printer (GtkPrintUnixDialog *dialog, const gchar *printer_name); @@ -334,7 +334,7 @@ struct _GtkPrintUnixDialog gchar *format_for_printer; - gint current_page; + int current_page; GtkCssNode *collate_paper_node; GtkCssNode *page_layout_paper_node; }; @@ -566,7 +566,7 @@ on_confirmation_dialog_response (GtkWidget *dialog, */ static void error_dialogs (GtkPrintUnixDialog *dialog, - gint dialog_response_id, + int dialog_response_id, gpointer data) { if (dialog != NULL && dialog_response_id == GTK_RESPONSE_OK) @@ -1275,10 +1275,10 @@ add_option_to_extension_point (GtkPrinterOption *option, gtk_box_append (GTK_BOX (extension_point), widget); } -static gint +static int grid_rows (GtkGrid *table) { - gint t0, t1, l, t, w, h; + int t0, t1, l, t, w, h; GtkWidget *c; gboolean first; @@ -1345,7 +1345,7 @@ setup_page_table (GtkPrinterOptionSet *options, GtkWidget *table, GtkWidget *page) { - gint nrows; + int nrows; gtk_printer_option_set_foreach_in_group (options, group, add_option_to_table, @@ -1671,7 +1671,7 @@ fill_paper_sizes (GtkPrintUnixDialog *dialog, GList *list, *l; GtkPageSetup *page_setup; GtkPaperSize *paper_size; - gint i; + int i; g_list_store_remove_all (dialog->page_setup_list); @@ -1930,14 +1930,14 @@ static void paint_page (GtkPrintUnixDialog *dialog, GtkWidget *widget, cairo_t *cr, - gint x, - gint y, + int x, + int y, const char *text, - gint text_x) + int text_x) { GtkStyleContext *context; - gint width, height; - gint text_y; + int width, height; + int text_y; GdkRGBA color; width = 20; @@ -1973,9 +1973,9 @@ draw_collate (GtkDrawingArea *da, GtkPrintUnixDialog *dialog = GTK_PRINT_UNIX_DIALOG (data); GtkWidget *widget = GTK_WIDGET (da); gboolean collate, reverse, rtl; - gint copies; - gint text_x; - gint x, y, x1, x2, p1, p2; + int copies; + int text_x; + int x, y, x1, x2, p1, p2; collate = dialog_get_collate (dialog); reverse = dialog_get_reverse (dialog); @@ -2062,13 +2062,13 @@ is_range_separator (gchar c) static GtkPageRange * dialog_get_page_ranges (GtkPrintUnixDialog *dialog, - gint *n_ranges_out) + int *n_ranges_out) { - gint i, n_ranges; + int i, n_ranges; const gchar *text, *p; gchar *next; GtkPageRange *ranges; - gint start, end; + int start, end; text = gtk_editable_get_text (GTK_EDITABLE (dialog->page_range_entry)); @@ -2143,9 +2143,9 @@ dialog_get_page_ranges (GtkPrintUnixDialog *dialog, static void dialog_set_page_ranges (GtkPrintUnixDialog *dialog, GtkPageRange *ranges, - gint n_ranges) + int n_ranges) { - gint i; + int i; GString *s = g_string_new (NULL); for (i = 0; i < n_ranges; i++) @@ -2224,13 +2224,13 @@ dialog_set_page_set (GtkPrintUnixDialog *dialog, gtk_drop_down_set_selected (GTK_DROP_DOWN (dialog->page_set_combo), (guint)val); } -static gint +static int dialog_get_n_copies (GtkPrintUnixDialog *dialog) { GtkAdjustment *adjustment; const gchar *text; gchar *endptr = NULL; - gint n_copies; + int n_copies; adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (dialog->copies_spin)); @@ -2254,7 +2254,7 @@ dialog_get_n_copies (GtkPrintUnixDialog *dialog) static void dialog_set_n_copies (GtkPrintUnixDialog *dialog, - gint n_copies) + int n_copies) { gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->copies_spin), n_copies); } @@ -2289,11 +2289,11 @@ dialog_set_reverse (GtkPrintUnixDialog *dialog, gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->reverse_check), reverse); } -static gint +static int dialog_get_pages_per_sheet (GtkPrintUnixDialog *dialog) { const gchar *val; - gint num; + int num; val = gtk_printer_option_widget_get_value (dialog->pages_per_sheet); @@ -2360,8 +2360,8 @@ draw_page (GtkDrawingArea *da, GtkPrintUnixDialog *dialog = GTK_PRINT_UNIX_DIALOG (data); GtkStyleContext *context; gdouble ratio; - gint w, h, tmp; - gint pages_x, pages_y, i, x, y, layout_w, layout_h; + int w, h, tmp; + int pages_x, pages_y, i, x, y, layout_w, layout_h; gdouble page_width, page_height; GtkPageOrientation orientation; gboolean landscape; @@ -2370,13 +2370,13 @@ draw_page (GtkDrawingArea *da, gchar *text; GdkRGBA color; GtkNumberUpLayout number_up_layout; - gint start_x, end_x, start_y, end_y; - gint dx, dy; + int start_x, end_x, start_y, end_y; + int dx, dy; gboolean horizontal; GtkPageSetup *page_setup; gdouble paper_width, paper_height; gdouble pos_x, pos_y; - gint pages_per_sheet; + int pages_per_sheet; gboolean ltr = TRUE; orientation = gtk_page_setup_get_orientation (dialog->page_setup); @@ -2623,7 +2623,7 @@ draw_page (GtkDrawingArea *da, { PangoContext *pango_c = NULL; PangoFontDescription *pango_f = NULL; - gint font_size = 12 * PANGO_SCALE; + int font_size = 12 * PANGO_SCALE; pos_x += 1; pos_y += 1; @@ -2906,7 +2906,7 @@ update_number_up_layout (GtkPrintUnixDialog *dialog) static void custom_paper_dialog_response_cb (GtkDialog *custom_paper_dialog, - gint response_id, + int response_id, gpointer user_data) { GtkPrintUnixDialog *dialog = GTK_PRINT_UNIX_DIALOG (user_data); @@ -3131,7 +3131,7 @@ gtk_print_unix_dialog_get_page_setup_set (GtkPrintUnixDialog *dialog) */ void gtk_print_unix_dialog_set_current_page (GtkPrintUnixDialog *dialog, - gint current_page) + int current_page) { g_return_if_fail (GTK_IS_PRINT_UNIX_DIALOG (dialog)); @@ -3154,7 +3154,7 @@ gtk_print_unix_dialog_set_current_page (GtkPrintUnixDialog *dialog, * * Returns: the current page of @dialog */ -gint +int gtk_print_unix_dialog_get_current_page (GtkPrintUnixDialog *dialog) { g_return_val_if_fail (GTK_IS_PRINT_UNIX_DIALOG (dialog), -1); @@ -3208,7 +3208,7 @@ gtk_print_unix_dialog_set_settings (GtkPrintUnixDialog *dialog, { const gchar *printer; GtkPageRange *ranges; - gint num_ranges; + int num_ranges; g_return_if_fail (GTK_IS_PRINT_UNIX_DIALOG (dialog)); g_return_if_fail (settings == NULL || GTK_IS_PRINT_SETTINGS (settings)); @@ -3270,7 +3270,7 @@ gtk_print_unix_dialog_get_settings (GtkPrintUnixDialog *dialog) GtkPrintSettings *settings; GtkPrintPages print_pages; GtkPageRange *ranges; - gint n_ranges; + int n_ranges; g_return_val_if_fail (GTK_IS_PRINT_UNIX_DIALOG (dialog), NULL); diff --git a/gtk/gtkprintunixdialog.h b/gtk/gtkprintunixdialog.h index 5addb0dc9b..1555668358 100644 --- a/gtk/gtkprintunixdialog.h +++ b/gtk/gtkprintunixdialog.h @@ -49,9 +49,9 @@ GDK_AVAILABLE_IN_ALL GtkPageSetup * gtk_print_unix_dialog_get_page_setup (GtkPrintUnixDialog *dialog); GDK_AVAILABLE_IN_ALL void gtk_print_unix_dialog_set_current_page (GtkPrintUnixDialog *dialog, - gint current_page); + int current_page); GDK_AVAILABLE_IN_ALL -gint gtk_print_unix_dialog_get_current_page (GtkPrintUnixDialog *dialog); +int gtk_print_unix_dialog_get_current_page (GtkPrintUnixDialog *dialog); GDK_AVAILABLE_IN_ALL void gtk_print_unix_dialog_set_settings (GtkPrintUnixDialog *dialog, GtkPrintSettings *settings); diff --git a/gtk/gtkquartz.c b/gtk/gtkquartz.c index fe1197cdb8..cb375a2f14 100644 --- a/gtk/gtkquartz.c +++ b/gtk/gtkquartz.c @@ -278,7 +278,7 @@ _gtk_quartz_set_selection_data_for_pasteboard (NSPasteboard *pasteboard, { NSString *type; GdkDisplay *display; - gint format; + int format; const guchar *data; NSUInteger length; diff --git a/gtk/gtkquery.c b/gtk/gtkquery.c index 774820b8eb..0078baae37 100644 --- a/gtk/gtkquery.c +++ b/gtk/gtkquery.c @@ -125,7 +125,7 @@ gtk_query_matches_string (GtkQuery *query, GtkQueryPrivate *priv = gtk_query_get_instance_private (query); gchar *prepared; gboolean found; - gint i; + int i; if (!priv->text) return FALSE; diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index e76ca4e688..e8b87a1e88 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -92,11 +92,11 @@ struct _GtkRangePrivate gdouble fill_level; gdouble *marks; - gint *mark_pos; - gint n_marks; - gint round_digits; /* Round off value to this many digits, -1 for no rounding */ - gint slide_initial_slider_position; - gint slide_initial_coordinate_delta; + int *mark_pos; + int n_marks; + int round_digits; /* Round off value to this many digits, -1 for no rounding */ + int slide_initial_slider_position; + int slide_initial_coordinate_delta; guint flippable : 1; guint inverted : 1; @@ -225,11 +225,11 @@ static void gtk_range_direction_changed (GtkWidget *widget, GtkTextDirection previous_direction); static void gtk_range_measure_trough (GtkGizmo *gizmo, GtkOrientation orientation, - gint for_size, - gint *minimum, - gint *natural, - gint *minimum_baseline, - gint *natural_baseline); + int for_size, + int *minimum, + int *natural, + int *minimum_baseline, + int *natural_baseline); static void gtk_range_allocate_trough (GtkGizmo *gizmo, int width, int height, @@ -943,8 +943,8 @@ gtk_range_get_range_rect (GtkRange *range, **/ void gtk_range_get_slider_range (GtkRange *range, - gint *slider_start, - gint *slider_end) + int *slider_start, + int *slider_end) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); graphene_rect_t slider_bounds; @@ -1303,16 +1303,16 @@ gtk_range_finalize (GObject *object) static void gtk_range_measure_trough (GtkGizmo *gizmo, GtkOrientation orientation, - gint for_size, - gint *minimum, - gint *natural, - gint *minimum_baseline, - gint *natural_baseline) + int for_size, + int *minimum, + int *natural, + int *minimum_baseline, + int *natural_baseline) { GtkWidget *widget = gtk_widget_get_parent (GTK_WIDGET (gizmo)); GtkRange *range = GTK_RANGE (widget); GtkRangePrivate *priv = gtk_range_get_instance_private (range); - gint min, nat; + int min, nat; gtk_widget_measure (priv->slider_widget, orientation, -1, @@ -1486,7 +1486,7 @@ clamp_dimensions (int range_width, GtkBorder *border, gboolean border_expands_horizontally) { - gint extra, shortage; + int extra, shortage; /* Width */ extra = range_width - border->left - border->right - *width; @@ -1720,8 +1720,8 @@ coord_to_value (GtkRange *range, GtkRangePrivate *priv = gtk_range_get_instance_private (range); gdouble frac; gdouble value; - gint trough_length; - gint slider_length; + int trough_length; + int slider_length; graphene_rect_t slider_bounds; if (!gtk_widget_compute_bounds (priv->slider_widget, priv->slider_widget, &slider_bounds)) @@ -1977,8 +1977,8 @@ gtk_range_click_gesture_released (GtkGestureClick *gesture, /* During a slide, move the slider as required given new mouse position */ static void update_slider_position (GtkRange *range, - gint mouse_x, - gint mouse_y) + int mouse_x, + int mouse_y) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); graphene_rect_t trough_bounds; @@ -1990,7 +1990,7 @@ update_slider_position (GtkRange *range, gdouble mark_value; gdouble mark_delta; gdouble zoom; - gint i; + int i; double x, y; gtk_widget_translate_coordinates (GTK_WIDGET (range), priv->trough_widget, @@ -2220,7 +2220,7 @@ update_autoscroll_mode (GtkRange *range, if (priv->zoom) { int width, height; - gint size, pos; + int size, pos; width = gtk_widget_get_width (GTK_WIDGET (range)); height = gtk_widget_get_height (GTK_WIDGET (range)); @@ -2336,7 +2336,7 @@ apply_marks (GtkRange *range, gdouble *newval) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); - gint i; + int i; gdouble mark; for (i = 0; i < priv->n_marks; i++) @@ -2635,7 +2635,7 @@ gtk_range_calc_marks (GtkRange *range) GtkRangePrivate *priv = gtk_range_get_instance_private (range); GdkRectangle slider; double x, y; - gint i; + int i; for (i = 0; i < priv->n_marks; i++) { @@ -2670,7 +2670,7 @@ gtk_range_real_change_value (GtkRange *range, if (priv->round_digits >= 0) { gdouble power; - gint i; + int i; i = priv->round_digits; power = 1; @@ -2780,16 +2780,16 @@ _gtk_range_get_has_origin (GtkRange *range) void _gtk_range_set_stop_values (GtkRange *range, gdouble *values, - gint n_values) + int n_values) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); - gint i; + int i; g_free (priv->marks); priv->marks = g_new (gdouble, n_values); g_free (priv->mark_pos); - priv->mark_pos = g_new (gint, n_values); + priv->mark_pos = g_new (int, n_values); priv->n_marks = n_values; @@ -2799,16 +2799,16 @@ _gtk_range_set_stop_values (GtkRange *range, gtk_range_calc_marks (range); } -gint +int _gtk_range_get_stop_positions (GtkRange *range, - gint **values) + int **values) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); gtk_range_calc_marks (range); if (values) - *values = g_memdup (priv->mark_pos, priv->n_marks * sizeof (gint)); + *values = g_memdup (priv->mark_pos, priv->n_marks * sizeof (int)); return priv->n_marks; } @@ -2823,7 +2823,7 @@ _gtk_range_get_stop_positions (GtkRange *range, */ void gtk_range_set_round_digits (GtkRange *range, - gint round_digits) + int round_digits) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); @@ -2846,7 +2846,7 @@ gtk_range_set_round_digits (GtkRange *range, * * Returns: the number of digits to round to */ -gint +int gtk_range_get_round_digits (GtkRange *range) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); diff --git a/gtk/gtkrange.h b/gtk/gtkrange.h index f62b920c5c..2a256381b0 100644 --- a/gtk/gtkrange.h +++ b/gtk/gtkrange.h @@ -109,8 +109,8 @@ void gtk_range_get_range_rect (GtkRange *range GdkRectangle *range_rect); GDK_AVAILABLE_IN_ALL void gtk_range_get_slider_range (GtkRange *range, - gint *slider_start, - gint *slider_end); + int *slider_start, + int *slider_end); GDK_AVAILABLE_IN_ALL void gtk_range_set_increments (GtkRange *range, @@ -143,9 +143,9 @@ GDK_AVAILABLE_IN_ALL gdouble gtk_range_get_fill_level (GtkRange *range); GDK_AVAILABLE_IN_ALL void gtk_range_set_round_digits (GtkRange *range, - gint round_digits); + int round_digits); GDK_AVAILABLE_IN_ALL -gint gtk_range_get_round_digits (GtkRange *range); +int gtk_range_get_round_digits (GtkRange *range); G_END_DECLS diff --git a/gtk/gtkrangeprivate.h b/gtk/gtkrangeprivate.h index 40ee468b9c..d50ed52d7f 100644 --- a/gtk/gtkrangeprivate.h +++ b/gtk/gtkrangeprivate.h @@ -37,9 +37,9 @@ void _gtk_range_set_has_origin (GtkRange *range gboolean _gtk_range_get_has_origin (GtkRange *range); void _gtk_range_set_stop_values (GtkRange *range, gdouble *values, - gint n_values); -gint _gtk_range_get_stop_positions (GtkRange *range, - gint **values); + int n_values); +int _gtk_range_get_stop_positions (GtkRange *range, + int **values); GtkWidget *gtk_range_get_slider_widget (GtkRange *range); GtkWidget *gtk_range_get_trough_widget (GtkRange *range); diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c index fcd50dce8f..8a6ae8c23d 100644 --- a/gtk/gtkrecentmanager.c +++ b/gtk/gtkrecentmanager.c @@ -159,7 +159,7 @@ struct _GtkRecentInfo gboolean is_private; - gint ref_count; + int ref_count; }; struct _GtkRecentManagerPrivate @@ -168,7 +168,7 @@ struct _GtkRecentManagerPrivate guint is_dirty : 1; - gint size; + int size; GBookmarkFile *recent_items; @@ -210,9 +210,9 @@ static void gtk_recent_manager_real_changed (GtkRecentManager *manag static void gtk_recent_manager_set_filename (GtkRecentManager *manager, const gchar *filename); static void gtk_recent_manager_clamp_to_age (GtkRecentManager *manager, - gint age); + int age); static void gtk_recent_manager_clamp_to_size (GtkRecentManager *manager, - const gint size); + const int size); static void gtk_recent_manager_enabled_changed (GtkRecentManager *manager); @@ -453,8 +453,8 @@ gtk_recent_manager_real_changed (GtkRecentManager *manager) else { GtkSettings *settings; - gint age; - gint max_size = MAX_LIST_SIZE; + int age; + int max_size = MAX_LIST_SIZE; gboolean enabled; settings = gtk_settings_get_default (); @@ -657,7 +657,7 @@ build_recent_items_list (GtkRecentManager *manager) { GtkRecentManagerPrivate *priv = manager->priv; GError *read_error; - gint size; + int size; if (!priv->recent_items) { @@ -970,7 +970,7 @@ gtk_recent_manager_add_full (GtkRecentManager *manager, if (data->groups && ((char*)data->groups)[0] != '\0') { - gint j; + int j; for (j = 0; (data->groups)[j] != NULL; j++) g_bookmark_file_add_group (priv->recent_items, uri, (data->groups)[j]); @@ -1344,12 +1344,12 @@ purge_recent_items_list (GtkRecentManager *manager, * Returns: the number of items that have been removed from the * recently used resources list */ -gint +int gtk_recent_manager_purge_items (GtkRecentManager *manager, GError **error) { GtkRecentManagerPrivate *priv; - gint count, purged; + int count, purged; g_return_val_if_fail (GTK_IS_RECENT_MANAGER (manager), -1); @@ -1412,7 +1412,7 @@ gtk_recent_manager_changed (GtkRecentManager *manager) static void gtk_recent_manager_clamp_to_age (GtkRecentManager *manager, - gint age) + int age) { GtkRecentManagerPrivate *priv = manager->priv; gchar **uris; @@ -1430,10 +1430,10 @@ gtk_recent_manager_clamp_to_age (GtkRecentManager *manager, { const gchar *uri = uris[i]; time_t modified; - gint item_age; + int item_age; modified = g_bookmark_file_get_modified (priv->recent_items, uri, NULL); - item_age = (gint) ((now - modified) / (60 * 60 * 24)); + item_age = (int) ((now - modified) / (60 * 60 * 24)); if (item_age > age) g_bookmark_file_remove_item (priv->recent_items, uri, NULL); } @@ -1443,7 +1443,7 @@ gtk_recent_manager_clamp_to_age (GtkRecentManager *manager, static void gtk_recent_manager_clamp_to_size (GtkRecentManager *manager, - const gint size) + const int size) { GtkRecentManagerPrivate *priv = manager->priv; gchar **uris; @@ -2176,11 +2176,11 @@ gtk_recent_info_get_uri_display (GtkRecentInfo *info) * Returns: a positive integer containing the number of days * elapsed since the time this resource was last modified */ -gint +int gtk_recent_info_get_age (GtkRecentInfo *info) { time_t now, delta; - gint retval; + int retval; g_return_val_if_fail (info != NULL, -1); @@ -2188,7 +2188,7 @@ gtk_recent_info_get_age (GtkRecentInfo *info) delta = now - info->modified; - retval = (gint) (delta / (60 * 60 * 24)); + retval = (int) (delta / (60 * 60 * 24)); return retval; } diff --git a/gtk/gtkrecentmanager.h b/gtk/gtkrecentmanager.h index cd82c6b9f5..9167ab8bef 100644 --- a/gtk/gtkrecentmanager.h +++ b/gtk/gtkrecentmanager.h @@ -186,7 +186,7 @@ gboolean gtk_recent_manager_move_item (GtkRecentManager *manag GDK_AVAILABLE_IN_ALL GList * gtk_recent_manager_get_items (GtkRecentManager *manager); GDK_AVAILABLE_IN_ALL -gint gtk_recent_manager_purge_items (GtkRecentManager *manager, +int gtk_recent_manager_purge_items (GtkRecentManager *manager, GError **error); @@ -245,7 +245,7 @@ gchar * gtk_recent_info_get_short_name (GtkRecentInfo *info GDK_AVAILABLE_IN_ALL gchar * gtk_recent_info_get_uri_display (GtkRecentInfo *info) G_GNUC_MALLOC; GDK_AVAILABLE_IN_ALL -gint gtk_recent_info_get_age (GtkRecentInfo *info); +int gtk_recent_info_get_age (GtkRecentInfo *info); GDK_AVAILABLE_IN_ALL gboolean gtk_recent_info_is_local (GtkRecentInfo *info); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkrendericonprivate.h b/gtk/gtkrendericonprivate.h index a327af5099..3b1055970a 100644 --- a/gtk/gtkrendericonprivate.h +++ b/gtk/gtkrendericonprivate.h @@ -42,10 +42,10 @@ void gtk_css_style_snapshot_icon_paintable (GtkCssStyle *style, void gtk_css_style_render_icon_get_extents (GtkCssStyle *style, GdkRectangle *extents, - gint x, - gint y, - gint width, - gint height); + int x, + int y, + int width, + int height); G_END_DECLS diff --git a/gtk/gtkroundedbox.c b/gtk/gtkroundedbox.c index 801c88c6a3..d022863557 100644 --- a/gtk/gtkroundedbox.c +++ b/gtk/gtkroundedbox.c @@ -166,7 +166,7 @@ typedef struct { } Arc; static inline guint -mem_hash (gconstpointer v, gint len) +mem_hash (gconstpointer v, int len) { const signed char *p; const signed char *end; diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index 6e739f1b46..2e3b3374ab 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -147,7 +147,7 @@ struct _GtkScalePrivate GtkWidget *top_marks_widget; GtkWidget *bottom_marks_widget; - gint digits; + int digits; GtkScaleFormatValueFunc format_value_func; gpointer format_value_func_user_data; @@ -199,8 +199,8 @@ static void gtk_scale_get_range_border (GtkRange *range, GtkBorder *border); static void gtk_scale_finalize (GObject *object); static void gtk_scale_real_get_layout_offsets (GtkScale *scale, - gint *x, - gint *y); + int *x, + int *y); static void gtk_scale_buildable_interface_init (GtkBuildableIface *iface); static gboolean gtk_scale_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, @@ -222,11 +222,11 @@ G_DEFINE_TYPE_WITH_CODE (GtkScale, gtk_scale, GTK_TYPE_RANGE, G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, gtk_scale_buildable_interface_init)) -static gint +static int compare_marks (gconstpointer a, gconstpointer b, gpointer data) { gboolean inverted = GPOINTER_TO_INT (data); - gint val; + int val; const GtkScaleMark *ma, *mb; val = inverted ? -1 : 1; @@ -287,7 +287,7 @@ gtk_scale_notify (GObject *object, { GtkScaleMark *mark; GSList *m; - gint i, n; + int i, n; gdouble *values; priv->marks = g_slist_sort_with_data (priv->marks, @@ -950,7 +950,7 @@ gtk_scale_new_with_range (GtkOrientation orientation, gdouble step) { GtkAdjustment *adj; - gint digits; + int digits; g_return_val_if_fail (min < max, NULL); g_return_val_if_fail (step != 0.0, NULL); @@ -963,7 +963,7 @@ gtk_scale_new_with_range (GtkOrientation orientation, } else { - digits = abs ((gint) floor (log10 (fabs (step)))); + digits = abs ((int) floor (log10 (fabs (step)))); if (digits > 5) digits = 5; } @@ -994,7 +994,7 @@ gtk_scale_new_with_range (GtkOrientation orientation, */ void gtk_scale_set_digits (GtkScale *scale, - gint digits) + int digits) { GtkScalePrivate *priv = gtk_scale_get_instance_private (scale); GtkRange *range; @@ -1025,7 +1025,7 @@ gtk_scale_set_digits (GtkScale *scale, * * Returns: the number of decimal places that are displayed */ -gint +int gtk_scale_get_digits (GtkScale *scale) { GtkScalePrivate *priv = gtk_scale_get_instance_private (scale); @@ -1314,11 +1314,11 @@ gtk_scale_get_range_border (GtkRange *range, static void gtk_scale_measure_mark (GtkGizmo *gizmo, GtkOrientation orientation, - gint for_size, - gint *minimum, - gint *natural, - gint *minimum_baseline, - gint *natural_baseline) + int for_size, + int *minimum, + int *natural, + int *minimum_baseline, + int *natural_baseline) { GtkScaleMark *mark = g_object_get_data (G_OBJECT (gizmo), "mark"); @@ -1343,11 +1343,11 @@ gtk_scale_measure_mark (GtkGizmo *gizmo, static void gtk_scale_measure_marks (GtkGizmo *gizmo, GtkOrientation orientation, - gint for_size, - gint *minimum, - gint *natural, - gint *minimum_baseline, - gint *natural_baseline) + int for_size, + int *minimum, + int *natural, + int *minimum_baseline, + int *natural_baseline) { GtkWidget *widget = GTK_WIDGET (gizmo); GtkScale *scale = GTK_SCALE (gtk_widget_get_parent (widget));; @@ -1464,8 +1464,8 @@ gtk_scale_measure (GtkWidget *widget, static void gtk_scale_real_get_layout_offsets (GtkScale *scale, - gint *x, - gint *y) + int *x, + int *y) { GtkScalePrivate *priv = gtk_scale_get_instance_private (scale); graphene_rect_t value_bounds; @@ -1486,7 +1486,7 @@ gtk_scale_real_get_layout_offsets (GtkScale *scale, static gchar * weed_out_neg_zero (gchar *str, - gint digits) + int digits) { if (str[0] == '-') { @@ -1571,11 +1571,11 @@ gtk_scale_get_layout (GtkScale *scale) */ void gtk_scale_get_layout_offsets (GtkScale *scale, - gint *x, - gint *y) + int *x, + int *y) { - gint local_x = 0; - gint local_y = 0; + int local_x = 0; + int local_y = 0; g_return_if_fail (GTK_IS_SCALE (scale)); @@ -1663,7 +1663,7 @@ gtk_scale_add_mark (GtkScale *scale, GtkScaleMark *mark; GSList *m; gdouble *values; - gint n, i; + int n, i; GtkWidget *marks_widget; g_return_if_fail (GTK_IS_SCALE (scale)); diff --git a/gtk/gtkscale.h b/gtk/gtkscale.h index 36f5fc2bfc..0d1422fbb5 100644 --- a/gtk/gtkscale.h +++ b/gtk/gtkscale.h @@ -56,8 +56,8 @@ struct _GtkScaleClass GtkRangeClass parent_class; void (* get_layout_offsets) (GtkScale *scale, - gint *x, - gint *y); + int *x, + int *y); /*< private >*/ @@ -91,9 +91,9 @@ GtkWidget * gtk_scale_new_with_range (GtkOrientation orientation, gdouble step); GDK_AVAILABLE_IN_ALL void gtk_scale_set_digits (GtkScale *scale, - gint digits); + int digits); GDK_AVAILABLE_IN_ALL -gint gtk_scale_get_digits (GtkScale *scale); +int gtk_scale_get_digits (GtkScale *scale); GDK_AVAILABLE_IN_ALL void gtk_scale_set_draw_value (GtkScale *scale, gboolean draw_value); @@ -114,8 +114,8 @@ GDK_AVAILABLE_IN_ALL PangoLayout * gtk_scale_get_layout (GtkScale *scale); GDK_AVAILABLE_IN_ALL void gtk_scale_get_layout_offsets (GtkScale *scale, - gint *x, - gint *y); + int *x, + int *y); GDK_AVAILABLE_IN_ALL void gtk_scale_add_mark (GtkScale *scale, diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index bb74c4f17b..751a76ae5d 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -265,10 +265,10 @@ typedef struct guint propagate_natural_height : 1; guint smooth_scroll : 1; - gint min_content_width; - gint min_content_height; - gint max_content_width; - gint max_content_height; + int min_content_width; + int min_content_height; + int max_content_width; + int max_content_height; guint scroll_events_overshoot_id; @@ -391,8 +391,8 @@ static void _gtk_scrolled_window_set_adjustment_value (GtkScrolledWindow *scrol static void gtk_scrolled_window_cancel_deceleration (GtkScrolledWindow *scrolled_window); static gboolean _gtk_scrolled_window_get_overshoot (GtkScrolledWindow *scrolled_window, - gint *overshoot_x, - gint *overshoot_y); + int *overshoot_x, + int *overshoot_y); static void gtk_scrolled_window_start_deceleration (GtkScrolledWindow *scrolled_window); @@ -931,7 +931,7 @@ static void gtk_scrolled_window_invalidate_overshoot (GtkScrolledWindow *scrolled_window) { GtkAllocation child_allocation; - gint overshoot_x, overshoot_y; + int overshoot_x, overshoot_y; if (!_gtk_scrolled_window_get_overshoot (scrolled_window, &overshoot_x, &overshoot_y)) return; @@ -1121,7 +1121,7 @@ coords_close_to_indicator (GtkScrolledWindow *sw, { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (sw); graphene_rect_t indicator_bounds; - gint distance; + int distance; if (!gtk_widget_compute_bounds (indicator->scrollbar, GTK_WIDGET (sw), &indicator_bounds)) return FALSE; @@ -1467,8 +1467,8 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget, GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (widget); GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); GtkAllocation child_allocation; - gint sb_width; - gint sb_height; + int sb_width; + int sb_height; /* Get possible scrollbar dimensions */ gtk_widget_measure (priv->vscrollbar, GTK_ORIENTATION_HORIZONTAL, -1, @@ -1490,8 +1490,8 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget, if (priv->child && gtk_widget_get_visible (priv->child)) { - gint child_scroll_width; - gint child_scroll_height; + int child_scroll_width; + int child_scroll_height; gboolean previous_hvis; gboolean previous_vvis; guint count = 0; @@ -1735,8 +1735,8 @@ gtk_scrolled_window_measure (GtkWidget *widget, } else { - gint min = priv->min_content_width >= 0 ? priv->min_content_width : 0; - gint max = priv->max_content_width >= 0 ? priv->max_content_width : G_MAXINT; + int min = priv->min_content_width >= 0 ? priv->min_content_width : 0; + int max = priv->max_content_width >= 0 ? priv->max_content_width : G_MAXINT; minimum_req = CLAMP (minimum_req, min, max); natural_req = CLAMP (natural_req, min, max); @@ -1753,8 +1753,8 @@ gtk_scrolled_window_measure (GtkWidget *widget, } else { - gint min = priv->min_content_height >= 0 ? priv->min_content_height : 0; - gint max = priv->max_content_height >= 0 ? priv->max_content_height : G_MAXINT; + int min = priv->min_content_height >= 0 ? priv->min_content_height : 0; + int max = priv->max_content_height >= 0 ? priv->max_content_height : G_MAXINT; minimum_req = CLAMP (minimum_req, min, max); natural_req = CLAMP (natural_req, min, max); @@ -1859,7 +1859,7 @@ gtk_scrolled_window_snapshot_overshoot (GtkScrolledWindow *scrolled_window, { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); GtkWidget *widget = GTK_WIDGET (scrolled_window); - gint overshoot_x, overshoot_y; + int overshoot_x, overshoot_y; GtkStyleContext *context; GdkRectangle rect; @@ -1963,7 +1963,7 @@ gtk_scrolled_window_init (GtkScrolledWindow *scrolled_window) g_quark_from_static_string (GTK_STYLE_CLASS_TOP), g_quark_from_static_string (GTK_STYLE_CLASS_BOTTOM), }; - gint i; + int i; gtk_widget_set_focusable (widget, TRUE); @@ -2971,8 +2971,8 @@ gtk_scrolled_window_relative_allocation (GtkScrolledWindow *scrolled_window, GtkAllocation *allocation) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); - gint sb_width; - gint sb_height; + int sb_width; + int sb_height; int width, height; g_return_if_fail (scrolled_window != NULL); @@ -3023,8 +3023,8 @@ gtk_scrolled_window_relative_allocation (GtkScrolledWindow *scrolled_window, static gboolean _gtk_scrolled_window_get_overshoot (GtkScrolledWindow *scrolled_window, - gint *overshoot_x, - gint *overshoot_y) + int *overshoot_x, + int *overshoot_y) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); GtkAdjustment *vadjustment, *hadjustment; @@ -3123,7 +3123,7 @@ gtk_scrolled_window_allocate_scrollbar (GtkScrolledWindow *scrolled_window, GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); GtkAllocation child_allocation, content_allocation; GtkWidget *widget = GTK_WIDGET (scrolled_window); - gint sb_height, sb_width; + int sb_height, sb_width; gtk_scrolled_window_inner_allocation (scrolled_window, &content_allocation); gtk_widget_measure (priv->vscrollbar, GTK_ORIENTATION_HORIZONTAL, -1, @@ -3808,7 +3808,7 @@ gtk_scrolled_window_realize (GtkWidget *widget) * * Returns: the minimum content width */ -gint +int gtk_scrolled_window_get_min_content_width (GtkScrolledWindow *scrolled_window) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); @@ -3832,7 +3832,7 @@ gtk_scrolled_window_get_min_content_width (GtkScrolledWindow *scrolled_window) */ void gtk_scrolled_window_set_min_content_width (GtkScrolledWindow *scrolled_window, - gint width) + int width) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); @@ -3858,7 +3858,7 @@ gtk_scrolled_window_set_min_content_width (GtkScrolledWindow *scrolled_window, * * Returns: the minimal content height */ -gint +int gtk_scrolled_window_get_min_content_height (GtkScrolledWindow *scrolled_window) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); @@ -3882,7 +3882,7 @@ gtk_scrolled_window_get_min_content_height (GtkScrolledWindow *scrolled_window) */ void gtk_scrolled_window_set_min_content_height (GtkScrolledWindow *scrolled_window, - gint height) + int height) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); @@ -3957,7 +3957,7 @@ gtk_scrolled_window_get_overlay_scrolling (GtkScrolledWindow *scrolled_window) */ void gtk_scrolled_window_set_max_content_width (GtkScrolledWindow *scrolled_window, - gint width) + int width) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); @@ -3981,7 +3981,7 @@ gtk_scrolled_window_set_max_content_width (GtkScrolledWindow *scrolled_window, * * Returns: the maximum content width, or -1 */ -gint +int gtk_scrolled_window_get_max_content_width (GtkScrolledWindow *scrolled_window) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); @@ -4005,7 +4005,7 @@ gtk_scrolled_window_get_max_content_width (GtkScrolledWindow *scrolled_window) */ void gtk_scrolled_window_set_max_content_height (GtkScrolledWindow *scrolled_window, - gint height) + int height) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); @@ -4029,7 +4029,7 @@ gtk_scrolled_window_set_max_content_height (GtkScrolledWindow *scrolled_window, * * Returns: the maximum content height, or -1 */ -gint +int gtk_scrolled_window_get_max_content_height (GtkScrolledWindow *scrolled_window) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); diff --git a/gtk/gtkscrolledwindow.h b/gtk/gtkscrolledwindow.h index 5d1a1d66e1..06a0c778a4 100644 --- a/gtk/gtkscrolledwindow.h +++ b/gtk/gtkscrolledwindow.h @@ -130,15 +130,15 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_scrolled_window_get_has_frame (GtkScrolledWindow *scrolled_window); GDK_AVAILABLE_IN_ALL -gint gtk_scrolled_window_get_min_content_width (GtkScrolledWindow *scrolled_window); +int gtk_scrolled_window_get_min_content_width (GtkScrolledWindow *scrolled_window); GDK_AVAILABLE_IN_ALL void gtk_scrolled_window_set_min_content_width (GtkScrolledWindow *scrolled_window, - gint width); + int width); GDK_AVAILABLE_IN_ALL -gint gtk_scrolled_window_get_min_content_height (GtkScrolledWindow *scrolled_window); +int gtk_scrolled_window_get_min_content_height (GtkScrolledWindow *scrolled_window); GDK_AVAILABLE_IN_ALL void gtk_scrolled_window_set_min_content_height (GtkScrolledWindow *scrolled_window, - gint height); + int height); GDK_AVAILABLE_IN_ALL void gtk_scrolled_window_set_kinetic_scrolling (GtkScrolledWindow *scrolled_window, gboolean kinetic_scrolling); @@ -159,15 +159,15 @@ gboolean gtk_scrolled_window_get_overlay_scrolling (GtkScrolledWindow *s GDK_AVAILABLE_IN_ALL void gtk_scrolled_window_set_max_content_width (GtkScrolledWindow *scrolled_window, - gint width); + int width); GDK_AVAILABLE_IN_ALL -gint gtk_scrolled_window_get_max_content_width (GtkScrolledWindow *scrolled_window); +int gtk_scrolled_window_get_max_content_width (GtkScrolledWindow *scrolled_window); GDK_AVAILABLE_IN_ALL void gtk_scrolled_window_set_max_content_height (GtkScrolledWindow *scrolled_window, - gint height); + int height); GDK_AVAILABLE_IN_ALL -gint gtk_scrolled_window_get_max_content_height (GtkScrolledWindow *scrolled_window); +int gtk_scrolled_window_get_max_content_height (GtkScrolledWindow *scrolled_window); GDK_AVAILABLE_IN_ALL void gtk_scrolled_window_set_propagate_natural_width (GtkScrolledWindow *scrolled_window, diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index fe1af8e9bf..7fc6c8343f 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -114,7 +114,7 @@ struct _GtkSettings GdkDisplay *display; GSList *style_cascades; GtkCssProvider *theme_provider; - gint font_size; + int font_size; gboolean font_size_absolute; gchar *font_family; cairo_font_options_t *font_options; @@ -1006,7 +1006,7 @@ gtk_settings_finalize (GObject *object) GtkStyleCascade * _gtk_settings_get_style_cascade (GtkSettings *settings, - gint scale) + int scale) { GtkStyleCascade *new_cascade; GSList *list; @@ -1459,8 +1459,8 @@ gtk_settings_set_property_value_internal (GtkSettings *settings, static void settings_update_double_click (GtkSettings *settings) { - gint double_click_time; - gint double_click_distance; + int double_click_time; + int double_click_distance; g_object_get (settings, "gtk-double-click-time", &double_click_time, @@ -1475,7 +1475,7 @@ static void settings_update_cursor_theme (GtkSettings *settings) { gchar *theme = NULL; - gint size = 0; + int size = 0; g_object_get (settings, "gtk-cursor-theme-name", &theme, @@ -1491,10 +1491,10 @@ settings_update_cursor_theme (GtkSettings *settings) static void settings_update_font_options (GtkSettings *settings) { - gint hinting; + int hinting; gchar *hint_style_str; cairo_hint_style_t hint_style; - gint antialias; + int antialias; cairo_antialias_t antialias_mode; gchar *rgba_str; cairo_subpixel_order_t subpixel_order; @@ -1734,7 +1734,7 @@ gtk_settings_load_from_key_file (GtkSettings *settings, GKeyFile *keyfile; gchar **keys; gsize n_keys; - gint i; + int i; error = NULL; keys = NULL; @@ -1793,7 +1793,7 @@ gtk_settings_load_from_key_file (GtkSettings *settings, case G_TYPE_INT: case G_TYPE_UINT: { - gint i_val; + int i_val; g_value_init (&svalue.value, G_TYPE_LONG); i_val = g_key_file_get_integer (keyfile, "Settings", key, &error); @@ -1906,7 +1906,7 @@ static void settings_update_xsettings (GtkSettings *settings) { GParamSpec **pspecs; - gint i; + int i; pspecs = g_object_class_list_properties (G_OBJECT_GET_CLASS (settings), NULL); for (i = 0; pspecs[i]; i++) @@ -1991,7 +1991,7 @@ gtk_settings_get_enable_animations (GtkSettings *settings) return g_value_get_boolean (&svalue->value); } -gint +int gtk_settings_get_dnd_drag_threshold (GtkSettings *settings) { GtkSettingsPropertyValue *svalue = &settings->property_values[PROP_DND_DRAG_THRESHOLD - 1]; @@ -2031,7 +2031,7 @@ gtk_settings_get_font_family (GtkSettings *settings) return settings->font_family; } -gint +int gtk_settings_get_font_size (GtkSettings *settings) { settings_update_font_name (settings); diff --git a/gtk/gtksettingsprivate.h b/gtk/gtksettingsprivate.h index 73a362a1be..f39963939c 100644 --- a/gtk/gtksettingsprivate.h +++ b/gtk/gtksettingsprivate.h @@ -30,7 +30,7 @@ const cairo_font_options_t * gtk_settings_get_font_options (GtkSettings *settings); GdkDisplay *_gtk_settings_get_display (GtkSettings *settings); GtkStyleCascade *_gtk_settings_get_style_cascade (GtkSettings *settings, - gint scale); + int scale); typedef enum { @@ -44,9 +44,9 @@ GtkSettingsSource _gtk_settings_get_setting_source (GtkSettings *settings, const gchar *name); gboolean gtk_settings_get_enable_animations (GtkSettings *settings); -gint gtk_settings_get_dnd_drag_threshold (GtkSettings *settings); +int gtk_settings_get_dnd_drag_threshold (GtkSettings *settings); const gchar *gtk_settings_get_font_family (GtkSettings *settings); -gint gtk_settings_get_font_size (GtkSettings *settings); +int gtk_settings_get_font_size (GtkSettings *settings); gboolean gtk_settings_get_font_size_is_absolute (GtkSettings *settings); G_END_DECLS diff --git a/gtk/gtkshortcutlabel.c b/gtk/gtkshortcutlabel.c index 458a091cd2..db54b35811 100644 --- a/gtk/gtkshortcutlabel.c +++ b/gtk/gtkshortcutlabel.c @@ -131,7 +131,7 @@ get_labels (guint key, GdkModifierType modifier, guint *n_mods) gchar key_label[6]; const gchar *tmp; gunichar ch; - gint i = 0; + int i = 0; gchar **retval; if (modifier & GDK_SHIFT_MASK) @@ -260,7 +260,7 @@ display_shortcut (GtkWidget *self, GdkModifierType modifier) { gchar **keys = NULL; - gint i; + int i; guint n_mods; keys = get_labels (key, modifier, &n_mods); @@ -288,7 +288,7 @@ parse_combination (GtkShortcutLabel *self, const gchar *str) { gchar **accels; - gint k; + int k; GdkModifierType modifier = 0; guint key = 0; gboolean retval = TRUE; @@ -316,7 +316,7 @@ parse_sequence (GtkShortcutLabel *self, const gchar *str) { gchar **accels; - gint k; + int k; gboolean retval = TRUE; accels = g_strsplit (str, "+", 0); @@ -377,7 +377,7 @@ static void gtk_shortcut_label_rebuild (GtkShortcutLabel *self) { gchar **accels; - gint k; + int k; clear_children (self); diff --git a/gtk/gtkshortcutssection.c b/gtk/gtkshortcutssection.c index 5f5be70582..bc1c06c7bf 100644 --- a/gtk/gtkshortcutssection.c +++ b/gtk/gtkshortcutssection.c @@ -78,7 +78,7 @@ struct _GtkShortcutsSectionClass GtkBoxClass parent_class; gboolean (* change_current_page) (GtkShortcutsSection *self, - gint offset); + int offset); }; @@ -117,7 +117,7 @@ static void gtk_shortcuts_section_filter_groups (GtkShortcutsSection *self); static void gtk_shortcuts_section_reflow_groups (GtkShortcutsSection *self); static gboolean gtk_shortcuts_section_change_current_page (GtkShortcutsSection *self, - gint offset); + int offset); static void gtk_shortcuts_section_pan_gesture_pan (GtkGesturePan *gesture, GtkPanDirection direction, @@ -729,7 +729,7 @@ gtk_shortcuts_section_reflow_groups (GtkShortcutsSection *self) static gboolean gtk_shortcuts_section_change_current_page (GtkShortcutsSection *self, - gint offset) + int offset) { GtkWidget *child; diff --git a/gtk/gtkshortcuttrigger.c b/gtk/gtkshortcuttrigger.c index 8364932c59..46e2f9cc96 100644 --- a/gtk/gtkshortcuttrigger.c +++ b/gtk/gtkshortcuttrigger.c @@ -362,7 +362,7 @@ gtk_shortcut_trigger_equal (gconstpointer trigger1, * @trigger1 is found, respectively, to be less than, to match, * or be greater than @trigger2. **/ -gint +int gtk_shortcut_trigger_compare (gconstpointer trigger1, gconstpointer trigger2) { diff --git a/gtk/gtkshortcuttrigger.h b/gtk/gtkshortcuttrigger.h index 2701429c98..eeda11939e 100644 --- a/gtk/gtkshortcuttrigger.h +++ b/gtk/gtkshortcuttrigger.h @@ -61,7 +61,7 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_shortcut_trigger_equal (gconstpointer trigger1, gconstpointer trigger2); GDK_AVAILABLE_IN_ALL -gint gtk_shortcut_trigger_compare (gconstpointer trigger1, +int gtk_shortcut_trigger_compare (gconstpointer trigger1, gconstpointer trigger2); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtksidebarrow.c b/gtk/gtksidebarrow.c index fbd90b66bb..1177722c85 100644 --- a/gtk/gtksidebarrow.c +++ b/gtk/gtksidebarrow.c @@ -45,7 +45,7 @@ struct _GtkSidebarRow GtkWidget *label_widget; gboolean ejectable; GtkWidget *eject_button; - gint order_index; + int order_index; GtkPlacesSidebarSectionType section_type; GtkPlacesSidebarPlaceType place_type; gchar *uri; @@ -91,7 +91,7 @@ cloud_row_update (GtkSidebarRow *self) { CloudProvidersAccount *account; GIcon *end_icon; - gint provider_status; + int provider_status; account = CLOUD_PROVIDERS_ACCOUNT (self->cloud_provider_account); provider_status = cloud_providers_account_get_status (account); diff --git a/gtk/gtksizegroup.c b/gtk/gtksizegroup.c index 19999fece4..51c7627024 100644 --- a/gtk/gtksizegroup.c +++ b/gtk/gtksizegroup.c @@ -157,7 +157,7 @@ static void add_widget_to_closure (GHashTable *widgets, GHashTable *groups, GtkWidget *widget, - gint orientation) + int orientation) { GSList *tmp_groups, *tmp_widgets; @@ -441,8 +441,8 @@ gtk_size_group_get_widgets (GtkSizeGroup *size_group) typedef struct { gchar *name; - gint line; - gint col; + int line; + int col; } ItemData; static void diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c index 269bcd0394..5fc499c4b0 100644 --- a/gtk/gtksizerequest.c +++ b/gtk/gtksizerequest.c @@ -82,7 +82,7 @@ fetch_request_mode (GtkWidget *widget) return GTK_WIDGET_GET_CLASS (widget)->get_request_mode (widget); } -static gint +static int get_number (GtkCssValue *value) { double d = _gtk_css_number_value_get (value, 100); @@ -133,18 +133,18 @@ get_box_padding (GtkCssStyle *style, static void gtk_widget_query_size_for_orientation (GtkWidget *widget, GtkOrientation orientation, - gint for_size, - gint *minimum, - gint *natural, - gint *minimum_baseline, - gint *natural_baseline) + int for_size, + int *minimum, + int *natural, + int *minimum_baseline, + int *natural_baseline) { const gboolean baselines_requested = (minimum_baseline != NULL || natural_baseline != NULL); SizeRequestCache *cache; - gint min_size = 0; - gint nat_size = 0; - gint min_baseline = -1; - gint nat_baseline = -1; + int min_size = 0; + int nat_size = 0; + int min_baseline = -1; + int nat_baseline = -1; gboolean found_in_cache; gtk_widget_ensure_resize (widget); @@ -647,7 +647,7 @@ gtk_widget_get_preferred_size (GtkWidget *widget, } } -static gint +static int compare_gap (gconstpointer p1, gconstpointer p2, gpointer data) @@ -656,14 +656,14 @@ compare_gap (gconstpointer p1, const guint *c1 = p1; const guint *c2 = p2; - const gint d1 = MAX (sizes[*c1].natural_size - + const int d1 = MAX (sizes[*c1].natural_size - sizes[*c1].minimum_size, 0); - const gint d2 = MAX (sizes[*c2].natural_size - + const int d2 = MAX (sizes[*c2].natural_size - sizes[*c2].minimum_size, 0); - gint delta = (d2 - d1); + int delta = (d2 - d1); if (0 == delta) delta = (*c2 - *c1); @@ -689,13 +689,13 @@ compare_gap (gconstpointer p1, * Returns: The remainder of @extra_space after redistributing space * to @sizes. */ -gint -gtk_distribute_natural_allocation (gint extra_space, +int +gtk_distribute_natural_allocation (int extra_space, guint n_requested_sizes, GtkRequestedSize *sizes) { guint *spreading; - gint i; + int i; g_return_val_if_fail (extra_space >= 0, 0); @@ -735,11 +735,11 @@ gtk_distribute_natural_allocation (gint extra_space, * Sort order and reducing remaining space by assigned space * ensures that space is distributed equally. */ - gint glue = (extra_space + i) / (i + 1); - gint gap = sizes[(spreading[i])].natural_size + int glue = (extra_space + i) / (i + 1); + int gap = sizes[(spreading[i])].natural_size - sizes[(spreading[i])].minimum_size; - gint extra = MIN (glue, gap); + int extra = MIN (glue, gap); sizes[spreading[i]].minimum_size += extra; diff --git a/gtk/gtksizerequest.h b/gtk/gtksizerequest.h index 155fc5d13e..4f3b03d799 100644 --- a/gtk/gtksizerequest.h +++ b/gtk/gtksizerequest.h @@ -41,14 +41,14 @@ typedef struct _GtkRequestedSize GtkRequestedSize; struct _GtkRequestedSize { gpointer data; - gint minimum_size; - gint natural_size; + int minimum_size; + int natural_size; }; /* General convenience function to aid in allocating natural sizes */ GDK_AVAILABLE_IN_ALL -gint gtk_distribute_natural_allocation (gint extra_space, +int gtk_distribute_natural_allocation (int extra_space, guint n_requested_sizes, GtkRequestedSize *sizes); diff --git a/gtk/gtksizerequestcache.c b/gtk/gtksizerequestcache.c index a68e29903f..5631a6457a 100644 --- a/gtk/gtksizerequestcache.c +++ b/gtk/gtksizerequestcache.c @@ -34,7 +34,7 @@ _gtk_size_request_cache_init (SizeRequestCache *cache) static void free_sizes_x (SizeRequestX **sizes) { - gint i; + int i; for (i = 0; i < GTK_SIZE_REQUEST_CACHED_SIZES && sizes[i] != NULL; i++) g_slice_free (SizeRequestX, sizes[i]); @@ -45,7 +45,7 @@ free_sizes_x (SizeRequestX **sizes) static void free_sizes_y (SizeRequestY **sizes) { - gint i; + int i; for (i = 0; i < GTK_SIZE_REQUEST_CACHED_SIZES && sizes[i] != NULL; i++) g_slice_free (SizeRequestY, sizes[i]); diff --git a/gtk/gtksizerequestcacheprivate.h b/gtk/gtksizerequestcacheprivate.h index 62ff226031..5d460ed013 100644 --- a/gtk/gtksizerequestcacheprivate.h +++ b/gtk/gtksizerequestcacheprivate.h @@ -39,28 +39,28 @@ G_BEGIN_DECLS #define GTK_SIZE_REQUEST_CACHED_SIZES (5) typedef struct { - gint minimum_size; - gint natural_size; + int minimum_size; + int natural_size; } CachedSizeX; typedef struct { - gint minimum_size; - gint natural_size; - gint minimum_baseline; - gint natural_baseline; + int minimum_size; + int natural_size; + int minimum_baseline; + int natural_baseline; } CachedSizeY; typedef struct { - gint lower_for_size; /* The minimum for_size with the same result */ - gint upper_for_size; /* The maximum for_size with the same result */ + int lower_for_size; /* The minimum for_size with the same result */ + int upper_for_size; /* The maximum for_size with the same result */ CachedSizeX cached_size; } SizeRequestX; typedef struct { - gint lower_for_size; /* The minimum for_size with the same result */ - gint upper_for_size; /* The maximum for_size with the same result */ + int lower_for_size; /* The minimum for_size with the same result */ + int upper_for_size; /* The maximum for_size with the same result */ CachedSizeY cached_size; } SizeRequestY; diff --git a/gtk/gtksortkeysprivate.h b/gtk/gtksortkeysprivate.h index c9f93b69dc..78b8144692 100644 --- a/gtk/gtksortkeysprivate.h +++ b/gtk/gtksortkeysprivate.h @@ -28,7 +28,7 @@ typedef struct _GtkSortKeysClass GtkSortKeysClass; struct _GtkSortKeys { const GtkSortKeysClass *klass; - gint ref_count; + int ref_count; gsize key_size; gsize key_align; /* must be power of 2 */ diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 3da876839c..2bada1e6fd 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -124,7 +124,7 @@ * // Provides a function to retrieve an integer value from a GtkSpinButton * // and creates a spin button to model percentage values. * - * gint + * int * grab_int_value (GtkSpinButton *button, * gpointer user_data) * { @@ -222,9 +222,9 @@ struct _GtkSpinButtonClass { GtkWidgetClass parent_class; - gint (*input) (GtkSpinButton *spin_button, - gdouble *new_value); - gint (*output) (GtkSpinButton *spin_button); + int (*input) (GtkSpinButton *spin_button, + gdouble *new_value); + int (*output) (GtkSpinButton *spin_button); void (*value_changed) (GtkSpinButton *spin_button); /* Action signals for keybindings, do not connect to these */ @@ -289,14 +289,14 @@ static void gtk_spin_button_snap (GtkSpinButton *spin_button, gdouble val); static void gtk_spin_button_insert_text (GtkEditable *editable, const gchar *new_text, - gint new_text_length, - gint *position); + int new_text_length, + int *position); static void gtk_spin_button_real_spin (GtkSpinButton *spin_button, gdouble step); static void gtk_spin_button_real_change_value (GtkSpinButton *spin, GtkScrollType scroll); -static gint gtk_spin_button_default_input (GtkSpinButton *spin_button, +static int gtk_spin_button_default_input (GtkSpinButton *spin_button, gdouble *new_val); static void gtk_spin_button_default_output (GtkSpinButton *spin_button); @@ -1133,7 +1133,7 @@ gtk_spin_button_set_orientation (GtkSpinButton *spin, static gchar * weed_out_neg_zero (gchar *str, - gint digits) + int digits) { if (str[0] == '-') { @@ -1199,7 +1199,7 @@ gtk_spin_button_state_flags_changed (GtkWidget *widget, GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->state_flags_changed (widget, previous_state); } -static gint +static int gtk_spin_button_timer (GtkSpinButton *spin_button) { gboolean retval = FALSE; @@ -1391,8 +1391,8 @@ gtk_spin_button_activate (GtkText *entry, static void gtk_spin_button_insert_text (GtkEditable *editable, const gchar *new_text, - gint new_text_length, - gint *position) + int new_text_length, + int *position) { GtkSpinButton *spin = GTK_SPIN_BUTTON (editable); @@ -1400,11 +1400,11 @@ gtk_spin_button_insert_text (GtkEditable *editable, { struct lconv *lc; gboolean sign; - gint dotpos = -1; - gint i; + int dotpos = -1; + int i; guint32 pos_sign; guint32 neg_sign; - gint entry_length; + int entry_length; const gchar *entry_text; entry_text = gtk_editable_get_text (GTK_EDITABLE (spin->entry)); @@ -1461,7 +1461,7 @@ gtk_spin_button_insert_text (GtkEditable *editable, } if (dotpos > -1 && *position > dotpos && - (gint)spin->digits - entry_length + (int)spin->digits - entry_length + dotpos - new_text_length + 1 < 0) return; @@ -1476,7 +1476,7 @@ gtk_spin_button_insert_text (GtkEditable *editable, else if (new_text[i] == *(lc->decimal_point)) { if (!spin->digits || dotpos > -1 || - (new_text_length - 1 - i + entry_length - *position > (gint)spin->digits)) + (new_text_length - 1 - i + entry_length - *position > (int)spin->digits)) return; dotpos = *position + i; } @@ -1539,7 +1539,7 @@ gtk_spin_button_real_spin (GtkSpinButton *spin_button, g_signal_emit (spin_button, spinbutton_signals[WRAPPED], 0); } -static gint +static int gtk_spin_button_default_input (GtkSpinButton *spin_button, gdouble *new_val) { @@ -1687,7 +1687,7 @@ gtk_spin_button_new_with_range (gdouble min, { GtkAdjustment *adjustment; GtkSpinButton *spin; - gint digits; + int digits; g_return_val_if_fail (min <= max, NULL); g_return_val_if_fail (step != 0.0, NULL); @@ -1699,7 +1699,7 @@ gtk_spin_button_new_with_range (gdouble min, if (fabs (step) >= 1.0 || step == 0.0) digits = 0; else { - digits = abs ((gint) floor (log10 (fabs (step)))); + digits = abs ((int) floor (log10 (fabs (step)))); if (digits > MAX_DIGITS) digits = MAX_DIGITS; } @@ -1914,7 +1914,7 @@ gtk_spin_button_get_value (GtkSpinButton *spin_button) * * Returns: the value of @spin_button */ -gint +int gtk_spin_button_get_value_as_int (GtkSpinButton *spin_button) { gdouble val; @@ -1945,7 +1945,7 @@ gtk_spin_button_set_value (GtkSpinButton *spin_button, gtk_adjustment_set_value (spin_button->adjustment, value); else { - gint return_val = FALSE; + int return_val = FALSE; g_signal_emit (spin_button, spinbutton_signals[OUTPUT], 0, &return_val); if (!return_val) gtk_spin_button_default_output (spin_button); @@ -2209,8 +2209,8 @@ void gtk_spin_button_update (GtkSpinButton *spin_button) { gdouble val; - gint error = 0; - gint return_val; + int error = 0; + int return_val; g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button)); diff --git a/gtk/gtkspinbutton.h b/gtk/gtkspinbutton.h index 405fd6b5e9..5e9b70caa5 100644 --- a/gtk/gtkspinbutton.h +++ b/gtk/gtkspinbutton.h @@ -149,7 +149,7 @@ GDK_AVAILABLE_IN_ALL gdouble gtk_spin_button_get_value (GtkSpinButton *spin_button); GDK_AVAILABLE_IN_ALL -gint gtk_spin_button_get_value_as_int (GtkSpinButton *spin_button); +int gtk_spin_button_get_value_as_int (GtkSpinButton *spin_button); GDK_AVAILABLE_IN_ALL void gtk_spin_button_set_value (GtkSpinButton *spin_button, diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c index 8194f67302..8b5545ed26 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -142,8 +142,8 @@ typedef struct { GtkProgressTracker tracker; gboolean first_frame_skipped; - gint last_visible_widget_width; - gint last_visible_widget_height; + int last_visible_widget_width; + int last_visible_widget_height; gboolean interpolate_size; @@ -886,7 +886,7 @@ get_simple_transition_type (gboolean new_child_first, } } -static gint +static int get_bin_window_x (GtkStack *stack) { GtkStackPrivate *priv = gtk_stack_get_instance_private (stack); @@ -906,7 +906,7 @@ get_bin_window_x (GtkStack *stack) return x; } -static gint +static int get_bin_window_y (GtkStack *stack) { GtkStackPrivate *priv = gtk_stack_get_instance_private (stack); @@ -2038,7 +2038,7 @@ gtk_stack_snapshot_under (GtkWidget *widget, GtkStack *stack = GTK_STACK (widget); GtkStackPrivate *priv = gtk_stack_get_instance_private (stack); int widget_width, widget_height; - gint x, y, width, height, pos_x, pos_y; + int x, y, width, height, pos_x, pos_y; x = y = 0; @@ -2382,7 +2382,7 @@ gtk_stack_measure (GtkWidget *widget, GtkStackPrivate *priv = gtk_stack_get_instance_private (stack); GtkStackPage *child_info; GtkWidget *child; - gint child_min, child_nat; + int child_min, child_nat; GList *l; *minimum = 0; diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index 0a11c83007..620411e873 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -521,7 +521,7 @@ gtk_style_context_get_state (GtkStyleContext *context) **/ void gtk_style_context_set_scale (GtkStyleContext *context, - gint scale) + int scale) { GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context); @@ -552,7 +552,7 @@ gtk_style_context_set_scale (GtkStyleContext *context, * * Returns: the scale **/ -gint +int gtk_style_context_get_scale (GtkStyleContext *context) { GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context); @@ -988,8 +988,8 @@ draw_insertion_cursor (GtkStyleContext *context, { GdkRGBA primary_color; GdkRGBA secondary_color; - gint stem_width; - gint offset; + int stem_width; + int offset; cairo_save (cr); cairo_new_path (cr); @@ -1010,8 +1010,8 @@ draw_insertion_cursor (GtkStyleContext *context, if (draw_arrow) { - gint arrow_width; - gint ax, ay; + int arrow_width; + int ax, ay; arrow_width = stem_width + 1; @@ -1049,8 +1049,8 @@ get_insertion_cursor_bounds (gdouble height, gboolean draw_arrow, graphene_rect_t *bounds) { - gint stem_width; - gint offset; + int stem_width; + int offset; stem_width = height * aspect_ratio + 1; if (direction == PANGO_DIRECTION_LTR) diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h index e6e7fcd81d..87cc285c2f 100644 --- a/gtk/gtkstylecontext.h +++ b/gtk/gtkstylecontext.h @@ -861,9 +861,9 @@ GtkStateFlags gtk_style_context_get_state (GtkStyleContext *context); GDK_AVAILABLE_IN_ALL void gtk_style_context_set_scale (GtkStyleContext *context, - gint scale); + int scale); GDK_AVAILABLE_IN_ALL -gint gtk_style_context_get_scale (GtkStyleContext *context); +int gtk_style_context_get_scale (GtkStyleContext *context); GDK_AVAILABLE_IN_ALL void gtk_style_context_add_class (GtkStyleContext *context, diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c index e720ac3030..6740d9eeed 100644 --- a/gtk/gtkswitch.c +++ b/gtk/gtkswitch.c @@ -195,7 +195,7 @@ gtk_switch_begin_toggle_animation (GtkSwitch *self) static void gtk_switch_click_gesture_pressed (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkSwitch *self) @@ -215,7 +215,7 @@ gtk_switch_click_gesture_pressed (GtkGestureClick *gesture, static void gtk_switch_click_gesture_released (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkSwitch *self) @@ -303,7 +303,7 @@ gtk_switch_measure (GtkWidget *widget, int *natural_baseline) { GtkSwitch *self = GTK_SWITCH (widget); - gint slider_minimum, slider_natural; + int slider_minimum, slider_natural; int on_nat, off_nat; gtk_widget_measure (self->slider, orientation, -1, diff --git a/gtk/gtktext.h b/gtk/gtktext.h index 4ce0b781bb..0fa6db6c5e 100644 --- a/gtk/gtktext.h +++ b/gtk/gtktext.h @@ -90,7 +90,7 @@ GDK_AVAILABLE_IN_ALL void gtk_text_set_max_length (GtkText *self, int length); GDK_AVAILABLE_IN_ALL -gint gtk_text_get_max_length (GtkText *self); +int gtk_text_get_max_length (GtkText *self); GDK_AVAILABLE_IN_ALL guint16 gtk_text_get_text_length (GtkText *self); diff --git a/gtk/gtktextattributes.h b/gtk/gtktextattributes.h index f6332c0dc7..bb756d44ea 100644 --- a/gtk/gtktextattributes.h +++ b/gtk/gtktextattributes.h @@ -91,7 +91,7 @@ struct _GtkTextAppearance GdkRGBA *strikethrough_rgba; /* super/subscript rise, can be negative */ - gint rise; + int rise; guint underline : 4; /* PangoUnderline */ guint overline : 2; /* PangoOverline */ @@ -154,13 +154,13 @@ struct _GtkTextAttributes gdouble font_scale; - gint left_margin; - gint right_margin; - gint indent; + int left_margin; + int right_margin; + int indent; - gint pixels_above_lines; - gint pixels_below_lines; - gint pixels_inside_wrap; + int pixels_above_lines; + int pixels_below_lines; + int pixels_inside_wrap; PangoTabArray *tabs; @@ -174,12 +174,12 @@ struct _GtkTextAttributes guint no_fallback: 1; guint no_breaks : 1; guint show_spaces : 3; /* PangoShowFlags */ - gint no_hyphens : 1; + int no_hyphens : 1; GdkRGBA *pg_bg_rgba; - gint letter_spacing; + int letter_spacing; gchar *font_features; }; diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 65aae142e1..37ab1fe77b 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -103,7 +103,7 @@ struct _NodeData { NodeData *next; /* Height and width of this node */ - gint height; + int height; signed int width : 24; /* boolean indicating whether the lines below this node are in need of validation. @@ -257,11 +257,11 @@ static void gtk_text_btree_rebalance (GtkTextBTree static GtkTextLine * get_last_line (GtkTextBTree *tree); static void post_insert_fixup (GtkTextBTree *tree, GtkTextLine *insert_line, - gint char_count_delta, - gint line_count_delta); + int char_count_delta, + int line_count_delta); static void gtk_text_btree_node_adjust_toggle_count (GtkTextBTreeNode *node, GtkTextTagInfo *info, - gint adjust); + int adjust); static gboolean gtk_text_btree_node_has_tag (GtkTextBTreeNode *node, GtkTextTag *tag); @@ -307,8 +307,8 @@ static NodeData * gtk_text_btree_node_ensure_data (GtkTextBTr gpointer view_id); static void gtk_text_btree_node_get_size (GtkTextBTreeNode *node, gpointer view_id, - gint *width, - gint *height); + int *width, + int *height); static GtkTextBTreeNode * gtk_text_btree_node_common_parent (GtkTextBTreeNode *node1, GtkTextBTreeNode *node2); static void get_tree_bounds (GtkTextBTree *tree, @@ -743,7 +743,7 @@ _gtk_text_btree_delete (GtkTextIter *start, GtkTextLine *end_line; GtkTextLine *line; GtkTextLine *deleted_lines = NULL; /* List of lines we've deleted */ - gint start_byte_offset; + int start_byte_offset; g_return_if_fail (start != NULL); g_return_if_fail (end != NULL); @@ -808,7 +808,7 @@ _gtk_text_btree_delete (GtkTextIter *start, curnode = curline->parent; while (seg != last_seg) { - gint char_count = 0; + int char_count = 0; if (seg == NULL) { @@ -997,8 +997,8 @@ _gtk_text_btree_delete (GtkTextIter *start, { GtkTextLineData *ld; - gint deleted_width = 0; - gint deleted_height = 0; + int deleted_width = 0; + int deleted_height = 0; line = deleted_lines; while (line) @@ -1093,7 +1093,7 @@ _gtk_text_btree_delete (GtkTextIter *start, void _gtk_text_btree_insert (GtkTextIter *iter, const gchar *text, - gint len) + int len) { GtkTextLineSegment *prev_seg; /* The segment just before the first * new segment (NULL means new segment @@ -1107,18 +1107,18 @@ _gtk_text_btree_insert (GtkTextIter *iter, GtkTextLineSegment *seg; GtkTextLine *newline; int chunk_len; /* # characters in current chunk. */ - gint sol; /* start of line */ - gint eol; /* Pointer to character just after last + int sol; /* start of line */ + int eol; /* Pointer to character just after last * one in current chunk. */ - gint delim; /* index of paragraph delimiter */ + int delim; /* index of paragraph delimiter */ int line_count_delta; /* Counts change to total number of * lines in file. */ int char_count_delta; /* change to number of chars */ GtkTextBTree *tree; - gint start_byte_index; + int start_byte_index; GtkTextLine *start_line; g_return_if_fail (text != NULL); @@ -1266,7 +1266,7 @@ insert_paintable_or_widget_segment (GtkTextIter *iter, GtkTextLineSegment *prevPtr; GtkTextLine *line; GtkTextBTree *tree; - gint start_byte_offset; + int start_byte_offset; line = _gtk_text_iter_get_text_line (iter); tree = _gtk_text_iter_get_btree (iter); @@ -1358,10 +1358,10 @@ _gtk_text_btree_unregister_child_anchor (GtkTextChildAnchor *anchor) static GtkTextLine* find_line_by_y (GtkTextBTree *tree, BTreeView *view, - GtkTextBTreeNode *node, gint y, gint *line_top, + GtkTextBTreeNode *node, int y, int *line_top, GtkTextLine *last_line) { - gint current_y = 0; + int current_y = 0; #ifdef G_ENABLE_DEBUG if (GTK_DEBUG_CHECK (TEXT)) @@ -1401,8 +1401,8 @@ find_line_by_y (GtkTextBTree *tree, BTreeView *view, while (child != NULL) { - gint width; - gint height; + int width; + int height; gtk_text_btree_node_get_size (child, view->view_id, &width, &height); @@ -1425,13 +1425,13 @@ find_line_by_y (GtkTextBTree *tree, BTreeView *view, GtkTextLine * _gtk_text_btree_find_line_by_y (GtkTextBTree *tree, gpointer view_id, - gint ypixel, - gint *line_top_out) + int ypixel, + int *line_top_out) { GtkTextLine *line; BTreeView *view; GtkTextLine *last_line; - gint line_top = 0; + int line_top = 0; view = gtk_text_btree_get_view (tree, view_id); g_return_val_if_fail (view != NULL, NULL); @@ -1447,12 +1447,12 @@ _gtk_text_btree_find_line_by_y (GtkTextBTree *tree, return line; } -static gint +static int find_line_top_in_line_list (GtkTextBTree *tree, BTreeView *view, GtkTextLine *line, GtkTextLine *target_line, - gint y) + int y) { while (line != NULL) { @@ -1474,12 +1474,12 @@ find_line_top_in_line_list (GtkTextBTree *tree, return 0; } -gint +int _gtk_text_btree_find_line_top (GtkTextBTree *tree, GtkTextLine *target_line, gpointer view_id) { - gint y = 0; + int y = 0; BTreeView *view; GSList *nodes; GSList *iter; @@ -1521,8 +1521,8 @@ _gtk_text_btree_find_line_top (GtkTextBTree *tree, while (child != NULL) { - gint width; - gint height; + int width; + int height; if (child == target_node) break; @@ -1657,8 +1657,8 @@ _gtk_text_btree_invalidate_region (GtkTextBTree *tree, void _gtk_text_btree_get_view_size (GtkTextBTree *tree, gpointer view_id, - gint *width, - gint *height) + int *width, + int *height) { g_return_if_fail (tree != NULL); g_return_if_fail (view_id != NULL); @@ -2030,8 +2030,8 @@ _gtk_text_btree_tag (const GtkTextIter *start_orig, static GtkTextLine* get_line_internal (GtkTextBTree *tree, - gint line_number, - gint *real_line_number, + int line_number, + int *real_line_number, gboolean include_last) { GtkTextBTreeNode *node; @@ -2108,25 +2108,25 @@ _gtk_text_btree_get_end_iter_line (GtkTextBTree *tree) GtkTextLine* _gtk_text_btree_get_line (GtkTextBTree *tree, - gint line_number, - gint *real_line_number) + int line_number, + int *real_line_number) { return get_line_internal (tree, line_number, real_line_number, TRUE); } GtkTextLine* _gtk_text_btree_get_line_no_last (GtkTextBTree *tree, - gint line_number, - gint *real_line_number) + int line_number, + int *real_line_number) { return get_line_internal (tree, line_number, real_line_number, FALSE); } GtkTextLine* _gtk_text_btree_get_line_at_char (GtkTextBTree *tree, - gint char_index, - gint *line_start_index, - gint *real_char_index) + int char_index, + int *line_start_index, + int *real_char_index) { GtkTextBTreeNode *node; GtkTextLine *line; @@ -2211,7 +2211,7 @@ _gtk_text_btree_get_line_at_char (GtkTextBTree *tree, * _gtk_text_attributes_fill_from_tags() */ GtkTextTag** _gtk_text_btree_get_tags (const GtkTextIter *iter, - gint *num_tags) + int *num_tags) { GtkTextBTreeNode *node; GtkTextLine *siblingline; @@ -2219,7 +2219,7 @@ _gtk_text_btree_get_tags (const GtkTextIter *iter, int src, dst, index; TagInfo tagInfo; GtkTextLine *line; - gint byte_index; + int byte_index; #define NUM_TAG_INFOS 10 @@ -2343,8 +2343,8 @@ copy_segment (GString *string, if (seg->type == >k_text_char_type) { gboolean copy = TRUE; - gint copy_bytes = 0; - gint copy_start = 0; + int copy_bytes = 0; + int copy_start = 0; /* Don't copy if we're invisible; segments are invisible/not as a whole, no need to check each char */ @@ -2360,7 +2360,7 @@ copy_segment (GString *string, if (seg == end_seg) { /* End is in the same segment; need to copy fewer bytes. */ - gint end_byte = _gtk_text_iter_get_segment_byte (end); + int end_byte = _gtk_text_iter_get_segment_byte (end); copy_bytes = end_byte - copy_start; } @@ -2452,7 +2452,7 @@ _gtk_text_btree_get_text (const GtkTextIter *start_orig, return str; } -gint +int _gtk_text_btree_line_count (GtkTextBTree *tree) { /* Subtract bogus line at the end; we return a count @@ -2460,7 +2460,7 @@ _gtk_text_btree_line_count (GtkTextBTree *tree) return tree->root_node->num_lines - 1; } -gint +int _gtk_text_btree_char_count (GtkTextBTree *tree) { /* Exclude newline in bogus last line and the @@ -2487,7 +2487,7 @@ _gtk_text_btree_char_is_invisible (const GtkTextIter *iter) int i, index; GtkTextLine *line; GtkTextBTree *tree; - gint byte_index; + int byte_index; line = _gtk_text_iter_get_text_line (iter); tree = _gtk_text_iter_get_btree (iter); @@ -2646,7 +2646,7 @@ redisplay_region (GtkTextBTree *tree, view = tree->views; while (view != NULL) { - gint start_y, end_y; + int start_y, end_y; GtkTextLineData *ld; start_y = _gtk_text_btree_find_line_top (tree, start_line, view->view_id); @@ -3183,7 +3183,7 @@ _gtk_text_btree_last_could_contain_tag (GtkTextBTree *tree, * Lines */ -gint +int _gtk_text_line_get_number (GtkTextLine *line) { GtkTextLine *line2; @@ -3231,7 +3231,7 @@ _gtk_text_line_get_number (GtkTextLine *line) static GtkTextLineSegment* find_toggle_segment_before_char (GtkTextLine *line, - gint char_in_line, + int char_in_line, GtkTextTag *tag) { GtkTextLineSegment *seg; @@ -3257,7 +3257,7 @@ find_toggle_segment_before_char (GtkTextLine *line, static GtkTextLineSegment* find_toggle_segment_before_byte (GtkTextLine *line, - gint byte_in_line, + int byte_in_line, GtkTextTag *tag) { GtkTextLineSegment *seg; @@ -3371,7 +3371,7 @@ find_toggle_outside_current_line (GtkTextLine *line, gboolean _gtk_text_line_char_has_tag (GtkTextLine *line, GtkTextBTree *tree, - gint char_in_line, + int char_in_line, GtkTextTag *tag) { GtkTextLineSegment *toggle_seg; @@ -3395,7 +3395,7 @@ _gtk_text_line_char_has_tag (GtkTextLine *line, gboolean _gtk_text_line_byte_has_tag (GtkTextLine *line, GtkTextBTree *tree, - gint byte_in_line, + int byte_in_line, GtkTextTag *tag) { GtkTextLineSegment *toggle_seg; @@ -3428,7 +3428,7 @@ ensure_end_iter_line (GtkTextBTree *tree) { if (tree->end_iter_line_stamp != tree->chars_changed_stamp) { - gint real_line; + int real_line; /* n_lines is without the magic line at the end */ g_assert (_gtk_text_btree_line_count (tree) >= 1); @@ -3724,11 +3724,11 @@ _gtk_text_line_invalidate_wrap (GtkTextLine *line, gtk_text_btree_node_invalidate_upward (line->parent, ld->view_id); } -gint +int _gtk_text_line_char_count (GtkTextLine *line) { GtkTextLineSegment *seg; - gint size; + int size; size = 0; seg = line->segments; @@ -3740,11 +3740,11 @@ _gtk_text_line_char_count (GtkTextLine *line) return size; } -gint +int _gtk_text_line_byte_count (GtkTextLine *line) { GtkTextLineSegment *seg; - gint size; + int size; size = 0; seg = line->segments; @@ -3757,13 +3757,13 @@ _gtk_text_line_byte_count (GtkTextLine *line) return size; } -gint +int _gtk_text_line_char_index (GtkTextLine *target_line) { GSList *node_stack = NULL; GtkTextBTreeNode *iter; GtkTextLine *line; - gint num_chars; + int num_chars; /* Push all our parent nodes onto a stack */ iter = target_line->parent; @@ -3844,8 +3844,8 @@ _gtk_text_line_char_index (GtkTextLine *target_line) GtkTextLineSegment* _gtk_text_line_byte_to_segment (GtkTextLine *line, - gint byte_offset, - gint *seg_offset) + int byte_offset, + int *seg_offset) { GtkTextLineSegment *seg; int offset; @@ -3870,8 +3870,8 @@ _gtk_text_line_byte_to_segment (GtkTextLine *line, GtkTextLineSegment* _gtk_text_line_char_to_segment (GtkTextLine *line, - gint char_offset, - gint *seg_offset) + int char_offset, + int *seg_offset) { GtkTextLineSegment *seg; int offset; @@ -3896,8 +3896,8 @@ _gtk_text_line_char_to_segment (GtkTextLine *line, GtkTextLineSegment* _gtk_text_line_byte_to_any_segment (GtkTextLine *line, - gint byte_offset, - gint *seg_offset) + int byte_offset, + int *seg_offset) { GtkTextLineSegment *seg; int offset; @@ -3922,8 +3922,8 @@ _gtk_text_line_byte_to_any_segment (GtkTextLine *line, GtkTextLineSegment* _gtk_text_line_char_to_any_segment (GtkTextLine *line, - gint char_offset, - gint *seg_offset) + int char_offset, + int *seg_offset) { GtkTextLineSegment *seg; int offset; @@ -3946,11 +3946,11 @@ _gtk_text_line_char_to_any_segment (GtkTextLine *line, return seg; } -gint +int _gtk_text_line_byte_to_char (GtkTextLine *line, - gint byte_offset) + int byte_offset) { - gint char_offset; + int char_offset; GtkTextLineSegment *seg; g_return_val_if_fail (line != NULL, 0); @@ -3988,9 +3988,9 @@ _gtk_text_line_byte_to_char (GtkTextLine *line, } } -gint +int _gtk_text_line_char_to_byte (GtkTextLine *line, - gint char_offset) + int char_offset) { g_warning ("FIXME not implemented"); @@ -4001,17 +4001,17 @@ _gtk_text_line_char_to_byte (GtkTextLine *line, way to merge the two functions) */ gboolean _gtk_text_line_byte_locate (GtkTextLine *line, - gint byte_offset, + int byte_offset, GtkTextLineSegment **segment, GtkTextLineSegment **any_segment, - gint *seg_byte_offset, - gint *line_byte_offset) + int *seg_byte_offset, + int *line_byte_offset) { GtkTextLineSegment *seg; GtkTextLineSegment *after_last_indexable; GtkTextLineSegment *last_indexable; - gint offset; - gint bytes_in_line; + int offset; + int bytes_in_line; g_return_val_if_fail (line != NULL, FALSE); g_return_val_if_fail (byte_offset >= 0, FALSE); @@ -4078,17 +4078,17 @@ _gtk_text_line_byte_locate (GtkTextLine *line, way to merge the two functions) */ gboolean _gtk_text_line_char_locate (GtkTextLine *line, - gint char_offset, + int char_offset, GtkTextLineSegment **segment, GtkTextLineSegment **any_segment, - gint *seg_char_offset, - gint *line_char_offset) + int *seg_char_offset, + int *line_char_offset) { GtkTextLineSegment *seg; GtkTextLineSegment *after_last_indexable; GtkTextLineSegment *last_indexable; - gint offset; - gint chars_in_line; + int offset; + int chars_in_line; g_return_val_if_fail (line != NULL, FALSE); g_return_val_if_fail (char_offset >= 0, FALSE); @@ -4153,9 +4153,9 @@ _gtk_text_line_char_locate (GtkTextLine *line, void _gtk_text_line_byte_to_char_offsets (GtkTextLine *line, - gint byte_offset, - gint *line_char_offset, - gint *seg_char_offset) + int byte_offset, + int *line_char_offset, + int *seg_char_offset) { GtkTextLineSegment *seg; int offset; @@ -4199,9 +4199,9 @@ _gtk_text_line_byte_to_char_offsets (GtkTextLine *line, void _gtk_text_line_char_to_byte_offsets (GtkTextLine *line, - gint char_offset, - gint *line_byte_offset, - gint *seg_byte_offset) + int char_offset, + int *line_byte_offset, + int *seg_byte_offset) { GtkTextLineSegment *seg; int offset; @@ -4251,7 +4251,7 @@ _gtk_text_line_char_to_byte_offsets (GtkTextLine *line, } } -static gint +static int node_compare (GtkTextBTreeNode *lhs, GtkTextBTreeNode *rhs) { @@ -4433,7 +4433,7 @@ _gtk_text_line_next_could_contain_tag (GtkTextLine *line, } else { - gint ordering; + int ordering; ordering = node_compare (line->parent, info->tag_root); @@ -4630,7 +4630,7 @@ _gtk_text_line_previous_could_contain_tag (GtkTextLine *line, } else { - gint ordering; + int ordering; ordering = node_compare (line->parent, info->tag_root); @@ -4728,9 +4728,9 @@ get_last_line (GtkTextBTree *tree) { if (tree->last_line_stamp != tree->chars_changed_stamp) { - gint n_lines; + int n_lines; GtkTextLine *line; - gint real_line; + int real_line; n_lines = _gtk_text_btree_line_count (tree); @@ -4906,7 +4906,7 @@ gtk_text_btree_node_new (void) static void gtk_text_btree_node_adjust_toggle_count (GtkTextBTreeNode *node, GtkTextTagInfo *info, - gint adjust) + int adjust) { Summary *summary; @@ -5074,11 +5074,11 @@ typedef struct _ValidateState ValidateState; struct _ValidateState { - gint remaining_pixels; + int remaining_pixels; gboolean in_validation; - gint y; - gint old_height; - gint new_height; + int y; + int old_height; + int new_height; }; static void @@ -5087,9 +5087,9 @@ gtk_text_btree_node_validate (BTreeView *view, gpointer view_id, ValidateState *state) { - gint node_valid = TRUE; - gint node_width = 0; - gint node_height = 0; + int node_valid = TRUE; + int node_width = 0; + int node_height = 0; NodeData *nd = gtk_text_btree_node_ensure_data (node, view_id); g_return_if_fail (!nd->valid); @@ -5264,10 +5264,10 @@ gtk_text_btree_node_validate (BTreeView *view, gboolean _gtk_text_btree_validate (GtkTextBTree *tree, gpointer view_id, - gint max_pixels, - gint *y, - gint *old_height, - gint *new_height) + int max_pixels, + int *y, + int *old_height, + int *new_height) { BTreeView *view; @@ -5311,12 +5311,12 @@ _gtk_text_btree_validate (GtkTextBTree *tree, static void gtk_text_btree_node_compute_view_aggregates (GtkTextBTreeNode *node, gpointer view_id, - gint *width_out, - gint *height_out, + int *width_out, + int *height_out, gboolean *valid_out) { - gint width = 0; - gint height = 0; + int width = 0; + int height = 0; gboolean valid = TRUE; if (node->level == 0) @@ -5375,8 +5375,8 @@ gtk_text_btree_node_check_valid (GtkTextBTreeNode *node, { NodeData *nd = gtk_text_btree_node_ensure_data (node, view_id); gboolean valid; - gint width; - gint height; + int width; + int height; gtk_text_btree_node_compute_view_aggregates (node, view_id, &width, &height, &valid); @@ -5612,7 +5612,7 @@ gtk_text_btree_node_remove_data (GtkTextBTreeNode *node, gpointer view_id) static void gtk_text_btree_node_get_size (GtkTextBTreeNode *node, gpointer view_id, - gint *width, gint *height) + int *width, int *height) { NodeData *nd; @@ -5984,8 +5984,8 @@ gtk_text_btree_rebalance (GtkTextBTree *tree, static void post_insert_fixup (GtkTextBTree *tree, GtkTextLine *line, - gint line_count_delta, - gint char_count_delta) + int line_count_delta, + int char_count_delta) { GtkTextBTreeNode *node; @@ -6291,7 +6291,7 @@ recompute_node_counts (GtkTextBTree *tree, GtkTextBTreeNode *node) void _gtk_change_node_toggle_count (GtkTextBTreeNode *node, GtkTextTagInfo *info, - gint delta) /* may be negative */ + int delta) /* may be negative */ { Summary *summary, *prevPtr; GtkTextBTreeNode *node2Ptr; @@ -6668,8 +6668,8 @@ gtk_text_btree_node_view_check_consistency (GtkTextBTree *tree, GtkTextBTreeNode *node, NodeData *nd) { - gint width; - gint height; + int width; + int height; gboolean valid; BTreeView *view; diff --git a/gtk/gtktextbtree.h b/gtk/gtktextbtree.h index d333216b69..d144637d31 100644 --- a/gtk/gtktextbtree.h +++ b/gtk/gtktextbtree.h @@ -67,7 +67,7 @@ void _gtk_text_btree_delete (GtkTextIter *start, GtkTextIter *end); void _gtk_text_btree_insert (GtkTextIter *iter, const gchar *text, - gint len); + int len); void _gtk_text_btree_insert_paintable (GtkTextIter *iter, GdkPaintable *texture); @@ -79,9 +79,9 @@ void _gtk_text_btree_unregister_child_anchor (GtkTextChildAnchor *anchor); /* View stuff */ GtkTextLine *_gtk_text_btree_find_line_by_y (GtkTextBTree *tree, gpointer view_id, - gint ypixel, - gint *line_top_y); -gint _gtk_text_btree_find_line_top (GtkTextBTree *tree, + int ypixel, + int *line_top_y); +int _gtk_text_btree_find_line_top (GtkTextBTree *tree, GtkTextLine *line, gpointer view_id); void _gtk_text_btree_add_view (GtkTextBTree *tree, @@ -94,16 +94,16 @@ void _gtk_text_btree_invalidate_region (GtkTextBTree *tree, gboolean cursors_only); void _gtk_text_btree_get_view_size (GtkTextBTree *tree, gpointer view_id, - gint *width, - gint *height); + int *width, + int *height); gboolean _gtk_text_btree_is_valid (GtkTextBTree *tree, gpointer view_id); gboolean _gtk_text_btree_validate (GtkTextBTree *tree, gpointer view_id, - gint max_pixels, - gint *y, - gint *old_height, - gint *new_height); + int max_pixels, + int *y, + int *old_height, + int *new_height); void _gtk_text_btree_validate_line (GtkTextBTree *tree, GtkTextLine *line, gpointer view_id); @@ -118,24 +118,24 @@ void _gtk_text_btree_tag (const GtkTextIter *start, /* "Getters" */ GtkTextLine * _gtk_text_btree_get_line (GtkTextBTree *tree, - gint line_number, - gint *real_line_number); + int line_number, + int *real_line_number); GtkTextLine * _gtk_text_btree_get_line_no_last (GtkTextBTree *tree, - gint line_number, - gint *real_line_number); + int line_number, + int *real_line_number); GtkTextLine * _gtk_text_btree_get_end_iter_line (GtkTextBTree *tree); GtkTextLine * _gtk_text_btree_get_line_at_char (GtkTextBTree *tree, - gint char_index, - gint *line_start_index, - gint *real_char_index); + int char_index, + int *line_start_index, + int *real_char_index); GtkTextTag** _gtk_text_btree_get_tags (const GtkTextIter *iter, - gint *num_tags); + int *num_tags); gchar *_gtk_text_btree_get_text (const GtkTextIter *start, const GtkTextIter *end, gboolean include_hidden, gboolean include_nonchars); -gint _gtk_text_btree_line_count (GtkTextBTree *tree); -gint _gtk_text_btree_char_count (GtkTextBTree *tree); +int _gtk_text_btree_line_count (GtkTextBTree *tree); +int _gtk_text_btree_char_count (GtkTextBTree *tree); gboolean _gtk_text_btree_char_is_invisible (const GtkTextIter *iter); @@ -143,15 +143,15 @@ gboolean _gtk_text_btree_char_is_invisible (const GtkTextIter *iter); /* Get iterators (these are implemented in gtktextiter.c) */ void _gtk_text_btree_get_iter_at_char (GtkTextBTree *tree, GtkTextIter *iter, - gint char_index); + int char_index); void _gtk_text_btree_get_iter_at_line_char (GtkTextBTree *tree, GtkTextIter *iter, - gint line_number, - gint char_index); + int line_number, + int char_index); void _gtk_text_btree_get_iter_at_line_byte (GtkTextBTree *tree, GtkTextIter *iter, - gint line_number, - gint byte_index); + int line_number, + int byte_index); gboolean _gtk_text_btree_get_iter_from_string (GtkTextBTree *tree, GtkTextIter *iter, const gchar *string); @@ -169,7 +169,7 @@ void _gtk_text_btree_get_end_iter (GtkTextBTree *tree, void _gtk_text_btree_get_iter_at_line (GtkTextBTree *tree, GtkTextIter *iter, GtkTextLine *line, - gint byte_offset); + int byte_offset); gboolean _gtk_text_btree_get_iter_at_first_toggle (GtkTextBTree *tree, GtkTextIter *iter, GtkTextTag *tag); @@ -222,9 +222,9 @@ GtkTextLine * _gtk_text_btree_last_could_contain_tag (GtkTextBTree struct _GtkTextLineData { gpointer view_id; GtkTextLineData *next; - gint height; - gint top_ink : 16; - gint bottom_ink : 16; + int height; + int top_ink : 16; + int bottom_ink : 16; signed int width : 24; guint valid : 8; /* Actually a boolean */ }; @@ -251,14 +251,14 @@ struct _GtkTextLine { }; -gint _gtk_text_line_get_number (GtkTextLine *line); +int _gtk_text_line_get_number (GtkTextLine *line); gboolean _gtk_text_line_char_has_tag (GtkTextLine *line, GtkTextBTree *tree, - gint char_in_line, + int char_in_line, GtkTextTag *tag); gboolean _gtk_text_line_byte_has_tag (GtkTextLine *line, GtkTextBTree *tree, - gint byte_in_line, + int byte_in_line, GtkTextTag *tag); gboolean _gtk_text_line_is_last (GtkTextLine *line, GtkTextBTree *tree); @@ -275,45 +275,45 @@ gpointer _gtk_text_line_get_data (GtkTextLine gpointer view_id); void _gtk_text_line_invalidate_wrap (GtkTextLine *line, GtkTextLineData *ld); -gint _gtk_text_line_char_count (GtkTextLine *line); -gint _gtk_text_line_byte_count (GtkTextLine *line); -gint _gtk_text_line_char_index (GtkTextLine *line); +int _gtk_text_line_char_count (GtkTextLine *line); +int _gtk_text_line_byte_count (GtkTextLine *line); +int _gtk_text_line_char_index (GtkTextLine *line); GtkTextLineSegment *_gtk_text_line_byte_to_segment (GtkTextLine *line, - gint byte_offset, - gint *seg_offset); + int byte_offset, + int *seg_offset); GtkTextLineSegment *_gtk_text_line_char_to_segment (GtkTextLine *line, - gint char_offset, - gint *seg_offset); + int char_offset, + int *seg_offset); gboolean _gtk_text_line_byte_locate (GtkTextLine *line, - gint byte_offset, + int byte_offset, GtkTextLineSegment **segment, GtkTextLineSegment **any_segment, - gint *seg_byte_offset, - gint *line_byte_offset); + int *seg_byte_offset, + int *line_byte_offset); gboolean _gtk_text_line_char_locate (GtkTextLine *line, - gint char_offset, + int char_offset, GtkTextLineSegment **segment, GtkTextLineSegment **any_segment, - gint *seg_char_offset, - gint *line_char_offset); + int *seg_char_offset, + int *line_char_offset); void _gtk_text_line_byte_to_char_offsets (GtkTextLine *line, - gint byte_offset, - gint *line_char_offset, - gint *seg_char_offset); + int byte_offset, + int *line_char_offset, + int *seg_char_offset); void _gtk_text_line_char_to_byte_offsets (GtkTextLine *line, - gint char_offset, - gint *line_byte_offset, - gint *seg_byte_offset); + int char_offset, + int *line_byte_offset, + int *seg_byte_offset); GtkTextLineSegment *_gtk_text_line_byte_to_any_segment (GtkTextLine *line, - gint byte_offset, - gint *seg_offset); + int byte_offset, + int *seg_offset); GtkTextLineSegment *_gtk_text_line_char_to_any_segment (GtkTextLine *line, - gint char_offset, - gint *seg_offset); -gint _gtk_text_line_byte_to_char (GtkTextLine *line, - gint byte_offset); -gint _gtk_text_line_char_to_byte (GtkTextLine *line, - gint char_offset); + int char_offset, + int *seg_offset); +int _gtk_text_line_byte_to_char (GtkTextLine *line, + int byte_offset); +int _gtk_text_line_char_to_byte (GtkTextLine *line, + int char_offset); GtkTextLine * _gtk_text_line_next_could_contain_tag (GtkTextLine *line, GtkTextBTree *tree, GtkTextTag *tag); @@ -334,7 +334,7 @@ void _gtk_toggle_segment_check_func (GtkTextLineSegment *segPtr, GtkTextLine *line); void _gtk_change_node_toggle_count (GtkTextBTreeNode *node, GtkTextTagInfo *info, - gint delta); + int delta); /* for gtktextmark.c */ void _gtk_text_btree_release_mark_segment (GtkTextBTree *tree, diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c index f50d27903a..c4f59efc4e 100644 --- a/gtk/gtktextbuffer.c +++ b/gtk/gtktextbuffer.c @@ -127,7 +127,7 @@ static void gtk_text_buffer_finalize (GObject *object); static void gtk_text_buffer_real_insert_text (GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *text, - gint len); + int len); static void gtk_text_buffer_real_insert_paintable (GtkTextBuffer *buffer, GtkTextIter *iter, GdkPaintable *paintable); @@ -1176,7 +1176,7 @@ gtk_text_buffer_get_tag_table (GtkTextBuffer *buffer) void gtk_text_buffer_set_text (GtkTextBuffer *buffer, const gchar *text, - gint len) + int len) { GtkTextIter start, end; @@ -1211,7 +1211,7 @@ static void gtk_text_buffer_real_insert_text (GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *text, - gint len) + int len) { g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer)); g_return_if_fail (iter != NULL); @@ -1231,7 +1231,7 @@ static void gtk_text_buffer_emit_insert (GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *text, - gint len) + int len) { g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer)); g_return_if_fail (iter != NULL); @@ -1268,7 +1268,7 @@ void gtk_text_buffer_insert (GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *text, - gint len) + int len) { g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer)); g_return_if_fail (iter != NULL); @@ -1290,7 +1290,7 @@ gtk_text_buffer_insert (GtkTextBuffer *buffer, void gtk_text_buffer_insert_at_cursor (GtkTextBuffer *buffer, const gchar *text, - gint len) + int len) { GtkTextIter iter; @@ -1326,7 +1326,7 @@ gboolean gtk_text_buffer_insert_interactive (GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *text, - gint len, + int len, gboolean default_editable) { g_return_val_if_fail (GTK_IS_TEXT_BUFFER (buffer), FALSE); @@ -1363,7 +1363,7 @@ gtk_text_buffer_insert_interactive (GtkTextBuffer *buffer, gboolean gtk_text_buffer_insert_interactive_at_cursor (GtkTextBuffer *buffer, const gchar *text, - gint len, + int len, gboolean default_editable) { GtkTextIter iter; @@ -1616,7 +1616,7 @@ insert_range_not_inside_self (GtkTextBuffer *buffer, while (TRUE) { - gint start_offset; + int start_offset; GtkTextIter start_iter; GSList *tags; GSList *tmp_list; @@ -1821,11 +1821,11 @@ void gtk_text_buffer_insert_with_tags (GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *text, - gint len, + int len, GtkTextTag *first_tag, ...) { - gint start_offset; + int start_offset; GtkTextIter start; va_list args; GtkTextTag *tag; @@ -1872,11 +1872,11 @@ void gtk_text_buffer_insert_with_tags_by_name (GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *text, - gint len, + int len, const gchar *first_tag_name, ...) { - gint start_offset; + int start_offset; GtkTextIter start; va_list args; const gchar *tag_name; @@ -3074,7 +3074,7 @@ gtk_text_buffer_remove_tag_by_name (GtkTextBuffer *buffer, gtk_text_buffer_emit_tag (buffer, tag, FALSE, start, end); } -static gint +static int pointer_cmp (gconstpointer a, gconstpointer b) { @@ -3220,8 +3220,8 @@ gtk_text_buffer_remove_all_tags (GtkTextBuffer *buffer, void gtk_text_buffer_get_iter_at_line_offset (GtkTextBuffer *buffer, GtkTextIter *iter, - gint line_number, - gint char_offset) + int line_number, + int char_offset) { GtkTextIter end_line_iter; @@ -3264,8 +3264,8 @@ gtk_text_buffer_get_iter_at_line_offset (GtkTextBuffer *buffer, void gtk_text_buffer_get_iter_at_line_index (GtkTextBuffer *buffer, GtkTextIter *iter, - gint line_number, - gint byte_index) + int line_number, + int byte_index) { GtkTextIter end_line_iter; @@ -3302,7 +3302,7 @@ gtk_text_buffer_get_iter_at_line_index (GtkTextBuffer *buffer, void gtk_text_buffer_get_iter_at_line (GtkTextBuffer *buffer, GtkTextIter *iter, - gint line_number) + int line_number) { g_return_if_fail (iter != NULL); g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer)); @@ -3324,7 +3324,7 @@ gtk_text_buffer_get_iter_at_line (GtkTextBuffer *buffer, void gtk_text_buffer_get_iter_at_offset (GtkTextBuffer *buffer, GtkTextIter *iter, - gint char_offset) + int char_offset) { g_return_if_fail (iter != NULL); g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer)); @@ -3475,7 +3475,7 @@ gtk_text_buffer_get_has_selection (GtkTextBuffer *buffer) * * Returns: number of lines in the buffer **/ -gint +int gtk_text_buffer_get_line_count (GtkTextBuffer *buffer) { g_return_val_if_fail (GTK_IS_TEXT_BUFFER (buffer), 0); @@ -3494,7 +3494,7 @@ gtk_text_buffer_get_line_count (GtkTextBuffer *buffer) * * Returns: number of characters in the buffer **/ -gint +int gtk_text_buffer_get_char_count (GtkTextBuffer *buffer) { g_return_val_if_fail (GTK_IS_TEXT_BUFFER (buffer), 0); @@ -3969,7 +3969,7 @@ gtk_text_buffer_backspace (GtkTextBuffer *buffer, GtkTextIter end; gboolean retval = FALSE; const PangoLogAttr *attrs; - gint offset; + int offset; gboolean backspace_deletes_character; g_return_val_if_fail (GTK_IS_TEXT_BUFFER (buffer), FALSE); @@ -4217,21 +4217,21 @@ gtk_text_buffer_end_user_action (GtkTextBuffer *buffer) typedef struct _CacheEntry CacheEntry; struct _CacheEntry { - gint line; - gint char_len; + int line; + int char_len; PangoLogAttr *attrs; }; struct _GtkTextLogAttrCache { - gint chars_changed_stamp; + int chars_changed_stamp; CacheEntry entries[ATTR_CACHE_SIZE]; }; static void free_log_attr_cache (GtkTextLogAttrCache *cache) { - gint i; + int i; for (i = 0; i < ATTR_CACHE_SIZE; i++) g_free (cache->entries[i].attrs); @@ -4242,7 +4242,7 @@ free_log_attr_cache (GtkTextLogAttrCache *cache) static void clear_log_attr_cache (GtkTextLogAttrCache *cache) { - gint i; + int i; for (i = 0; i < ATTR_CACHE_SIZE; i++) { @@ -4253,12 +4253,12 @@ clear_log_attr_cache (GtkTextLogAttrCache *cache) static PangoLogAttr* compute_log_attrs (const GtkTextIter *iter, - gint *char_lenp) + int *char_lenp) { GtkTextIter start; GtkTextIter end; gchar *paragraph; - gint char_len, byte_len; + int char_len, byte_len; PangoLogAttr *attrs = NULL; start = *iter; @@ -4295,12 +4295,12 @@ compute_log_attrs (const GtkTextIter *iter, const PangoLogAttr * _gtk_text_buffer_get_line_log_attrs (GtkTextBuffer *buffer, const GtkTextIter *anywhere_in_line, - gint *char_len) + int *char_len) { GtkTextBufferPrivate *priv; - gint line; + int line; GtkTextLogAttrCache *cache; - gint i; + int i; g_return_val_if_fail (GTK_IS_TEXT_BUFFER (buffer), NULL); g_return_val_if_fail (anywhere_in_line != NULL, NULL); @@ -4383,7 +4383,7 @@ _gtk_text_buffer_get_text_before (GtkTextBuffer *buffer, GtkTextIter *start, GtkTextIter *end) { - gint line_number; + int line_number; *start = *position; *end = *start; @@ -4492,7 +4492,7 @@ _gtk_text_buffer_get_text_at (GtkTextBuffer *buffer, GtkTextIter *start, GtkTextIter *end) { - gint line_number; + int line_number; *start = *position; *end = *start; @@ -4869,7 +4869,7 @@ gtk_text_buffer_insert_with_attributes (GtkTextBuffer *buffer, do { GtkTextTag *tag; - gint start, end; + int start, end; pango_attr_iterator_range (attr, &start, &end); @@ -4906,7 +4906,7 @@ void gtk_text_buffer_insert_markup (GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *markup, - gint len) + int len) { PangoAttrList *attributes; gchar *text; diff --git a/gtk/gtktextbuffer.h b/gtk/gtktextbuffer.h index 3ad3b483e3..bd7f272ece 100644 --- a/gtk/gtktextbuffer.h +++ b/gtk/gtktextbuffer.h @@ -105,7 +105,7 @@ struct _GtkTextBufferClass void (* insert_text) (GtkTextBuffer *buffer, GtkTextIter *pos, const gchar *new_text, - gint new_text_length); + int new_text_length); void (* insert_paintable) (GtkTextBuffer *buffer, GtkTextIter *iter, @@ -167,9 +167,9 @@ GType gtk_text_buffer_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkTextBuffer *gtk_text_buffer_new (GtkTextTagTable *table); GDK_AVAILABLE_IN_ALL -gint gtk_text_buffer_get_line_count (GtkTextBuffer *buffer); +int gtk_text_buffer_get_line_count (GtkTextBuffer *buffer); GDK_AVAILABLE_IN_ALL -gint gtk_text_buffer_get_char_count (GtkTextBuffer *buffer); +int gtk_text_buffer_get_char_count (GtkTextBuffer *buffer); GDK_AVAILABLE_IN_ALL @@ -179,29 +179,29 @@ GtkTextTagTable* gtk_text_buffer_get_tag_table (GtkTextBuffer *buffer); GDK_AVAILABLE_IN_ALL void gtk_text_buffer_set_text (GtkTextBuffer *buffer, const gchar *text, - gint len); + int len); /* Insert into the buffer */ GDK_AVAILABLE_IN_ALL void gtk_text_buffer_insert (GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *text, - gint len); + int len); GDK_AVAILABLE_IN_ALL void gtk_text_buffer_insert_at_cursor (GtkTextBuffer *buffer, const gchar *text, - gint len); + int len); GDK_AVAILABLE_IN_ALL gboolean gtk_text_buffer_insert_interactive (GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *text, - gint len, + int len, gboolean default_editable); GDK_AVAILABLE_IN_ALL gboolean gtk_text_buffer_insert_interactive_at_cursor (GtkTextBuffer *buffer, const gchar *text, - gint len, + int len, gboolean default_editable); GDK_AVAILABLE_IN_ALL @@ -220,7 +220,7 @@ GDK_AVAILABLE_IN_ALL void gtk_text_buffer_insert_with_tags (GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *text, - gint len, + int len, GtkTextTag *first_tag, ...) G_GNUC_NULL_TERMINATED; @@ -228,7 +228,7 @@ GDK_AVAILABLE_IN_ALL void gtk_text_buffer_insert_with_tags_by_name (GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *text, - gint len, + int len, const gchar *first_tag_name, ...) G_GNUC_NULL_TERMINATED; @@ -236,7 +236,7 @@ GDK_AVAILABLE_IN_ALL void gtk_text_buffer_insert_markup (GtkTextBuffer *buffer, GtkTextIter *iter, const gchar *markup, - gint len); + int len); /* Delete from the buffer */ GDK_AVAILABLE_IN_ALL @@ -371,21 +371,21 @@ GtkTextTag *gtk_text_buffer_create_tag (GtkTextBuffer *buffer, GDK_AVAILABLE_IN_ALL void gtk_text_buffer_get_iter_at_line_offset (GtkTextBuffer *buffer, GtkTextIter *iter, - gint line_number, - gint char_offset); + int line_number, + int char_offset); GDK_AVAILABLE_IN_ALL void gtk_text_buffer_get_iter_at_line_index (GtkTextBuffer *buffer, GtkTextIter *iter, - gint line_number, - gint byte_index); + int line_number, + int byte_index); GDK_AVAILABLE_IN_ALL void gtk_text_buffer_get_iter_at_offset (GtkTextBuffer *buffer, GtkTextIter *iter, - gint char_offset); + int char_offset); GDK_AVAILABLE_IN_ALL void gtk_text_buffer_get_iter_at_line (GtkTextBuffer *buffer, GtkTextIter *iter, - gint line_number); + int line_number); GDK_AVAILABLE_IN_ALL void gtk_text_buffer_get_start_iter (GtkTextBuffer *buffer, GtkTextIter *iter); diff --git a/gtk/gtktextbufferprivate.h b/gtk/gtktextbufferprivate.h index 8d8363c31a..8386950344 100644 --- a/gtk/gtktextbufferprivate.h +++ b/gtk/gtktextbufferprivate.h @@ -29,7 +29,7 @@ GtkTextBTree* _gtk_text_buffer_get_btree (GtkTextBuffer *buff const PangoLogAttr* _gtk_text_buffer_get_line_log_attrs (GtkTextBuffer *buffer, const GtkTextIter *anywhere_in_line, - gint *char_len); + int *char_len); void _gtk_text_buffer_notify_will_remove_tag (GtkTextBuffer *buffer, GtkTextTag *tag); diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c index ce6c4d8d37..0b67be7553 100644 --- a/gtk/gtktexthandle.c +++ b/gtk/gtktexthandle.c @@ -49,8 +49,8 @@ struct _GtkTextHandle GdkRectangle pointing_to; GtkBorder border; - gint dx; - gint dy; + int dx; + int dy; guint role : 2; guint dragged : 1; guint mode_visible : 1; @@ -366,7 +366,7 @@ handle_drag_update (GtkGestureDrag *gesture, { GtkTextHandle *handle = GTK_TEXT_HANDLE (widget); gdouble start_x, start_y; - gint x, y; + int x, y; gtk_gesture_drag_get_start_point (gesture, &start_x, &start_y); diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c index 237030c5f9..bd87f34bcf 100644 --- a/gtk/gtktextiter.c +++ b/gtk/gtktextiter.c @@ -59,14 +59,14 @@ struct G_GNUC_MAY_ALIAS _GtkTextRealIter If the line byte offset is valid, so is the segment byte offset; and ditto for char offsets. */ - gint line_byte_offset; - gint line_char_offset; + int line_byte_offset; + int line_char_offset; /* These two are valid if >= 0 */ - gint cached_char_index; - gint cached_line_number; + int cached_char_index; + int cached_line_number; /* Stamps to detect the buffer changing under us */ - gint chars_changed_stamp; - gint segments_changed_stamp; + int chars_changed_stamp; + int segments_changed_stamp; /* Valid if the segments_changed_stamp is up-to-date */ GtkTextLineSegment *segment; /* indexable segment we index */ GtkTextLineSegment *any_segment; /* first segment in our location, @@ -76,11 +76,11 @@ struct G_GNUC_MAY_ALIAS _GtkTextRealIter If the line byte offset is valid, so is the segment byte offset; and ditto for char offsets. */ - gint segment_byte_offset; - gint segment_char_offset; + int segment_byte_offset; + int segment_char_offset; /* padding */ - gint pad1; + int pad1; gpointer pad2; }; @@ -108,7 +108,7 @@ iter_set_common (GtkTextRealIter *iter, static void iter_set_from_byte_offset (GtkTextRealIter *iter, GtkTextLine *line, - gint byte_offset) + int byte_offset) { iter_set_common (iter, line); @@ -125,7 +125,7 @@ iter_set_from_byte_offset (GtkTextRealIter *iter, static void iter_set_from_char_offset (GtkTextRealIter *iter, GtkTextLine *line, - gint char_offset) + int char_offset) { iter_set_common (iter, line); @@ -145,7 +145,7 @@ iter_set_from_segment (GtkTextRealIter *iter, GtkTextLineSegment *segment) { GtkTextLineSegment *seg; - gint byte_offset; + int byte_offset; /* This could theoretically be optimized by computing all the iter fields in this same loop, but I'm skipping it for now. */ @@ -278,7 +278,7 @@ static GtkTextRealIter* iter_init_from_byte_offset (GtkTextIter *iter, GtkTextBTree *tree, GtkTextLine *line, - gint line_byte_offset) + int line_byte_offset) { GtkTextRealIter *real; @@ -302,7 +302,7 @@ static GtkTextRealIter* iter_init_from_char_offset (GtkTextIter *iter, GtkTextBTree *tree, GtkTextLine *line, - gint line_char_offset) + int line_char_offset) { GtkTextRealIter *real; @@ -322,14 +322,14 @@ invalidate_char_index (GtkTextRealIter *iter) } static inline void -adjust_char_index (GtkTextRealIter *iter, gint count) +adjust_char_index (GtkTextRealIter *iter, int count) { if (iter->cached_char_index >= 0) iter->cached_char_index += count; } static inline void -adjust_line_number (GtkTextRealIter *iter, gint count) +adjust_line_number (GtkTextRealIter *iter, int count) { if (iter->cached_line_number >= 0) iter->cached_line_number += count; @@ -509,7 +509,7 @@ _gtk_text_iter_get_any_segment (const GtkTextIter *iter) return real->any_segment; } -gint +int _gtk_text_iter_get_segment_byte (const GtkTextIter *iter) { GtkTextRealIter *real; @@ -528,7 +528,7 @@ _gtk_text_iter_get_segment_byte (const GtkTextIter *iter) return real->segment_byte_offset; } -gint +int _gtk_text_iter_get_segment_char (const GtkTextIter *iter) { GtkTextRealIter *real; @@ -591,7 +591,7 @@ _gtk_text_iter_get_btree (const GtkTextIter *iter) * * Returns: a character offset **/ -gint +int gtk_text_iter_get_offset (const GtkTextIter *iter) { GtkTextRealIter *real; @@ -629,7 +629,7 @@ gtk_text_iter_get_offset (const GtkTextIter *iter) * * Returns: a line number **/ -gint +int gtk_text_iter_get_line (const GtkTextIter *iter) { GtkTextRealIter *real; @@ -660,7 +660,7 @@ gtk_text_iter_get_line (const GtkTextIter *iter) * * Returns: offset from start of line **/ -gint +int gtk_text_iter_get_line_offset (const GtkTextIter *iter) { GtkTextRealIter *real; @@ -691,7 +691,7 @@ gtk_text_iter_get_line_offset (const GtkTextIter *iter) * * Returns: distance from start of line, in bytes **/ -gint +int gtk_text_iter_get_line_index (const GtkTextIter *iter) { GtkTextRealIter *real; @@ -721,11 +721,11 @@ gtk_text_iter_get_line_index (const GtkTextIter *iter) * * Returns: offset in visible characters from the start of the line **/ -gint +int gtk_text_iter_get_visible_line_offset (const GtkTextIter *iter) { GtkTextRealIter *real; - gint vis_offset; + int vis_offset; GtkTextLineSegment *seg; GtkTextIter pos; @@ -786,11 +786,11 @@ gtk_text_iter_get_visible_line_offset (const GtkTextIter *iter) * * Returns: byte index of @iter with respect to the start of the line **/ -gint +int gtk_text_iter_get_visible_line_index (const GtkTextIter *iter) { GtkTextRealIter *real; - gint vis_offset; + int vis_offset; GtkTextLineSegment *seg; GtkTextIter pos; @@ -1345,8 +1345,8 @@ GSList* gtk_text_iter_get_tags (const GtkTextIter *iter) { GtkTextTag** tags; - gint tag_count = 0; - gint i; + int tag_count = 0; + int i; GSList *retval; g_return_val_if_fail (iter != NULL, NULL); @@ -1462,7 +1462,7 @@ gtk_text_iter_get_attributes (const GtkTextIter *iter, GtkTextAttributes *values) { GtkTextTag** tags; - gint tag_count = 0; + int tag_count = 0; /* Get the tags at this spot */ tags = _gtk_text_btree_get_tags (iter, &tag_count); @@ -1674,11 +1674,11 @@ gtk_text_iter_is_start (const GtkTextIter *iter) * * Returns: number of characters in the line **/ -gint +int gtk_text_iter_get_chars_in_line (const GtkTextIter *iter) { GtkTextRealIter *real; - gint count; + int count; GtkTextLineSegment *seg; g_return_val_if_fail (iter != NULL, 0); @@ -1726,11 +1726,11 @@ gtk_text_iter_get_chars_in_line (const GtkTextIter *iter) * * Returns: number of bytes in the line **/ -gint +int gtk_text_iter_get_bytes_in_line (const GtkTextIter *iter) { GtkTextRealIter *real; - gint count; + int count; GtkTextLineSegment *seg; g_return_val_if_fail (iter != NULL, 0); @@ -1896,7 +1896,7 @@ forward_char (GtkTextRealIter *real) if (real->line_byte_offset >= 0) { - gint bytes; + int bytes; const char * start = real->segment->body.chars + real->segment_byte_offset; @@ -1936,8 +1936,8 @@ _gtk_text_iter_forward_indexable_segment (GtkTextIter *iter) GtkTextLineSegment *seg; GtkTextLineSegment *any_seg; GtkTextRealIter *real; - gint chars_skipped; - gint bytes_skipped; + int chars_skipped; + int bytes_skipped; g_return_val_if_fail (iter != NULL, FALSE); @@ -2070,8 +2070,8 @@ _gtk_text_iter_backward_indexable_segment (GtkTextIter *iter) GtkTextLineSegment *any_seg; GtkTextLineSegment *prev_seg; GtkTextLineSegment *prev_any_seg; - gint bytes_skipped; - gint chars_skipped; + int bytes_skipped; + int chars_skipped; g_return_val_if_fail (iter != NULL, FALSE); @@ -2270,7 +2270,7 @@ gtk_text_iter_backward_char (GtkTextIter *iter) * Returns: whether @iter moved and is dereferenceable **/ gboolean -gtk_text_iter_forward_chars (GtkTextIter *iter, gint count) +gtk_text_iter_forward_chars (GtkTextIter *iter, int count) { GtkTextRealIter *real; @@ -2301,8 +2301,8 @@ gtk_text_iter_forward_chars (GtkTextIter *iter, gint count) } else { - gint current_char_index; - gint new_char_index; + int current_char_index; + int new_char_index; check_invariants (iter); @@ -2342,7 +2342,7 @@ gtk_text_iter_forward_chars (GtkTextIter *iter, gint count) * **/ gboolean -gtk_text_iter_backward_chars (GtkTextIter *iter, gint count) +gtk_text_iter_backward_chars (GtkTextIter *iter, int count) { GtkTextRealIter *real; @@ -2375,7 +2375,7 @@ gtk_text_iter_backward_chars (GtkTextIter *iter, gint count) if (real->line_byte_offset >= 0) { const char *p; - gint new_byte_offset; + int new_byte_offset; /* if in the last fourth of the segment walk backwards */ if (count < real->segment_char_offset / 4) @@ -2407,8 +2407,8 @@ gtk_text_iter_backward_chars (GtkTextIter *iter, gint count) */ if (TRUE || count > MAX_LINEAR_SCAN) { - gint current_char_index; - gint new_char_index; + int current_char_index; + int new_char_index; current_char_index = gtk_text_iter_get_offset (iter); @@ -2455,7 +2455,7 @@ gtk_text_iter_backward_chars (GtkTextIter *iter, gint count) **/ gboolean gtk_text_iter_forward_text_chars (GtkTextIter *iter, - gint count) + int count) { @@ -2476,7 +2476,7 @@ gtk_text_iter_forward_text_chars (GtkTextIter *iter, **/ gboolean gtk_text_iter_backward_text_chars (GtkTextIter *iter, - gint count) + int count) { @@ -2552,7 +2552,7 @@ gtk_text_iter_backward_line (GtkTextIter *iter) GtkTextLine *new_line; GtkTextRealIter *real; gboolean offset_will_change; - gint offset; + int offset; g_return_val_if_fail (iter != NULL, FALSE); @@ -2626,7 +2626,7 @@ gtk_text_iter_backward_line (GtkTextIter *iter) * Returns: whether @iter moved and is dereferenceable **/ gboolean -gtk_text_iter_forward_lines (GtkTextIter *iter, gint count) +gtk_text_iter_forward_lines (GtkTextIter *iter, int count) { FIX_OVERFLOWS (count); @@ -2641,7 +2641,7 @@ gtk_text_iter_forward_lines (GtkTextIter *iter, gint count) } else { - gint old_line; + int old_line; if (gtk_text_iter_is_end (iter)) return FALSE; @@ -2677,7 +2677,7 @@ gtk_text_iter_forward_lines (GtkTextIter *iter, gint count) * Returns: whether @iter moved and is dereferenceable **/ gboolean -gtk_text_iter_backward_lines (GtkTextIter *iter, gint count) +gtk_text_iter_backward_lines (GtkTextIter *iter, int count) { FIX_OVERFLOWS (count); @@ -2691,7 +2691,7 @@ gtk_text_iter_backward_lines (GtkTextIter *iter, gint count) } else { - gint old_line; + int old_line; old_line = gtk_text_iter_get_line (iter); @@ -2791,7 +2791,7 @@ gtk_text_iter_backward_visible_line (GtkTextIter *iter) **/ gboolean gtk_text_iter_forward_visible_lines (GtkTextIter *iter, - gint count) + int count) { FIX_OVERFLOWS (count); @@ -2829,7 +2829,7 @@ gtk_text_iter_forward_visible_lines (GtkTextIter *iter, **/ gboolean gtk_text_iter_backward_visible_lines (GtkTextIter *iter, - gint count) + int count) { FIX_OVERFLOWS (count); @@ -2850,23 +2850,23 @@ gtk_text_iter_backward_visible_lines (GtkTextIter *iter, } typedef gboolean (* FindLogAttrFunc) (const PangoLogAttr *attrs, - gint offset, - gint len, - gint *found_offset, + int offset, + int len, + int *found_offset, gboolean already_moved_initially); typedef gboolean (* TestLogAttrFunc) (const PangoLogAttr *attrs, - gint offset, - gint min_offset, - gint len); + int offset, + int min_offset, + int len); /* Word funcs */ static gboolean find_word_end_func (const PangoLogAttr *attrs, - gint offset, - gint len, - gint *found_offset, + int offset, + int len, + int *found_offset, gboolean already_moved_initially) { if (!already_moved_initially) @@ -2889,18 +2889,18 @@ find_word_end_func (const PangoLogAttr *attrs, static gboolean is_word_end_func (const PangoLogAttr *attrs, - gint offset, - gint min_offset, - gint len) + int offset, + int min_offset, + int len) { return attrs[offset].is_word_end; } static gboolean find_word_start_func (const PangoLogAttr *attrs, - gint offset, - gint len, - gint *found_offset, + int offset, + int len, + int *found_offset, gboolean already_moved_initially) { if (!already_moved_initially) @@ -2923,18 +2923,18 @@ find_word_start_func (const PangoLogAttr *attrs, static gboolean is_word_start_func (const PangoLogAttr *attrs, - gint offset, - gint min_offset, - gint len) + int offset, + int min_offset, + int len) { return attrs[offset].is_word_start; } static gboolean inside_word_func (const PangoLogAttr *attrs, - gint offset, - gint min_offset, - gint len) + int offset, + int min_offset, + int len) { /* Find next word start or end */ while (offset >= min_offset && @@ -2951,9 +2951,9 @@ inside_word_func (const PangoLogAttr *attrs, static gboolean find_sentence_end_func (const PangoLogAttr *attrs, - gint offset, - gint len, - gint *found_offset, + int offset, + int len, + int *found_offset, gboolean already_moved_initially) { if (!already_moved_initially) @@ -2976,18 +2976,18 @@ find_sentence_end_func (const PangoLogAttr *attrs, static gboolean is_sentence_end_func (const PangoLogAttr *attrs, - gint offset, - gint min_offset, - gint len) + int offset, + int min_offset, + int len) { return attrs[offset].is_sentence_end; } static gboolean find_sentence_start_func (const PangoLogAttr *attrs, - gint offset, - gint len, - gint *found_offset, + int offset, + int len, + int *found_offset, gboolean already_moved_initially) { if (!already_moved_initially) @@ -3010,18 +3010,18 @@ find_sentence_start_func (const PangoLogAttr *attrs, static gboolean is_sentence_start_func (const PangoLogAttr *attrs, - gint offset, - gint min_offset, - gint len) + int offset, + int min_offset, + int len) { return attrs[offset].is_sentence_start; } static gboolean inside_sentence_func (const PangoLogAttr *attrs, - gint offset, - gint min_offset, - gint len) + int offset, + int min_offset, + int len) { /* Find next sentence start or end */ while (!(attrs[offset].is_sentence_start || attrs[offset].is_sentence_end)) @@ -3038,9 +3038,9 @@ static gboolean test_log_attrs (const GtkTextIter *iter, TestLogAttrFunc func) { - gint char_len; + int char_len; const PangoLogAttr *attrs; - gint offset; + int offset; g_return_val_if_fail (iter != NULL, FALSE); @@ -3057,12 +3057,12 @@ test_log_attrs (const GtkTextIter *iter, static gboolean find_line_log_attrs (const GtkTextIter *iter, FindLogAttrFunc func, - gint *found_offset, + int *found_offset, gboolean already_moved_initially) { - gint char_len; + int char_len; const PangoLogAttr *attrs; - gint offset; + int offset; g_return_val_if_fail (iter != NULL, FALSE); @@ -3092,7 +3092,7 @@ find_by_log_attrs (GtkTextIter *arg_iter, while (TRUE) { - gint offset = 0; + int offset = 0; gboolean found; found = find_line_log_attrs (&iter, func, &offset, already_moved_initially); @@ -3170,11 +3170,11 @@ find_visible_by_log_attrs (GtkTextIter *iter, } typedef gboolean (* OneStepFunc) (GtkTextIter *iter); -typedef gboolean (* MultipleStepFunc) (GtkTextIter *iter, gint count); +typedef gboolean (* MultipleStepFunc) (GtkTextIter *iter, int count); static gboolean move_multiple_steps (GtkTextIter *iter, - gint count, + int count, OneStepFunc step_forward, MultipleStepFunc n_steps_backward) { @@ -3254,7 +3254,7 @@ gtk_text_iter_backward_word_start (GtkTextIter *iter) **/ gboolean gtk_text_iter_forward_word_ends (GtkTextIter *iter, - gint count) + int count) { return move_multiple_steps (iter, count, gtk_text_iter_forward_word_end, @@ -3272,7 +3272,7 @@ gtk_text_iter_forward_word_ends (GtkTextIter *iter, **/ gboolean gtk_text_iter_backward_word_starts (GtkTextIter *iter, - gint count) + int count) { return move_multiple_steps (iter, count, gtk_text_iter_backward_word_start, @@ -3326,7 +3326,7 @@ gtk_text_iter_backward_visible_word_start (GtkTextIter *iter) **/ gboolean gtk_text_iter_forward_visible_word_ends (GtkTextIter *iter, - gint count) + int count) { return move_multiple_steps (iter, count, gtk_text_iter_forward_visible_word_end, @@ -3344,7 +3344,7 @@ gtk_text_iter_forward_visible_word_ends (GtkTextIter *iter, **/ gboolean gtk_text_iter_backward_visible_word_starts (GtkTextIter *iter, - gint count) + int count) { return move_multiple_steps (iter, count, gtk_text_iter_backward_visible_word_start, @@ -3509,7 +3509,7 @@ gtk_text_iter_backward_sentence_start (GtkTextIter *iter) **/ gboolean gtk_text_iter_forward_sentence_ends (GtkTextIter *iter, - gint count) + int count) { return move_multiple_steps (iter, count, gtk_text_iter_forward_sentence_end, @@ -3529,7 +3529,7 @@ gtk_text_iter_forward_sentence_ends (GtkTextIter *iter, **/ gboolean gtk_text_iter_backward_sentence_starts (GtkTextIter *iter, - gint count) + int count) { return move_multiple_steps (iter, count, gtk_text_iter_backward_sentence_start, @@ -3538,9 +3538,9 @@ gtk_text_iter_backward_sentence_starts (GtkTextIter *iter, static gboolean find_forward_cursor_pos_func (const PangoLogAttr *attrs, - gint offset, - gint len, - gint *found_offset, + int offset, + int len, + int *found_offset, gboolean already_moved_initially) { if (!already_moved_initially) @@ -3562,9 +3562,9 @@ find_forward_cursor_pos_func (const PangoLogAttr *attrs, static gboolean find_backward_cursor_pos_func (const PangoLogAttr *attrs, - gint offset, - gint len, - gint *found_offset, + int offset, + int len, + int *found_offset, gboolean already_moved_initially) { if (!already_moved_initially) @@ -3586,9 +3586,9 @@ find_backward_cursor_pos_func (const PangoLogAttr *attrs, static gboolean is_cursor_pos_func (const PangoLogAttr *attrs, - gint offset, - gint min_offset, - gint len) + int offset, + int min_offset, + int len) { return attrs[offset].is_cursor_position; } @@ -3642,7 +3642,7 @@ gtk_text_iter_backward_cursor_position (GtkTextIter *iter) **/ gboolean gtk_text_iter_forward_cursor_positions (GtkTextIter *iter, - gint count) + int count) { return move_multiple_steps (iter, count, gtk_text_iter_forward_cursor_position, @@ -3661,7 +3661,7 @@ gtk_text_iter_forward_cursor_positions (GtkTextIter *iter, **/ gboolean gtk_text_iter_backward_cursor_positions (GtkTextIter *iter, - gint count) + int count) { return move_multiple_steps (iter, count, gtk_text_iter_backward_cursor_position, @@ -3710,7 +3710,7 @@ gtk_text_iter_backward_visible_cursor_position (GtkTextIter *iter) **/ gboolean gtk_text_iter_forward_visible_cursor_positions (GtkTextIter *iter, - gint count) + int count) { return move_multiple_steps (iter, count, gtk_text_iter_forward_visible_cursor_position, @@ -3729,7 +3729,7 @@ gtk_text_iter_forward_visible_cursor_positions (GtkTextIter *iter, **/ gboolean gtk_text_iter_backward_visible_cursor_positions (GtkTextIter *iter, - gint count) + int count) { return move_multiple_steps (iter, count, gtk_text_iter_backward_visible_cursor_position, @@ -3766,10 +3766,10 @@ gtk_text_iter_is_cursor_position (const GtkTextIter *iter) **/ void gtk_text_iter_set_line_offset (GtkTextIter *iter, - gint char_on_line) + int char_on_line) { GtkTextRealIter *real; - gint chars_in_line; + int chars_in_line; g_return_if_fail (iter != NULL); @@ -3805,10 +3805,10 @@ gtk_text_iter_set_line_offset (GtkTextIter *iter, **/ void gtk_text_iter_set_line_index (GtkTextIter *iter, - gint byte_on_line) + int byte_on_line) { GtkTextRealIter *real; - gint bytes_in_line; + int bytes_in_line; g_return_if_fail (iter != NULL); @@ -3850,9 +3850,9 @@ gtk_text_iter_set_line_index (GtkTextIter *iter, **/ void gtk_text_iter_set_visible_line_offset (GtkTextIter *iter, - gint char_on_line) + int char_on_line) { - gint chars_seen = 0; + int chars_seen = 0; GtkTextIter pos; g_return_if_fail (iter != NULL); @@ -3891,10 +3891,10 @@ gtk_text_iter_set_visible_line_offset (GtkTextIter *iter, **/ void gtk_text_iter_set_visible_line_index (GtkTextIter *iter, - gint byte_on_line) + int byte_on_line) { GtkTextRealIter *real; - gint offset = 0; + int offset = 0; GtkTextIter pos; GtkTextLineSegment *seg; @@ -3952,10 +3952,10 @@ gtk_text_iter_set_visible_line_index (GtkTextIter *iter, **/ void gtk_text_iter_set_line (GtkTextIter *iter, - gint line_number) + int line_number) { GtkTextLine *line; - gint real_line; + int real_line; GtkTextRealIter *real; g_return_if_fail (iter != NULL); @@ -3987,12 +3987,12 @@ gtk_text_iter_set_line (GtkTextIter *iter, **/ void gtk_text_iter_set_offset (GtkTextIter *iter, - gint char_offset) + int char_offset) { GtkTextLine *line; GtkTextRealIter *real; - gint line_start; - gint real_char_index; + int line_start; + int real_char_index; g_return_if_fail (iter != NULL); @@ -4094,8 +4094,8 @@ find_paragraph_delimiter_for_line (GtkTextIter *iter) gboolean gtk_text_iter_forward_to_line_end (GtkTextIter *iter) { - gint current_offset; - gint new_offset; + int current_offset; + int new_offset; g_return_val_if_fail (iter != NULL, FALSE); @@ -4317,7 +4317,7 @@ matches_pred (GtkTextIter *iter, GtkTextCharPredicate pred, gpointer user_data) { - gint ch; + int ch; ch = gtk_text_iter_get_char (iter); @@ -4399,12 +4399,12 @@ gtk_text_iter_backward_find_char (GtkTextIter *iter, static void forward_chars_with_skipping (GtkTextIter *iter, - gint count, + int count, gboolean skip_invisible, gboolean skip_nontext, gboolean skip_decomp) { - gint i; + int i; g_return_if_fail (count >= 0); @@ -4436,7 +4436,7 @@ forward_chars_with_skipping (GtkTextIter *iter, gchar *normal; gchar *casefold; gchar buffer[6]; - gint buffer_len; + int buffer_len; buffer_len = g_unichar_to_utf8 (gtk_text_iter_get_char (iter), buffer); casefold = g_utf8_casefold (buffer, buffer_len); @@ -4455,7 +4455,7 @@ forward_chars_with_skipping (GtkTextIter *iter, static const gchar * pointer_from_offset_skipping_decomp (const gchar *str, - gint offset) + int offset) { gchar *casefold, *normal; const gchar *p, *q; @@ -4508,7 +4508,7 @@ utf8_strcasestr (const gchar *haystack, gchar *p; gchar *casefold; gchar *caseless_haystack; - gint i; + int i; g_return_val_if_fail (haystack != NULL, NULL); g_return_val_if_fail (needle != NULL, NULL); @@ -4564,7 +4564,7 @@ utf8_strrcasestr (const gchar *haystack, gchar *p; gchar *casefold; gchar *caseless_haystack; - gint i; + int i; g_return_val_if_fail (haystack != NULL, NULL); g_return_val_if_fail (needle != NULL, NULL); @@ -4624,8 +4624,8 @@ utf8_caselessnmatch (const gchar *s1, gchar *casefold; gchar *normalized_s1; gchar *normalized_s2; - gint len_s1; - gint len_s2; + int len_s1; + int len_s2; gboolean ret = FALSE; g_return_val_if_fail (s1 != NULL, FALSE); @@ -4665,7 +4665,7 @@ lines_match (const GtkTextIter *start, GtkTextIter next; gchar *line_text; const gchar *found; - gint offset; + int offset; if (*lines == NULL || **lines == '\0') { @@ -4765,8 +4765,8 @@ lines_match (const GtkTextIter *start, static gchar ** strbreakup (const char *string, const char *delimiter, - gint max_tokens, - gint *num_strings, + int max_tokens, + int *num_strings, gboolean case_insensitive) { GSList *string_list = NULL, *slist; @@ -4968,8 +4968,8 @@ vectors_equal_ignoring_trailing (gchar **vec1, while (*i1 && *i2) { - gint len1; - gint len2; + int len1; + int len2; if (!case_insensitive) { @@ -5037,7 +5037,7 @@ typedef struct _LinesWindow LinesWindow; struct _LinesWindow { - gint n_lines; + int n_lines; gchar **lines; GtkTextIter first_line_start; @@ -5051,7 +5051,7 @@ static void lines_window_init (LinesWindow *win, const GtkTextIter *start) { - gint i; + int i; GtkTextIter line_start; GtkTextIter line_end; @@ -5196,7 +5196,7 @@ gtk_text_iter_backward_search (const GtkTextIter *iter, { gchar **lines = NULL; gchar **l; - gint n_lines; + int n_lines; LinesWindow win; gboolean retval = FALSE; gboolean visible_only; @@ -5272,7 +5272,7 @@ gtk_text_iter_backward_search (const GtkTextIter *iter, case_insensitive)) { /* Match! */ - gint offset; + int offset; GtkTextIter start_tmp; GtkTextIter end_tmp; @@ -5391,7 +5391,7 @@ _gtk_text_iter_same_line (const GtkTextIter *lhs, * * Returns: -1 if @lhs is less than @rhs, 1 if @lhs is greater, 0 if they are equal **/ -gint +int gtk_text_iter_compare (const GtkTextIter *lhs, const GtkTextIter *rhs) { @@ -5410,7 +5410,7 @@ gtk_text_iter_compare (const GtkTextIter *lhs, if (real_lhs->line == real_rhs->line) { - gint left_index, right_index; + int left_index, right_index; if (real_lhs->line_byte_offset >= 0 && real_rhs->line_byte_offset >= 0) @@ -5437,7 +5437,7 @@ gtk_text_iter_compare (const GtkTextIter *lhs, } else { - gint line1, line2; + int line1, line2; line1 = gtk_text_iter_get_line (lhs); line2 = gtk_text_iter_get_line (rhs); @@ -5512,11 +5512,11 @@ gtk_text_iter_order (GtkTextIter *first, void _gtk_text_btree_get_iter_at_char (GtkTextBTree *tree, GtkTextIter *iter, - gint char_index) + int char_index) { GtkTextRealIter *real = (GtkTextRealIter*)iter; - gint real_char_index; - gint line_start; + int real_char_index; + int line_start; GtkTextLine *line; g_return_if_fail (iter != NULL); @@ -5535,12 +5535,12 @@ _gtk_text_btree_get_iter_at_char (GtkTextBTree *tree, void _gtk_text_btree_get_iter_at_line_char (GtkTextBTree *tree, GtkTextIter *iter, - gint line_number, - gint char_on_line) + int line_number, + int char_on_line) { GtkTextRealIter *real = (GtkTextRealIter*)iter; GtkTextLine *line; - gint real_line; + int real_line; g_return_if_fail (iter != NULL); g_return_if_fail (tree != NULL); @@ -5558,12 +5558,12 @@ _gtk_text_btree_get_iter_at_line_char (GtkTextBTree *tree, void _gtk_text_btree_get_iter_at_line_byte (GtkTextBTree *tree, GtkTextIter *iter, - gint line_number, - gint byte_index) + int line_number, + int byte_index) { GtkTextRealIter *real = (GtkTextRealIter*)iter; GtkTextLine *line; - gint real_line; + int real_line; g_return_if_fail (iter != NULL); g_return_if_fail (tree != NULL); @@ -5582,7 +5582,7 @@ void _gtk_text_btree_get_iter_at_line (GtkTextBTree *tree, GtkTextIter *iter, GtkTextLine *line, - gint byte_offset) + int byte_offset) { g_return_if_fail (iter != NULL); g_return_if_fail (tree != NULL); @@ -5739,7 +5739,7 @@ void _gtk_text_iter_check (const GtkTextIter *iter) { const GtkTextRealIter *real = (const GtkTextRealIter*)iter; - gint line_char_offset, line_byte_offset, seg_char_offset, seg_byte_offset; + int line_char_offset, line_byte_offset, seg_char_offset, seg_byte_offset; GtkTextLineSegment *byte_segment = NULL; GtkTextLineSegment *byte_any_segment = NULL; GtkTextLineSegment *char_segment = NULL; @@ -5866,8 +5866,8 @@ _gtk_text_iter_check (const GtkTextIter *iter) segment. */ if (char_segment->type == >k_text_char_type) { - gint byte_offset = 0; - gint char_offset = 0; + int byte_offset = 0; + int char_offset = 0; while (char_offset < seg_char_offset) { const char * start = char_segment->body.chars + byte_offset; @@ -5891,7 +5891,7 @@ _gtk_text_iter_check (const GtkTextIter *iter) if (real->cached_line_number >= 0) { - gint should_be; + int should_be; should_be = _gtk_text_line_get_number (real->line); if (real->cached_line_number != should_be) @@ -5904,7 +5904,7 @@ _gtk_text_iter_check (const GtkTextIter *iter) efficiently, not a real invariant. */ { - gint char_index; + int char_index; char_index = _gtk_text_line_char_index (real->line); char_index += real->line_char_offset; diff --git a/gtk/gtktextiter.h b/gtk/gtktextiter.h index 9655bcfe66..31bf5ea61b 100644 --- a/gtk/gtktextiter.h +++ b/gtk/gtktextiter.h @@ -74,18 +74,18 @@ struct _GtkTextIter { /*< private >*/ gpointer dummy1; gpointer dummy2; - gint dummy3; - gint dummy4; - gint dummy5; - gint dummy6; - gint dummy7; - gint dummy8; + int dummy3; + int dummy4; + int dummy5; + int dummy6; + int dummy7; + int dummy8; gpointer dummy9; gpointer dummy10; - gint dummy11; - gint dummy12; + int dummy11; + int dummy12; /* padding */ - gint dummy13; + int dummy13; gpointer dummy14; }; @@ -115,18 +115,18 @@ GType gtk_text_iter_get_type (void) G_GNUC_CONST; */ GDK_AVAILABLE_IN_ALL -gint gtk_text_iter_get_offset (const GtkTextIter *iter); +int gtk_text_iter_get_offset (const GtkTextIter *iter); GDK_AVAILABLE_IN_ALL -gint gtk_text_iter_get_line (const GtkTextIter *iter); +int gtk_text_iter_get_line (const GtkTextIter *iter); GDK_AVAILABLE_IN_ALL -gint gtk_text_iter_get_line_offset (const GtkTextIter *iter); +int gtk_text_iter_get_line_offset (const GtkTextIter *iter); GDK_AVAILABLE_IN_ALL -gint gtk_text_iter_get_line_index (const GtkTextIter *iter); +int gtk_text_iter_get_line_index (const GtkTextIter *iter); GDK_AVAILABLE_IN_ALL -gint gtk_text_iter_get_visible_line_offset (const GtkTextIter *iter); +int gtk_text_iter_get_visible_line_offset (const GtkTextIter *iter); GDK_AVAILABLE_IN_ALL -gint gtk_text_iter_get_visible_line_index (const GtkTextIter *iter); +int gtk_text_iter_get_visible_line_index (const GtkTextIter *iter); /* @@ -214,9 +214,9 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_is_cursor_position (const GtkTextIter *iter); GDK_AVAILABLE_IN_ALL -gint gtk_text_iter_get_chars_in_line (const GtkTextIter *iter); +int gtk_text_iter_get_chars_in_line (const GtkTextIter *iter); GDK_AVAILABLE_IN_ALL -gint gtk_text_iter_get_bytes_in_line (const GtkTextIter *iter); +int gtk_text_iter_get_bytes_in_line (const GtkTextIter *iter); GDK_AVAILABLE_IN_ALL PangoLanguage* gtk_text_iter_get_language (const GtkTextIter *iter); @@ -235,30 +235,30 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_char (GtkTextIter *iter); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_chars (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_chars (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_line (GtkTextIter *iter); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_line (GtkTextIter *iter); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_lines (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_lines (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_word_end (GtkTextIter *iter); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_word_start (GtkTextIter *iter); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_word_ends (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_word_starts (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_visible_line (GtkTextIter *iter); @@ -266,10 +266,10 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_visible_line (GtkTextIter *iter); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_visible_lines (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_visible_lines (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_visible_word_end (GtkTextIter *iter); @@ -277,10 +277,10 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_visible_word_start (GtkTextIter *iter); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_visible_word_ends (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_visible_word_starts (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_sentence_end (GtkTextIter *iter); @@ -288,10 +288,10 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_sentence_start (GtkTextIter *iter); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_sentence_ends (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_sentence_starts (GtkTextIter *iter, - gint count); + int count); /* cursor positions are almost equivalent to chars, but not quite; * in some languages, you can’t put the cursor between certain * chars. Also, you can’t put the cursor between \r\n at the end @@ -303,10 +303,10 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_cursor_position (GtkTextIter *iter); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_cursor_positions (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_cursor_positions (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_visible_cursor_position (GtkTextIter *iter); @@ -314,23 +314,23 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_visible_cursor_position (GtkTextIter *iter); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_visible_cursor_positions (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_visible_cursor_positions (GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL void gtk_text_iter_set_offset (GtkTextIter *iter, - gint char_offset); + int char_offset); GDK_AVAILABLE_IN_ALL void gtk_text_iter_set_line (GtkTextIter *iter, - gint line_number); + int line_number); GDK_AVAILABLE_IN_ALL void gtk_text_iter_set_line_offset (GtkTextIter *iter, - gint char_on_line); + int char_on_line); GDK_AVAILABLE_IN_ALL void gtk_text_iter_set_line_index (GtkTextIter *iter, - gint byte_on_line); + int byte_on_line); GDK_AVAILABLE_IN_ALL void gtk_text_iter_forward_to_end (GtkTextIter *iter); GDK_AVAILABLE_IN_ALL @@ -338,10 +338,10 @@ gboolean gtk_text_iter_forward_to_line_end (GtkTextIter *iter); GDK_AVAILABLE_IN_ALL void gtk_text_iter_set_visible_line_offset (GtkTextIter *iter, - gint char_on_line); + int char_on_line); GDK_AVAILABLE_IN_ALL void gtk_text_iter_set_visible_line_index (GtkTextIter *iter, - gint byte_on_line); + int byte_on_line); /* returns TRUE if a toggle was found; NULL for the tag pointer * means “any tag toggle”, otherwise the next toggle of the @@ -391,7 +391,7 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_equal (const GtkTextIter *lhs, const GtkTextIter *rhs); GDK_AVAILABLE_IN_ALL -gint gtk_text_iter_compare (const GtkTextIter *lhs, +int gtk_text_iter_compare (const GtkTextIter *lhs, const GtkTextIter *rhs); GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_in_range (const GtkTextIter *iter, diff --git a/gtk/gtktextiterprivate.h b/gtk/gtktextiterprivate.h index 8db3f56b93..e9503995f7 100644 --- a/gtk/gtktextiterprivate.h +++ b/gtk/gtktextiterprivate.h @@ -39,8 +39,8 @@ GtkTextLine * _gtk_text_iter_get_text_line (const GtkTextIter GtkTextBTree * _gtk_text_iter_get_btree (const GtkTextIter *iter); gboolean _gtk_text_iter_forward_indexable_segment (GtkTextIter *iter); gboolean _gtk_text_iter_backward_indexable_segment (GtkTextIter *iter); -gint _gtk_text_iter_get_segment_byte (const GtkTextIter *iter); -gint _gtk_text_iter_get_segment_char (const GtkTextIter *iter); +int _gtk_text_iter_get_segment_byte (const GtkTextIter *iter); +int _gtk_text_iter_get_segment_char (const GtkTextIter *iter); gboolean _gtk_text_iter_same_line (const GtkTextIter *lhs, const GtkTextIter *rhs); diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index fb2d150230..7ced6f31a7 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -119,9 +119,9 @@ static void gtk_text_layout_invalidate_cache (GtkTextLayout *layout, static void gtk_text_layout_invalidate_cursor_line (GtkTextLayout *layout, gboolean cursors_only); static void gtk_text_layout_emit_changed (GtkTextLayout *layout, - gint y, - gint old_height, - gint new_height); + int y, + int old_height, + int new_height); static void gtk_text_layout_invalidate_all (GtkTextLayout *layout); @@ -134,7 +134,7 @@ static void gtk_text_layout_after_mark_set_handler (GtkTextBuffer *buffe static void gtk_text_layout_after_buffer_insert_text (GtkTextBuffer *textbuffer, GtkTextIter *iter, gchar *str, - gint len, + int len, gpointer data); static void gtk_text_layout_after_buffer_delete_range (GtkTextBuffer *textbuffer, GtkTextIter *start, @@ -147,7 +147,7 @@ static void gtk_text_layout_before_mark_set_handler (GtkTextBuffer *buffe static void gtk_text_layout_before_buffer_insert_text (GtkTextBuffer *textbuffer, GtkTextIter *iter, gchar *str, - gint len, + int len, gpointer data); static void gtk_text_layout_before_buffer_delete_range (GtkTextBuffer *textbuffer, GtkTextIter *start, @@ -155,17 +155,17 @@ static void gtk_text_layout_before_buffer_delete_range (GtkTextBuffer *textb gpointer data); -static void gtk_text_layout_update_cursor_line (GtkTextLayout *layout); +static void gtk_text_layout_update_cursor_line (GtkTextLayout *layout); -static void line_display_index_to_iter (GtkTextLayout *layout, - GtkTextLineDisplay *display, - GtkTextIter *iter, - gint index, - gint trailing); +static void line_display_index_to_iter (GtkTextLayout *layout, + GtkTextLineDisplay*display, + GtkTextIter *iter, + int index, + int trailing); -static gint line_display_iter_to_index (GtkTextLayout *layout, - GtkTextLineDisplay *display, - const GtkTextIter *iter); +static int line_display_iter_to_index (GtkTextLayout *layout, + GtkTextLineDisplay*display, + const GtkTextIter *iter); enum { INVALIDATED, @@ -509,7 +509,7 @@ gtk_text_layout_get_buffer (GtkTextLayout *layout) } void -gtk_text_layout_set_screen_width (GtkTextLayout *layout, gint width) +gtk_text_layout_set_screen_width (GtkTextLayout *layout, int width) { g_return_if_fail (GTK_IS_TEXT_LAYOUT (layout)); g_return_if_fail (width >= 0); @@ -543,7 +543,7 @@ gtk_text_layout_set_cursor_visible (GtkTextLayout *layout, if (layout->cursor_visible != cursor_visible) { GtkTextIter iter; - gint y, height; + int y, height; layout->cursor_visible = cursor_visible; @@ -589,7 +589,7 @@ void gtk_text_layout_set_preedit_string (GtkTextLayout *layout, const gchar *preedit_string, PangoAttrList *preedit_attrs, - gint cursor_pos) + int cursor_pos) { g_return_if_fail (GTK_IS_TEXT_LAYOUT (layout)); g_return_if_fail (preedit_attrs != NULL || preedit_string == NULL); @@ -622,8 +622,8 @@ gtk_text_layout_set_preedit_string (GtkTextLayout *layout, void gtk_text_layout_get_size (GtkTextLayout *layout, - gint *width, - gint *height) + int *width, + int *height) { g_return_if_fail (GTK_IS_TEXT_LAYOUT (layout)); @@ -642,18 +642,18 @@ gtk_text_layout_invalidated (GtkTextLayout *layout) static void gtk_text_layout_emit_changed (GtkTextLayout *layout, - gint y, - gint old_height, - gint new_height) + int y, + int old_height, + int new_height) { g_signal_emit (layout, signals[CHANGED], 0, y, old_height, new_height); } void gtk_text_layout_changed (GtkTextLayout *layout, - gint y, - gint old_height, - gint new_height) + int y, + int old_height, + int new_height) { GtkTextLayoutPrivate *priv = GTK_TEXT_LAYOUT_GET_PRIVATE (layout); gtk_text_line_display_cache_invalidate_y_range (priv->cache, layout, y, old_height, FALSE); @@ -662,9 +662,9 @@ gtk_text_layout_changed (GtkTextLayout *layout, void gtk_text_layout_cursors_changed (GtkTextLayout *layout, - gint y, - gint old_height, - gint new_height) + int y, + int old_height, + int new_height) { GtkTextLayoutPrivate *priv = GTK_TEXT_LAYOUT_GET_PRIVATE (layout); gtk_text_line_display_cache_invalidate_y_range (priv->cache, layout, y, old_height, TRUE); @@ -680,9 +680,9 @@ gtk_text_layout_cursors_changed (GtkTextLayout *layout, GSList* gtk_text_layout_get_lines (GtkTextLayout *layout, /* [top_y, bottom_y) */ - gint top_y, - gint bottom_y, - gint *first_line_y) + int top_y, + int bottom_y, + int *first_line_y) { GtkTextLine *first_btree_line; GtkTextLine *last_btree_line; @@ -947,16 +947,16 @@ update_layout_size (GtkTextLayout *layout) void gtk_text_layout_validate_yrange (GtkTextLayout *layout, GtkTextIter *anchor, - gint y0, - gint y1) + int y0, + int y1) { GtkTextLine *line; GtkTextLine *first_line = NULL; GtkTextLine *last_line = NULL; - gint seen; - gint delta_height = 0; - gint first_line_y = 0; /* Quiet GCC */ - gint last_line_y = 0; /* Quiet GCC */ + int seen; + int delta_height = 0; + int first_line_y = 0; /* Quiet GCC */ + int last_line_y = 0; /* Quiet GCC */ g_return_if_fail (GTK_IS_TEXT_LAYOUT (layout)); @@ -975,8 +975,8 @@ gtk_text_layout_validate_yrange (GtkTextLayout *layout, GtkTextLineData *line_data = _gtk_text_line_get_data (line, layout); if (!line_data || !line_data->valid) { - gint old_height, new_height; - gint top_ink, bottom_ink; + int old_height, new_height; + int top_ink, bottom_ink; old_height = line_data ? line_data->height : 0; top_ink = line_data ? line_data->top_ink : 0; @@ -1016,8 +1016,8 @@ gtk_text_layout_validate_yrange (GtkTextLayout *layout, GtkTextLineData *line_data = _gtk_text_line_get_data (line, layout); if (!line_data || !line_data->valid) { - gint old_height, new_height; - gint top_ink, bottom_ink; + int old_height, new_height; + int top_ink, bottom_ink; old_height = line_data ? line_data->height : 0; top_ink = line_data ? line_data->top_ink : 0; @@ -1053,7 +1053,7 @@ gtk_text_layout_validate_yrange (GtkTextLayout *layout, */ if (first_line) { - gint line_top; + int line_top; update_layout_size (layout); @@ -1078,9 +1078,9 @@ gtk_text_layout_validate_yrange (GtkTextLayout *layout, **/ void gtk_text_layout_validate (GtkTextLayout *layout, - gint max_pixels) + int max_pixels) { - gint y, old_height, new_height; + int y, old_height, new_height; g_return_if_fail (GTK_IS_TEXT_LAYOUT (layout)); @@ -1266,8 +1266,8 @@ set_para_values (GtkTextLayout *layout, { PangoAlignment pango_align = PANGO_ALIGN_LEFT; PangoWrapMode pango_wrap = PANGO_WRAP_WORD; - gint h_margin; - gint h_padding; + int h_margin; + int h_padding; switch (base_dir) { @@ -1515,9 +1515,9 @@ gtk_text_attr_appearance_new (const GtkTextAppearance *appearance) static void add_generic_attrs (GtkTextLayout *layout, GtkTextAppearance *appearance, - gint byte_count, + int byte_count, PangoAttrList *attrs, - gint start, + int start, gboolean size_only, gboolean is_text) { @@ -1615,9 +1615,9 @@ add_generic_attrs (GtkTextLayout *layout, static void add_text_attrs (GtkTextLayout *layout, GtkTextAttributes *style, - gint byte_count, + int byte_count, PangoAttrList *attrs, - gint start, + int start, gboolean size_only, PangoAttribute **last_font_attr, PangoAttribute **last_scale_attr, @@ -1729,12 +1729,12 @@ add_paintable_attrs (GtkTextLayout *layout, GtkTextAttributes *style, GtkTextLineSegment *seg, PangoAttrList *attrs, - gint start) + int start) { PangoAttribute *attr; PangoRectangle logical_rect; GtkTextPaintable *paintable = &seg->body.paintable; - gint width, height; + int width, height; width = gdk_paintable_get_intrinsic_width (paintable->paintable); height = gdk_paintable_get_intrinsic_height (paintable->paintable); @@ -1768,11 +1768,11 @@ add_child_attrs (GtkTextLayout *layout, GtkTextAttributes *style, GtkTextLineSegment *seg, PangoAttrList *attrs, - gint start) + int start) { PangoAttribute *attr; PangoRectangle logical_rect; - gint width, height; + int width, height; GSList *tmp_list; GtkWidget *widget = NULL; @@ -1849,7 +1849,7 @@ static gboolean get_block_cursor (GtkTextLayout *layout, GtkTextLineDisplay *display, const GtkTextIter *insert_iter, - gint insert_index, + int insert_index, GdkRectangle *pos, gboolean *cursor_at_line_end) { @@ -1880,7 +1880,7 @@ static void add_cursor (GtkTextLayout *layout, GtkTextLineDisplay *display, GtkTextLineSegment *seg, - gint start) + int start) { CursorPosition cursor; @@ -1953,7 +1953,7 @@ allocate_child_widgets (GtkTextLayout *text_layout, if (run && is_shape (run)) { - gint byte_index; + int byte_index; GtkTextIter text_iter; GtkTextChildAnchor *anchor = NULL; GtkWidget **widgets = NULL; @@ -2020,7 +2020,7 @@ static void add_preedit_attrs (GtkTextLayout *layout, GtkTextAttributes *style, PangoAttrList *attrs, - gint offset, + int offset, gboolean size_only) { PangoAttrIterator *iter = pango_attr_list_get_iterator (layout->preedit_attrs); @@ -2033,7 +2033,7 @@ add_preedit_attrs (GtkTextLayout *layout, GSList *extra_attrs = NULL; GSList *tmp_list; PangoLanguage *language; - gint start, end; + int start, end; pango_attr_iterator_range (iter, &start, &end); @@ -2163,7 +2163,7 @@ gtk_text_layout_update_display_cursors (GtkTextLayout *layout, { GtkTextLineSegment *seg; GtkTextIter iter; - gint layout_byte_offset, buffer_byte_offset; + int layout_byte_offset, buffer_byte_offset; GSList *cursor_byte_offsets = NULL; GSList *cursor_segs = NULL; GSList *tmp_list1, *tmp_list2; @@ -2204,7 +2204,7 @@ gtk_text_layout_update_display_cursors (GtkTextLayout *layout, else if (seg->type == >k_text_right_mark_type || seg->type == >k_text_left_mark_type) { - gint cursor_offset = 0; + int cursor_offset = 0; /* At the insertion point, add the preedit string, if any */ @@ -2263,7 +2263,7 @@ get_tags_array_at_iter (GtkTextIter *iter) { GtkTextTag **tags; GPtrArray *array = NULL; - gint n_tags; + int n_tags; tags = _gtk_text_btree_get_tags (iter, &n_tags); @@ -2284,7 +2284,7 @@ static GPtrArray * tags_array_toggle_tag (GPtrArray *array, GtkTextTag *tag) { - gint pos; + int pos; GtkTextTag **tags; if (array == NULL) @@ -2319,9 +2319,9 @@ gtk_text_layout_create_display (GtkTextLayout *layout, GtkTextIter iter; GtkTextAttributes *style; gchar *text; - gint text_pixel_width; + int text_pixel_width; PangoAttrList *attrs; - gint text_allocated, layout_byte_offset, buffer_byte_offset; + int text_allocated, layout_byte_offset, buffer_byte_offset; PangoRectangle extents; gboolean para_values_set = FALSE; GSList *cursor_byte_offsets = NULL; @@ -2331,8 +2331,8 @@ gtk_text_layout_create_display (GtkTextLayout *layout, PangoDirection base_dir; GPtrArray *tags; gboolean initial_toggle_segments; - gint h_margin; - gint h_padding; + int h_margin; + int h_padding; PangoAttribute *last_font_attr = NULL; PangoAttribute *last_scale_attr = NULL; PangoAttribute *last_fallback_attr = NULL; @@ -2418,7 +2418,7 @@ gtk_text_layout_create_display (GtkTextLayout *layout, * if there are toggles in-between */ - gint bytes = 0; + int bytes = 0; GtkTextLineSegment *prev_seg = NULL; while (seg) @@ -2531,7 +2531,7 @@ gtk_text_layout_create_display (GtkTextLayout *layout, else if (seg->type == >k_text_right_mark_type || seg->type == >k_text_left_mark_type) { - gint cursor_offset = 0; + int cursor_offset = 0; /* At the insertion point, add the preedit string, if any */ @@ -2638,7 +2638,7 @@ gtk_text_layout_create_display (GtkTextLayout *layout, */ if (pango_layout_get_width (display->layout) < 0) { - gint excess = display->total_width - text_pixel_width; + int excess = display->total_width - text_pixel_width; switch (pango_layout_get_alignment (display->layout)) { @@ -2708,12 +2708,12 @@ gtk_text_line_display_unref (GtkTextLineDisplay *display) /* Functions to convert iter <=> index for the line of a GtkTextLineDisplay * taking into account the preedit string and invisible text if necessary. */ -static gint +static int line_display_iter_to_index (GtkTextLayout *layout, GtkTextLineDisplay *display, const GtkTextIter *iter) { - gint index; + int index; g_return_val_if_fail (_gtk_text_iter_get_text_line (iter) == display->line, 0); @@ -2732,8 +2732,8 @@ static void line_display_index_to_iter (GtkTextLayout *layout, GtkTextLineDisplay *display, GtkTextIter *iter, - gint index, - gint trailing) + int index, + int trailing) { g_return_if_fail (!_gtk_text_line_is_last (display->line, _gtk_text_buffer_get_btree (layout->buffer))); @@ -2768,9 +2768,9 @@ line_display_index_to_iter (GtkTextLayout *layout, static void get_line_at_y (GtkTextLayout *layout, - gint y, + int y, GtkTextLine **line, - gint *line_top) + int *line_top) { if (y < 0) y = 0; @@ -2804,8 +2804,8 @@ get_line_at_y (GtkTextLayout *layout, void gtk_text_layout_get_line_at_y (GtkTextLayout *layout, GtkTextIter *target_iter, - gint y, - gint *line_top) + int y, + int *line_top) { GtkTextLine *line; @@ -2819,10 +2819,10 @@ gtk_text_layout_get_line_at_y (GtkTextLayout *layout, gboolean gtk_text_layout_get_iter_at_pixel (GtkTextLayout *layout, GtkTextIter *target_iter, - gint x, - gint y) + int x, + int y) { - gint trailing; + int trailing; gboolean inside; inside = gtk_text_layout_get_iter_at_position (layout, target_iter, &trailing, x, y); @@ -2835,13 +2835,13 @@ gtk_text_layout_get_iter_at_pixel (GtkTextLayout *layout, gboolean gtk_text_layout_get_iter_at_position (GtkTextLayout *layout, GtkTextIter *target_iter, - gint *trailing, - gint x, - gint y) + int *trailing, + int x, + int y) { GtkTextLine *line; - gint byte_index; - gint line_top; + int byte_index; + int line_top; GtkTextLineDisplay *display; gboolean inside; @@ -2908,8 +2908,8 @@ gtk_text_layout_get_cursor_locations (GtkTextLayout *layout, { GtkTextLine *line; GtkTextLineDisplay *display; - gint line_top; - gint index; + int line_top; + int index; GtkTextIter insert_iter; PangoRectangle pango_strong_pos; @@ -2989,7 +2989,7 @@ _gtk_text_layout_get_block_cursor (GtkTextLayout *layout, } else { - gint index = display->insert_index; + int index = display->insert_index; if (index < 0) index = gtk_text_iter_get_line_index (&iter); @@ -3000,7 +3000,7 @@ _gtk_text_layout_get_block_cursor (GtkTextLayout *layout, if (block && pos) { - gint line_top; + int line_top; line_top = _gtk_text_btree_find_line_top (_gtk_text_buffer_get_btree (layout->buffer), line, layout); @@ -3030,8 +3030,8 @@ _gtk_text_layout_get_block_cursor (GtkTextLayout *layout, void gtk_text_layout_get_line_yrange (GtkTextLayout *layout, const GtkTextIter *iter, - gint *y, - gint *height) + int *y, + int *height) { GtkTextLine *line; @@ -3062,8 +3062,8 @@ gtk_text_layout_get_iter_location (GtkTextLayout *layout, GtkTextLine *line; GtkTextBTree *tree; GtkTextLineDisplay *display; - gint byte_index; - gint x_offset; + int byte_index; + int x_offset; g_return_if_fail (GTK_IS_TEXT_LAYOUT (layout)); g_return_if_fail (_gtk_text_iter_get_btree (iter) == _gtk_text_buffer_get_btree (layout->buffer)); @@ -3099,12 +3099,12 @@ gtk_text_layout_get_iter_location (GtkTextLayout *layout, static void find_display_line_below (GtkTextLayout *layout, GtkTextIter *iter, - gint y) + int y) { GtkTextLine *line, *next; GtkTextLine *found_line = NULL; - gint line_top; - gint found_byte = 0; + int line_top; + int found_byte = 0; line = _gtk_text_btree_find_line_by_y (_gtk_text_buffer_get_btree (layout->buffer), layout, y, &line_top); @@ -3129,7 +3129,7 @@ find_display_line_below (GtkTextLayout *layout, do { - gint first_y, last_y; + int first_y, last_y; PangoLayoutLine *layout_line = pango_layout_iter_get_line_readonly (layout_iter); found_byte = layout_line->start_index; @@ -3167,12 +3167,12 @@ find_display_line_below (GtkTextLayout *layout, static void find_display_line_above (GtkTextLayout *layout, GtkTextIter *iter, - gint y) + int y) { GtkTextLine *line; GtkTextLine *found_line = NULL; - gint line_top; - gint found_byte = 0; + int line_top; + int found_byte = 0; line = _gtk_text_btree_find_line_by_y (_gtk_text_buffer_get_btree (layout->buffer), layout, y, &line_top); if (!line) @@ -3187,7 +3187,7 @@ find_display_line_above (GtkTextLayout *layout, GtkTextLineDisplay *display = gtk_text_layout_get_line_display (layout, line, FALSE); PangoRectangle logical_rect; PangoLayoutIter *layout_iter; - gint tmp_top; + int tmp_top; layout_iter = pango_layout_get_iter (display->layout); @@ -3199,7 +3199,7 @@ find_display_line_above (GtkTextLayout *layout, do { - gint first_y, last_y; + int first_y, last_y; PangoLayoutLine *layout_line = pango_layout_iter_get_line_readonly (layout_iter); found_byte = layout_line->start_index; @@ -3248,8 +3248,8 @@ find_display_line_above (GtkTextLayout *layout, gboolean gtk_text_layout_clamp_iter_to_vrange (GtkTextLayout *layout, GtkTextIter *iter, - gint top, - gint bottom) + int top, + int bottom) { GdkRectangle iter_rect; @@ -3292,7 +3292,7 @@ gtk_text_layout_move_iter_to_previous_line (GtkTextLayout *layout, { GtkTextLine *line; GtkTextLineDisplay *display; - gint line_byte; + int line_byte; GSList *tmp_list; PangoLayoutLine *layout_line; GtkTextIter orig; @@ -3369,7 +3369,7 @@ gtk_text_layout_move_iter_to_previous_line (GtkTextLayout *layout, } else { - gint prev_offset = layout_line->start_index; + int prev_offset = layout_line->start_index; tmp_list = tmp_list->next; while (tmp_list) @@ -3412,7 +3412,7 @@ gtk_text_layout_move_iter_to_next_line (GtkTextLayout *layout, { GtkTextLine *line; GtkTextLineDisplay *display; - gint line_byte; + int line_byte; GtkTextIter orig; gboolean found = FALSE; gboolean found_after = FALSE; @@ -3485,11 +3485,11 @@ gtk_text_layout_move_iter_to_next_line (GtkTextLayout *layout, gboolean gtk_text_layout_move_iter_to_line_end (GtkTextLayout *layout, GtkTextIter *iter, - gint direction) + int direction) { GtkTextLine *line; GtkTextLineDisplay *display; - gint line_byte; + int line_byte; GSList *tmp_list; GtkTextIter orig; @@ -3548,7 +3548,7 @@ gtk_text_layout_iter_starts_line (GtkTextLayout *layout, { GtkTextLine *line; GtkTextLineDisplay *display; - gint line_byte; + int line_byte; GSList *tmp_list; g_return_val_if_fail (GTK_IS_TEXT_LAYOUT (layout), FALSE); @@ -3588,7 +3588,7 @@ void gtk_text_layout_get_iter_at_line (GtkTextLayout *layout, GtkTextIter *iter, GtkTextLine *line, - gint byte_offset) + int byte_offset) { _gtk_text_btree_get_iter_at_line (_gtk_text_buffer_get_btree (layout->buffer), iter, line, byte_offset); @@ -3607,11 +3607,11 @@ gtk_text_layout_get_iter_at_line (GtkTextLayout *layout, void gtk_text_layout_move_iter_to_x (GtkTextLayout *layout, GtkTextIter *iter, - gint x) + int x) { GtkTextLine *line; GtkTextLineDisplay *display; - gint line_byte; + int line_byte; PangoLayoutIter *layout_iter; g_return_if_fail (GTK_IS_TEXT_LAYOUT (layout)); @@ -3632,8 +3632,8 @@ gtk_text_layout_move_iter_to_x (GtkTextLayout *layout, pango_layout_iter_at_last_line (layout_iter)) { PangoRectangle logical_rect; - gint byte_index, trailing; - gint x_offset = display->x_offset * PANGO_SCALE; + int byte_index, trailing; + int x_offset = display->x_offset * PANGO_SCALE; pango_layout_iter_get_line_extents (layout_iter, NULL, &logical_rect); @@ -3675,7 +3675,7 @@ gtk_text_layout_move_iter_to_x (GtkTextLayout *layout, gboolean gtk_text_layout_move_iter_visually (GtkTextLayout *layout, GtkTextIter *iter, - gint count) + int count) { GtkTextLineDisplay *display = NULL; GtkTextIter orig; @@ -3689,8 +3689,8 @@ gtk_text_layout_move_iter_visually (GtkTextLayout *layout, while (count != 0) { GtkTextLine *line = _gtk_text_iter_get_text_line (iter); - gint line_byte; - gint extra_back = 0; + int line_byte; + int extra_back = 0; gboolean strong; int byte_count = _gtk_text_line_byte_count (line); @@ -3850,7 +3850,7 @@ static void gtk_text_layout_before_buffer_insert_text (GtkTextBuffer *textbuffer, GtkTextIter *iter, gchar *str, - gint len, + int len, gpointer data) { GtkTextLayout *layout = GTK_TEXT_LAYOUT (data); @@ -3864,7 +3864,7 @@ static void gtk_text_layout_after_buffer_insert_text (GtkTextBuffer *textbuffer, GtkTextIter *iter, gchar *str, - gint len, + int len, gpointer data) { GtkTextLayout *layout = GTK_TEXT_LAYOUT (data); @@ -4010,8 +4010,8 @@ render_para (GskPangoRenderer *crenderer, (selection_start_index == byte_offset + line->length && pango_layout_iter_at_last_line (iter))) && selection_end_index > byte_offset) { - gint *ranges = NULL; - gint n_ranges, i; + int *ranges = NULL; + int n_ranges, i; pango_layout_line_get_x_ranges (line, selection_start_index, selection_end_index, &ranges, &n_ranges); @@ -4136,7 +4136,7 @@ gtk_text_layout_snapshot (GtkTextLayout *layout, GtkTextLayoutPrivate *priv; GskPangoRenderer *crenderer; GtkStyleContext *context; - gint offset_y; + int offset_y; GtkTextIter selection_start, selection_end; gboolean have_selection; GSList *line_list; @@ -4179,8 +4179,8 @@ gtk_text_layout_snapshot (GtkTextLayout *layout, { GtkTextLine *line = tmp_list->data; GtkTextLineDisplay *line_display; - gint selection_start_index = -1; - gint selection_end_index = -1; + int selection_start_index = -1; + int selection_end_index = -1; line_display = gtk_text_layout_get_line_display (layout, line, FALSE); @@ -4191,7 +4191,7 @@ gtk_text_layout_snapshot (GtkTextLayout *layout, if (have_selection) { GtkTextIter line_start, line_end; - gint byte_count; + int byte_count; gtk_text_layout_get_iter_at_line (layout, &line_start, line, 0); line_end = line_start; @@ -4279,13 +4279,13 @@ gtk_text_layout_snapshot (GtkTextLayout *layout, gsk_pango_renderer_release (crenderer); } -gint +int gtk_text_line_display_compare (const GtkTextLineDisplay *display1, const GtkTextLineDisplay *display2, GtkTextLayout *layout) { - gint line1; - gint line2; + int line1; + int line2; line1 = _gtk_text_line_get_number (display1->line); line2 = _gtk_text_line_get_number (display2->line); diff --git a/gtk/gtktextlayoutprivate.h b/gtk/gtktextlayoutprivate.h index 2f52ae8686..e9c56f01e6 100644 --- a/gtk/gtktextlayoutprivate.h +++ b/gtk/gtktextlayoutprivate.h @@ -107,24 +107,24 @@ struct _GtkTextLayout /* width of the display area on-screen, * i.e. pixels we should wrap to fit inside. */ - gint screen_width; + int screen_width; /* width/height of the total logical area being layed out */ - gint width; - gint height; + int width; + int height; /* Pixel offsets from the left and from the top to be used when we * draw; these allow us to create left/top margins. We don't need * anything special for bottom/right margins, because those don't * affect drawing. */ - /* gint left_edge; */ - /* gint top_edge; */ + /* int left_edge; */ + /* int top_edge; */ GtkTextBuffer *buffer; - gint left_padding; - gint right_padding; + int left_padding; + int right_padding; /* Default style used if no tags override it */ GtkTextAttributes *default_style; @@ -139,7 +139,7 @@ struct _GtkTextLayout GtkTextAttributes *one_style_cache; /* Whether we are allowed to wrap right now */ - gint wrap_loop_count; + int wrap_loop_count; /* Whether to show the insertion cursor */ guint cursor_visible : 1; @@ -158,8 +158,8 @@ struct _GtkTextLayout gchar *preedit_string; PangoAttrList *preedit_attrs; - gint preedit_len; - gint preedit_cursor; + int preedit_len; + int preedit_cursor; guint overwrite_mode : 1; }; @@ -198,18 +198,18 @@ struct _GtkTextLineDisplay GtkTextDirection direction; - gint width; /* Width of layout */ - gint total_width; /* width - margins, if no width set on layout, if width set on layout, -1 */ - gint height; + int width; /* Width of layout */ + int total_width; /* width - margins, if no width set on layout, if width set on layout, -1 */ + int height; /* Amount layout is shifted from left edge - this is the left margin * plus any other factors, such as alignment or indentation. */ - gint x_offset; - gint left_margin; - gint right_margin; - gint top_margin; - gint bottom_margin; - gint insert_index; /* Byte index of insert cursor within para or -1 */ + int x_offset; + int left_margin; + int right_margin; + int top_margin; + int bottom_margin; + int insert_index; /* Byte index of insert cursor within para or -1 */ GtkTextLine *line; @@ -247,23 +247,23 @@ void gtk_text_layout_set_keyboard_direction (GtkTextLayout *la void gtk_text_layout_default_style_changed (GtkTextLayout *layout); void gtk_text_layout_set_screen_width (GtkTextLayout *layout, - gint width); + int width); void gtk_text_layout_set_preedit_string (GtkTextLayout *layout, const gchar *preedit_string, PangoAttrList *preedit_attrs, - gint cursor_pos); + int cursor_pos); void gtk_text_layout_set_cursor_visible (GtkTextLayout *layout, gboolean cursor_visible); gboolean gtk_text_layout_get_cursor_visible (GtkTextLayout *layout); void gtk_text_layout_get_size (GtkTextLayout *layout, - gint *width, - gint *height); + int *width, + int *height); GSList* gtk_text_layout_get_lines (GtkTextLayout *layout, - gint top_y, - gint bottom_y, - gint *first_line_y); + int top_y, + int bottom_y, + int *first_line_y); void gtk_text_layout_wrap_loop_start (GtkTextLayout *layout); void gtk_text_layout_wrap_loop_end (GtkTextLayout *layout); @@ -274,23 +274,23 @@ GtkTextLineDisplay* gtk_text_layout_get_line_display (GtkTextLayout *layou GtkTextLineDisplay *gtk_text_line_display_ref (GtkTextLineDisplay *display); void gtk_text_line_display_unref (GtkTextLineDisplay *display); -gint gtk_text_line_display_compare (const GtkTextLineDisplay *display1, +int gtk_text_line_display_compare (const GtkTextLineDisplay *display1, const GtkTextLineDisplay *display2, GtkTextLayout *layout); void gtk_text_layout_get_line_at_y (GtkTextLayout *layout, GtkTextIter *target_iter, - gint y, - gint *line_top); + int y, + int *line_top); gboolean gtk_text_layout_get_iter_at_pixel (GtkTextLayout *layout, GtkTextIter *iter, - gint x, - gint y); + int x, + int y); gboolean gtk_text_layout_get_iter_at_position (GtkTextLayout *layout, GtkTextIter *iter, - gint *trailing, - gint x, - gint y); + int *trailing, + int x, + int y); void gtk_text_layout_invalidate (GtkTextLayout *layout, const GtkTextIter *start, const GtkTextIter *end); @@ -304,29 +304,29 @@ void gtk_text_layout_free_line_data (GtkTextLayout *layout, gboolean gtk_text_layout_is_valid (GtkTextLayout *layout); void gtk_text_layout_validate_yrange (GtkTextLayout *layout, GtkTextIter *anchor_line, - gint y0_, - gint y1_); + int y0_, + int y1_); void gtk_text_layout_validate (GtkTextLayout *layout, - gint max_pixels); + int max_pixels); GtkTextLineData* gtk_text_layout_wrap (GtkTextLayout *layout, GtkTextLine *line, GtkTextLineData *line_data); void gtk_text_layout_changed (GtkTextLayout *layout, - gint y, - gint old_height, - gint new_height); + int y, + int old_height, + int new_height); void gtk_text_layout_cursors_changed (GtkTextLayout *layout, - gint y, - gint old_height, - gint new_height); + int y, + int old_height, + int new_height); void gtk_text_layout_get_iter_location (GtkTextLayout *layout, const GtkTextIter *iter, GdkRectangle *rect); void gtk_text_layout_get_line_yrange (GtkTextLayout *layout, const GtkTextIter *iter, - gint *y, - gint *height); + int *y, + int *height); void gtk_text_layout_get_cursor_locations (GtkTextLayout *layout, GtkTextIter *iter, GdkRectangle *strong_pos, @@ -341,22 +341,22 @@ gboolean _gtk_text_layout_get_block_cursor (GtkTextLayout *layout, GdkRectangle *pos); gboolean gtk_text_layout_clamp_iter_to_vrange (GtkTextLayout *layout, GtkTextIter *iter, - gint top, - gint bottom); + int top, + int bottom); gboolean gtk_text_layout_move_iter_to_line_end (GtkTextLayout *layout, GtkTextIter *iter, - gint direction); + int direction); gboolean gtk_text_layout_move_iter_to_previous_line (GtkTextLayout *layout, GtkTextIter *iter); gboolean gtk_text_layout_move_iter_to_next_line (GtkTextLayout *layout, GtkTextIter *iter); void gtk_text_layout_move_iter_to_x (GtkTextLayout *layout, GtkTextIter *iter, - gint x); + int x); gboolean gtk_text_layout_move_iter_visually (GtkTextLayout *layout, GtkTextIter *iter, - gint count); + int count); gboolean gtk_text_layout_iter_starts_line (GtkTextLayout *layout, const GtkTextIter *iter); @@ -364,7 +364,7 @@ gboolean gtk_text_layout_iter_starts_line (GtkTextLayout *layout void gtk_text_layout_get_iter_at_line (GtkTextLayout *layout, GtkTextIter *iter, GtkTextLine *line, - gint byte_offset); + int byte_offset); void gtk_text_child_anchor_register_child (GtkTextChildAnchor *anchor, GtkWidget *child, diff --git a/gtk/gtktextlinedisplaycache.c b/gtk/gtktextlinedisplaycache.c index b6295b6f55..fa595644ff 100644 --- a/gtk/gtktextlinedisplaycache.c +++ b/gtk/gtktextlinedisplaycache.c @@ -39,13 +39,13 @@ struct _GtkTextLineDisplayCache #if DEBUG_LINE_DISPLAY_CACHE guint log_source; - gint hits; - gint misses; - gint inval; - gint inval_cursors; - gint inval_by_line; - gint inval_by_range; - gint inval_by_y_range; + int hits; + int misses; + int inval; + int inval_cursors; + int inval_by_line; + int inval_by_range; + int inval_by_y_range; #endif }; @@ -151,7 +151,7 @@ check_disposition (GtkTextLineDisplayCache *cache, GtkTextLayout *layout) { GSequenceIter *iter; - gint last = G_MAXUINT; + int last = G_MAXUINT; g_assert (cache != NULL); g_assert (cache->sorted_by_line != NULL); @@ -571,7 +571,7 @@ gtk_text_line_display_cache_invalidate_range (GtkTextLineDisplayCache *cache, static GSequenceIter * find_iter_at_at_y (GtkTextLineDisplayCache *cache, GtkTextLayout *layout, - gint y) + int y) { GtkTextBTree *btree; GSequenceIter *left; @@ -599,8 +599,8 @@ find_iter_at_at_y (GtkTextLineDisplayCache *cache, for (;;) { GtkTextLineDisplay *display; - gint cache_y; - gint cache_height; + int cache_y; + int cache_height; if (left == right) mid = left; @@ -651,8 +651,8 @@ find_iter_at_at_y (GtkTextLineDisplayCache *cache, void gtk_text_line_display_cache_invalidate_y_range (GtkTextLineDisplayCache *cache, GtkTextLayout *layout, - gint y, - gint old_height, + int y, + int old_height, gboolean cursors_only) { GSequenceIter *iter; @@ -672,8 +672,8 @@ gtk_text_line_display_cache_invalidate_y_range (GtkTextLineDisplayCache *cache, while (!g_sequence_iter_is_end (iter)) { GtkTextLineDisplay *display; - gint cache_y; - gint cache_height; + int cache_y; + int cache_height; display = g_sequence_get (iter); iter = g_sequence_iter_next (iter); diff --git a/gtk/gtktextlinedisplaycacheprivate.h b/gtk/gtktextlinedisplaycacheprivate.h index 89adbffc2d..ffbe67bd42 100644 --- a/gtk/gtktextlinedisplaycacheprivate.h +++ b/gtk/gtktextlinedisplaycacheprivate.h @@ -50,8 +50,8 @@ void gtk_text_line_display_cache_invalidate_range (GtkText gboolean cursors_only); void gtk_text_line_display_cache_invalidate_y_range (GtkTextLineDisplayCache *cache, GtkTextLayout *layout, - gint y, - gint height, + int y, + int height, gboolean cursors_only); void gtk_text_line_display_cache_set_mru_size (GtkTextLineDisplayCache *cache, guint mru_size); diff --git a/gtk/gtktextprivate.h b/gtk/gtktextprivate.h index 7108637efe..a328a420bb 100644 --- a/gtk/gtktextprivate.h +++ b/gtk/gtktextprivate.h @@ -72,13 +72,13 @@ struct _GtkTextClass void (* activate) (GtkText *self); void (* move_cursor) (GtkText *self, GtkMovementStep step, - gint count, + int count, gboolean extend); void (* insert_at_cursor) (GtkText *self, const gchar *str); void (* delete_from_cursor) (GtkText *self, GtkDeleteType type, - gint count); + int count); void (* backspace) (GtkText *self); void (* cut_clipboard) (GtkText *self); void (* copy_clipboard) (GtkText *self); diff --git a/gtk/gtktextsegment.h b/gtk/gtktextsegment.h index ed987742ff..119f4b8169 100644 --- a/gtk/gtktextsegment.h +++ b/gtk/gtktextsegment.h @@ -48,7 +48,7 @@ typedef struct _GtkTextTagInfo GtkTextTagInfo; struct _GtkTextTagInfo { GtkTextTag *tag; GtkTextBTreeNode *tag_root; /* highest-level node containing the tag */ - gint toggle_count; /* total toggles of this tag below tag_root */ + int toggle_count; /* total toggles of this tag below tag_root */ }; /* Body of a segment that toggles a tag on or off */ @@ -64,7 +64,7 @@ struct _GtkTextToggleBody { /* Split seg at index, returning list of two new segments, and freeing seg */ typedef GtkTextLineSegment* (*GtkTextSegSplitFunc) (GtkTextLineSegment *seg, - gint index); + int index); /* Delete seg which is contained in line; if tree_gone, the tree is being * freed in its entirety, which may matter for some reason (?) diff --git a/gtk/gtktexttag.c b/gtk/gtktexttag.c index d001b68ab6..03e22e31ab 100644 --- a/gtk/gtktexttag.c +++ b/gtk/gtktexttag.c @@ -1117,7 +1117,7 @@ set_font_desc_fields (PangoFontDescription *desc, pango_font_description_set_stretch (desc, pango_font_description_get_stretch (desc)); if (to_set & PANGO_FONT_MASK_SIZE) { - gint size = pango_font_description_get_size (desc); + int size = pango_font_description_get_size (desc); if (size <= 0) { size = 10 * PANGO_SCALE; @@ -2112,9 +2112,9 @@ gtk_text_tag_get_property (GObject *object, */ typedef struct { - gint high; - gint low; - gint delta; + int high; + int low; + int delta; } DeltaData; static void @@ -2135,7 +2135,7 @@ delta_priority_foreach (GtkTextTag *tag, gpointer user_data) * * Returns: The tag’s priority. **/ -gint +int gtk_text_tag_get_priority (GtkTextTag *tag) { g_return_val_if_fail (GTK_IS_TEXT_TAG (tag), 0); @@ -2162,7 +2162,7 @@ gtk_text_tag_get_priority (GtkTextTag *tag) **/ void gtk_text_tag_set_priority (GtkTextTag *tag, - gint priority) + int priority) { GtkTextTagPrivate *priv; DeltaData dd; diff --git a/gtk/gtktexttag.h b/gtk/gtktexttag.h index a314ab766a..067aa14a99 100644 --- a/gtk/gtktexttag.h +++ b/gtk/gtktexttag.h @@ -96,10 +96,10 @@ GType gtk_text_tag_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkTextTag *gtk_text_tag_new (const gchar *name); GDK_AVAILABLE_IN_ALL -gint gtk_text_tag_get_priority (GtkTextTag *tag); +int gtk_text_tag_get_priority (GtkTextTag *tag); GDK_AVAILABLE_IN_ALL void gtk_text_tag_set_priority (GtkTextTag *tag, - gint priority); + int priority); GDK_AVAILABLE_IN_ALL void gtk_text_tag_changed (GtkTextTag *tag, gboolean size_changed); diff --git a/gtk/gtktexttagtable.c b/gtk/gtktexttagtable.c index c28621edd6..d3fd18d780 100644 --- a/gtk/gtktexttagtable.c +++ b/gtk/gtktexttagtable.c @@ -87,7 +87,7 @@ struct _GtkTextTagTablePrivate GSList *anonymous; GSList *buffers; - gint anon_count; + int anon_count; guint seen_invisible : 1; }; @@ -463,7 +463,7 @@ gtk_text_tag_table_foreach (GtkTextTagTable *table, * * Returns: number of tags in @table **/ -gint +int gtk_text_tag_table_get_size (GtkTextTagTable *table) { GtkTextTagTablePrivate *priv; diff --git a/gtk/gtktexttagtable.h b/gtk/gtktexttagtable.h index 58232e753b..e4e142c147 100644 --- a/gtk/gtktexttagtable.h +++ b/gtk/gtktexttagtable.h @@ -63,7 +63,7 @@ void gtk_text_tag_table_foreach (GtkTextTagTable *table, GtkTextTagTableForeach func, gpointer data); GDK_AVAILABLE_IN_ALL -gint gtk_text_tag_table_get_size (GtkTextTagTable *table); +int gtk_text_tag_table_get_size (GtkTextTagTable *table); G_END_DECLS diff --git a/gtk/gtktextutil.c b/gtk/gtktextutil.c index 6b95684e3c..56e43d5a39 100644 --- a/gtk/gtktextutil.c +++ b/gtk/gtktextutil.c @@ -44,10 +44,10 @@ #define ELLIPSIS_CHARACTER "\xe2\x80\xa6" static void -append_n_lines (GString *str, const gchar *text, GSList *lines, gint n_lines) +append_n_lines (GString *str, const gchar *text, GSList *lines, int n_lines) { PangoLayoutLine *line; - gint i; + int i; for (i = 0; i < n_lines; i++) { @@ -63,7 +63,7 @@ limit_layout_lines (PangoLayout *layout) const gchar *text; GString *str; GSList *lines, *elem; - gint n_lines; + int n_lines; n_lines = pango_layout_get_line_count (layout); @@ -110,7 +110,7 @@ gtk_text_util_create_drag_icon (GtkWidget *widget, PangoContext *context; PangoLayout *layout; GdkPaintable *paintable; - gint layout_width; + int layout_width; const GdkRGBA *color; g_return_val_if_fail (widget != NULL, NULL); @@ -166,7 +166,7 @@ set_attributes_from_style (GtkWidget *widget, values->font = gtk_css_style_get_pango_font (style); } -static gint +static int get_border_window_size (GtkTextView *text_view, GtkTextWindowType window_type) { @@ -188,7 +188,7 @@ gtk_text_util_create_rich_drag_icon (GtkWidget *widget, GtkAllocation allocation; GdkPaintable *paintable; GtkSnapshot *snapshot; - gint layout_width, layout_height; + int layout_width, layout_height; GtkTextBuffer *new_buffer; GtkTextLayout *layout; GtkTextAttributes *style; @@ -261,10 +261,10 @@ gtk_text_util_create_rich_drag_icon (GtkWidget *widget, return paintable; } -static gint +static int layout_get_char_width (PangoLayout *layout) { - gint width; + int width; PangoFontMetrics *metrics; const PangoFontDescription *font_desc; PangoContext *context = pango_layout_get_context (layout); @@ -293,14 +293,14 @@ layout_get_char_width (PangoLayout *layout) */ gboolean _gtk_text_util_get_block_cursor_location (PangoLayout *layout, - gint index, + int index, PangoRectangle *pos, gboolean *at_line_end) { PangoRectangle strong_pos, weak_pos; PangoLayoutLine *layout_line; gboolean rtl; - gint line_no; + int line_no; const gchar *text; g_return_val_if_fail (layout != NULL, FALSE); @@ -363,8 +363,8 @@ _gtk_text_util_get_block_cursor_location (PangoLayout *layout, { PangoLayoutIter *iter; PangoRectangle line_rect; - gint i; - gint left, right; + int i; + int left, right; const gchar *p; p = g_utf8_prev_char (text + index); diff --git a/gtk/gtktextutil.h b/gtk/gtktextutil.h index 472faf854f..7e95af3a3f 100644 --- a/gtk/gtktextutil.h +++ b/gtk/gtktextutil.h @@ -42,7 +42,7 @@ GdkPaintable * gtk_text_util_create_rich_drag_icon (GtkWidget *widget, GtkTextIter *end); gboolean _gtk_text_util_get_block_cursor_location (PangoLayout *layout, - gint index_, + int index_, PangoRectangle *rectangle, gboolean *at_line_end); diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 1f899176e2..4e1e1955bd 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -163,8 +163,8 @@ struct _GtkTextViewPrivate guint im_spot_idle; gchar *im_module; - gint dnd_x; - gint dnd_y; + int dnd_x; + int dnd_y; GtkTextHandle *text_handles[TEXT_HANDLE_N_HANDLES]; GtkWidget *selection_bubble; @@ -190,16 +190,16 @@ struct _GtkTextViewPrivate /* X offset between widget coordinates and buffer coordinates * taking left_padding in account */ - gint xoffset; + int xoffset; /* Y offset between widget coordinates and buffer coordinates * taking top_padding and top_margin in account */ - gint yoffset; + int yoffset; /* Width and height of the buffer */ - gint width; - gint height; + int width; + int height; /* The virtual cursor position is normally the same as the * actual (strong) cursor position, except in two circumstances: @@ -210,11 +210,11 @@ struct _GtkTextViewPrivate * In case a), virtual_cursor_x is preserved, but not virtual_cursor_y * In case b), both virtual_cursor_x and virtual_cursor_y are preserved. */ - gint virtual_cursor_x; /* -1 means use actual cursor position */ - gint virtual_cursor_y; /* -1 means use actual cursor position */ + int virtual_cursor_x; /* -1 means use actual cursor position */ + int virtual_cursor_y; /* -1 means use actual cursor position */ GtkTextMark *first_para_mark; /* Mark at the beginning of the first onscreen paragraph */ - gint first_para_pixels; /* Offset of top of screen in the first onscreen paragraph */ + int first_para_pixels; /* Offset of top of screen in the first onscreen paragraph */ guint64 blink_start_time; guint blink_tick; @@ -241,22 +241,22 @@ struct _GtkTextViewPrivate GdkDrag *drag; /* Default style settings */ - gint pixels_above_lines; - gint pixels_below_lines; - gint pixels_inside_wrap; + int pixels_above_lines; + int pixels_below_lines; + int pixels_inside_wrap; GtkWrapMode wrap_mode; GtkJustification justify; - gint left_margin; - gint right_margin; - gint top_margin; - gint bottom_margin; - gint left_padding; - gint right_padding; - gint top_padding; - gint bottom_padding; + int left_margin; + int right_margin; + int top_margin; + int bottom_margin; + int left_padding; + int right_padding; + int top_padding; + int bottom_padding; - gint indent; + int indent; gint64 handle_place_time; PangoTabArray *tabs; guint editable : 1; @@ -391,7 +391,7 @@ static void gtk_text_view_state_flags_changed (GtkWidget *widget, GtkStateFlags previous_state); static void gtk_text_view_click_gesture_pressed (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkTextView *text_view); @@ -445,23 +445,23 @@ static void gtk_text_view_popup_menu (GtkWidget *widget, GVariant *parameters); static void gtk_text_view_move_cursor (GtkTextView *text_view, GtkMovementStep step, - gint count, + int count, gboolean extend_selection); static void gtk_text_view_move_viewport (GtkTextView *text_view, GtkScrollStep step, - gint count); + int count); static void gtk_text_view_set_anchor (GtkTextView *text_view); static gboolean gtk_text_view_scroll_pages (GtkTextView *text_view, - gint count, + int count, gboolean extend_selection); static gboolean gtk_text_view_scroll_hpages(GtkTextView *text_view, - gint count, + int count, gboolean extend_selection); static void gtk_text_view_insert_at_cursor (GtkTextView *text_view, const gchar *str); static void gtk_text_view_delete_from_cursor (GtkTextView *text_view, GtkDeleteType type, - gint count); + int count); static void gtk_text_view_backspace (GtkTextView *text_view); static void gtk_text_view_cut_clipboard (GtkTextView *text_view); static void gtk_text_view_copy_clipboard (GtkTextView *text_view); @@ -488,8 +488,8 @@ static gboolean gtk_text_view_end_selection_drag (GtkTextView *text_v static void gtk_text_view_start_selection_dnd (GtkTextView *text_view, const GtkTextIter *iter, GdkEvent *event, - gint x, - gint y); + int x, + int y); static void gtk_text_view_check_cursor_blink (GtkTextView *text_view); static void gtk_text_view_pend_cursor_blink (GtkTextView *text_view); static void gtk_text_view_stop_cursor_blink (GtkTextView *text_view); @@ -507,8 +507,8 @@ static void gtk_text_view_preedit_changed_handler (GtkIMContext *conte static gboolean gtk_text_view_retrieve_surrounding_handler (GtkIMContext *context, GtkTextView *text_view); static gboolean gtk_text_view_delete_surrounding_handler (GtkIMContext *context, - gint offset, - gint n_chars, + int offset, + int n_chars, GtkTextView *text_view); static void gtk_text_view_mark_set_handler (GtkTextBuffer *buffer, @@ -528,11 +528,11 @@ static void gtk_text_view_buffer_notify_undo (GtkTextBuffer *buffer, GtkTextView *view); static void gtk_text_view_get_virtual_cursor_pos (GtkTextView *text_view, GtkTextIter *cursor, - gint *x, - gint *y); + int *x, + int *y); static void gtk_text_view_set_virtual_cursor_pos (GtkTextView *text_view, - gint x, - gint y); + int x, + int y); static void gtk_text_view_do_popup (GtkTextView *text_view, GdkEvent *event); @@ -566,8 +566,8 @@ static void update_node_ordering (GtkWidget *widget); static void gtk_text_view_handle_drag_started (GtkTextHandle *handle, GtkTextView *text_view); static void gtk_text_view_handle_dragged (GtkTextHandle *handle, - gint x, - gint y, + int x, + int y, GtkTextView *text_view); static void gtk_text_view_handle_drag_finished (GtkTextHandle *handle, GtkTextView *text_view); @@ -646,8 +646,8 @@ static GtkTextWindow *text_window_new (GtkWidget *widget); static void text_window_free (GtkTextWindow *win); static void text_window_size_allocate (GtkTextWindow *win, GdkRectangle *rect); -static gint text_window_get_width (GtkTextWindow *win); -static gint text_window_get_height (GtkTextWindow *win); +static int text_window_get_width (GtkTextWindow *win); +static int text_window_get_height (GtkTextWindow *win); static guint signals[LAST_SIGNAL] = { 0 }; @@ -773,7 +773,7 @@ add_move_binding (GtkWidgetClass *widget_class, guint keyval, guint modmask, GtkMovementStep step, - gint count) + int count) { g_assert ((modmask & GDK_SHIFT_MASK) == 0); @@ -2251,8 +2251,8 @@ gtk_text_view_get_cursor_locations (GtkTextView *text_view, gboolean gtk_text_view_get_iter_at_location (GtkTextView *text_view, GtkTextIter *iter, - gint x, - gint y) + int x, + int y) { g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), FALSE); g_return_val_if_fail (iter != NULL, FALSE); @@ -2289,9 +2289,9 @@ gtk_text_view_get_iter_at_location (GtkTextView *text_view, gboolean gtk_text_view_get_iter_at_position (GtkTextView *text_view, GtkTextIter *iter, - gint *trailing, - gint x, - gint y) + int *trailing, + int x, + int y) { g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), FALSE); g_return_val_if_fail (iter != NULL, FALSE); @@ -2339,8 +2339,8 @@ gtk_text_view_get_iter_location (GtkTextView *text_view, void gtk_text_view_get_line_yrange (GtkTextView *text_view, const GtkTextIter *iter, - gint *y, - gint *height) + int *y, + int *height) { g_return_if_fail (GTK_IS_TEXT_VIEW (text_view)); g_return_if_fail (gtk_text_iter_get_buffer (iter) == get_buffer (text_view)); @@ -2369,8 +2369,8 @@ gtk_text_view_get_line_yrange (GtkTextView *text_view, void gtk_text_view_get_line_at_y (GtkTextView *text_view, GtkTextIter *target_iter, - gint y, - gint *line_top) + int y, + int *line_top) { g_return_if_fail (GTK_IS_TEXT_VIEW (text_view)); @@ -2402,24 +2402,24 @@ _gtk_text_view_scroll_to_iter (GtkTextView *text_view, GtkWidget *widget; GdkRectangle cursor; - gint cursor_bottom; - gint cursor_right; + int cursor_bottom; + int cursor_right; GdkRectangle screen; GdkRectangle screen_dest; - gint screen_inner_left; - gint screen_inner_right; - gint screen_inner_top; - gint screen_inner_bottom; + int screen_inner_left; + int screen_inner_right; + int screen_inner_top; + int screen_inner_bottom; - gint border_xoffset = 0; - gint border_yoffset = 0; - gint within_margin_xoffset; - gint within_margin_yoffset; + int border_xoffset = 0; + int border_yoffset = 0; + int within_margin_xoffset; + int within_margin_yoffset; - gint buffer_bottom; - gint buffer_right; + int buffer_bottom; + int buffer_right; gboolean retval = FALSE; @@ -2519,7 +2519,7 @@ _gtk_text_view_scroll_to_iter (GtkTextView *text_view, /* Vertical scroll */ if (use_align) { - gint cursor_y_alignment_offset; + int cursor_y_alignment_offset; cursor_y_alignment_offset = (cursor.height * yalign) - (screen_dest.height * yalign); screen_dest.y = cursor.y + cursor_y_alignment_offset - within_margin_yoffset; @@ -2557,7 +2557,7 @@ _gtk_text_view_scroll_to_iter (GtkTextView *text_view, if (use_align) { - gint cursor_x_alignment_offset; + int cursor_x_alignment_offset; cursor_x_alignment_offset = (cursor.width * xalign) - (screen_dest.width * xalign); screen_dest.x = cursor.x + cursor_x_alignment_offset - within_margin_xoffset; @@ -2759,7 +2759,7 @@ static void gtk_text_view_update_adjustments (GtkTextView *text_view) { GtkTextViewPrivate *priv; - gint width = 0, height = 0; + int width = 0, height = 0; DV(g_print(">Updating adjustments ("G_STRLOC")\n")); @@ -3131,7 +3131,7 @@ gtk_text_view_get_editable (GtkTextView *text_view) **/ void gtk_text_view_set_pixels_above_lines (GtkTextView *text_view, - gint pixels_above_lines) + int pixels_above_lines) { GtkTextViewPrivate *priv; @@ -3163,7 +3163,7 @@ gtk_text_view_set_pixels_above_lines (GtkTextView *text_view, * * Returns: default number of pixels above paragraphs **/ -gint +int gtk_text_view_get_pixels_above_lines (GtkTextView *text_view) { g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0); @@ -3182,7 +3182,7 @@ gtk_text_view_get_pixels_above_lines (GtkTextView *text_view) **/ void gtk_text_view_set_pixels_below_lines (GtkTextView *text_view, - gint pixels_below_lines) + int pixels_below_lines) { GtkTextViewPrivate *priv; @@ -3215,7 +3215,7 @@ gtk_text_view_set_pixels_below_lines (GtkTextView *text_view, * * Returns: default number of blank pixels below paragraphs **/ -gint +int gtk_text_view_get_pixels_below_lines (GtkTextView *text_view) { g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0); @@ -3234,7 +3234,7 @@ gtk_text_view_get_pixels_below_lines (GtkTextView *text_view) **/ void gtk_text_view_set_pixels_inside_wrap (GtkTextView *text_view, - gint pixels_inside_wrap) + int pixels_inside_wrap) { GtkTextViewPrivate *priv; @@ -3264,7 +3264,7 @@ gtk_text_view_set_pixels_inside_wrap (GtkTextView *text_view, * * Returns: default number of pixels of blank space between wrapped lines **/ -gint +int gtk_text_view_get_pixels_inside_wrap (GtkTextView *text_view) { g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0); @@ -3335,7 +3335,7 @@ gtk_text_view_get_justification (GtkTextView *text_view) */ void gtk_text_view_set_left_margin (GtkTextView *text_view, - gint left_margin) + int left_margin) { GtkTextViewPrivate *priv = text_view->priv; @@ -3365,7 +3365,7 @@ gtk_text_view_set_left_margin (GtkTextView *text_view, * * Returns: left margin in pixels */ -gint +int gtk_text_view_get_left_margin (GtkTextView *text_view) { g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0); @@ -3386,7 +3386,7 @@ gtk_text_view_get_left_margin (GtkTextView *text_view) */ void gtk_text_view_set_right_margin (GtkTextView *text_view, - gint right_margin) + int right_margin) { GtkTextViewPrivate *priv = text_view->priv; @@ -3416,7 +3416,7 @@ gtk_text_view_set_right_margin (GtkTextView *text_view, * * Returns: right margin in pixels */ -gint +int gtk_text_view_get_right_margin (GtkTextView *text_view) { g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0); @@ -3436,7 +3436,7 @@ gtk_text_view_get_right_margin (GtkTextView *text_view) */ void gtk_text_view_set_top_margin (GtkTextView *text_view, - gint top_margin) + int top_margin) { GtkTextViewPrivate *priv = text_view->priv; @@ -3466,7 +3466,7 @@ gtk_text_view_set_top_margin (GtkTextView *text_view, * * Returns: top margin in pixels **/ -gint +int gtk_text_view_get_top_margin (GtkTextView *text_view) { g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0); @@ -3486,7 +3486,7 @@ gtk_text_view_get_top_margin (GtkTextView *text_view) */ void gtk_text_view_set_bottom_margin (GtkTextView *text_view, - gint bottom_margin) + int bottom_margin) { GtkTextViewPrivate *priv = text_view->priv; @@ -3512,7 +3512,7 @@ gtk_text_view_set_bottom_margin (GtkTextView *text_view, * * Returns: bottom margin in pixels */ -gint +int gtk_text_view_get_bottom_margin (GtkTextView *text_view) { g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0); @@ -3530,7 +3530,7 @@ gtk_text_view_get_bottom_margin (GtkTextView *text_view) **/ void gtk_text_view_set_indent (GtkTextView *text_view, - gint indent) + int indent) { GtkTextViewPrivate *priv; @@ -3562,7 +3562,7 @@ gtk_text_view_set_indent (GtkTextView *text_view, * * Returns: number of pixels of indentation **/ -gint +int gtk_text_view_get_indent (GtkTextView *text_view) { g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0); @@ -4193,7 +4193,7 @@ gtk_text_view_compute_child_allocation (GtkTextView *text_view, const AnchoredChild *vc, GtkAllocation *allocation) { - gint buffer_y; + int buffer_y; GtkTextIter iter; GtkRequisition req; @@ -4236,8 +4236,8 @@ gtk_text_view_update_child_allocation (GtkTextView *text_view, static void gtk_anchored_child_allocated (GtkTextLayout *layout, GtkWidget *child, - gint x, - gint y, + int x, + int y, gpointer data) { AnchoredChild *vc = NULL; @@ -4412,7 +4412,7 @@ gtk_text_view_size_allocate (GtkWidget *widget, { GtkTextView *text_view; GtkTextViewPrivate *priv; - gint width, height; + int width, height; GdkRectangle text_rect; GdkRectangle left_rect; GdkRectangle right_rect; @@ -4718,9 +4718,9 @@ invalidated_handler (GtkTextLayout *layout, static void changed_handler (GtkTextLayout *layout, - gint start_y, - gint old_height, - gint new_height, + int start_y, + int old_height, + int new_height, gpointer data) { GtkTextView *text_view; @@ -4950,8 +4950,8 @@ gtk_text_view_unobscure_mouse_cursor (GtkTextView *text_view) static void _text_window_to_widget_coords (GtkTextView *text_view, - gint *x, - gint *y) + int *x, + int *y) { GtkTextViewPrivate *priv = text_view->priv; @@ -4961,8 +4961,8 @@ _text_window_to_widget_coords (GtkTextView *text_view, static void _widget_to_text_surface_coords (GtkTextView *text_view, - gint *x, - gint *y) + int *x, + int *y) { GtkTextViewPrivate *priv = text_view->priv; @@ -4977,7 +4977,7 @@ gtk_text_view_set_handle_position (GtkTextView *text_view, { GtkTextViewPrivate *priv; GdkRectangle rect; - gint x, y; + int x, y; priv = text_view->priv; gtk_text_view_get_cursor_locations (text_view, iter, &rect, NULL); @@ -5017,8 +5017,8 @@ gtk_text_view_set_handle_position (GtkTextView *text_view, static void gtk_text_view_show_magnifier (GtkTextView *text_view, GtkTextIter *iter, - gint x, - gint y) + int x, + int y) { cairo_rectangle_int_t rect; GtkTextViewPrivate *priv; @@ -5060,8 +5060,8 @@ gtk_text_view_show_magnifier (GtkTextView *text_view, static void gtk_text_view_handle_dragged (GtkTextHandle *handle, - gint x, - gint y, + int x, + int y, GtkTextView *text_view) { GtkTextViewPrivate *priv; @@ -5334,12 +5334,12 @@ static gboolean get_iter_from_gesture (GtkTextView *text_view, GtkGesture *gesture, GtkTextIter *iter, - gint *x, - gint *y) + int *x, + int *y) { GdkEventSequence *sequence; GtkTextViewPrivate *priv; - gint xcoord, ycoord; + int xcoord, ycoord; gdouble px, py; priv = text_view->priv; @@ -5364,7 +5364,7 @@ get_iter_from_gesture (GtkTextView *text_view, static void gtk_text_view_click_gesture_pressed (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkTextView *text_view) @@ -5851,22 +5851,22 @@ get_middle_click_paste (GtkTextView *text_view) return paste; } -static gint +static int get_cursor_time (GtkTextView *text_view) { GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (text_view)); - gint time; + int time; g_object_get (settings, "gtk-cursor-blink-time", &time, NULL); return time; } -static gint +static int get_cursor_blink_timeout (GtkTextView *text_view) { GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (text_view)); - gint time; + int time; g_object_get (settings, "gtk-cursor-blink-timeout", &time, NULL); @@ -5949,8 +5949,8 @@ blink_cb (GtkWidget *widget, GtkTextView *text_view = GTK_TEXT_VIEW (widget); GtkTextViewPrivate *priv = text_view->priv; BlinkData *data = user_data; - gint blink_timeout; - gint blink_time; + int blink_timeout; + int blink_time; guint64 now; float phase; float alpha; @@ -6042,7 +6042,7 @@ gtk_text_view_reset_blink_time (GtkTextView *text_view) static gboolean gtk_text_view_move_iter_by_lines (GtkTextView *text_view, GtkTextIter *newplace, - gint count) + int count) { gboolean ret = TRUE; @@ -6097,14 +6097,14 @@ iter_line_is_rtl (const GtkTextIter *iter) static void gtk_text_view_move_cursor (GtkTextView *text_view, GtkMovementStep step, - gint count, + int count, gboolean extend_selection) { GtkTextViewPrivate *priv; GtkTextIter insert; GtkTextIter newplace; gboolean cancel_selection = FALSE; - gint cursor_x_pos = 0; + int cursor_x_pos = 0; GtkDirectionType leave_direction = -1; priv = text_view->priv; @@ -6356,7 +6356,7 @@ gtk_text_view_move_cursor (GtkTextView *text_view, static void gtk_text_view_move_viewport (GtkTextView *text_view, GtkScrollStep step, - gint count) + int count) { GtkAdjustment *adjustment; gdouble increment; @@ -6413,19 +6413,19 @@ gtk_text_view_set_anchor (GtkTextView *text_view) static gboolean gtk_text_view_scroll_pages (GtkTextView *text_view, - gint count, + int count, gboolean extend_selection) { GtkTextViewPrivate *priv; GtkAdjustment *adjustment; - gint cursor_x_pos, cursor_y_pos; + int cursor_x_pos, cursor_y_pos; GtkTextMark *insert_mark; GtkTextIter old_insert; GtkTextIter new_insert; GtkTextIter anchor; gdouble newval; gdouble oldval; - gint y0, y1; + int y0, y1; priv = text_view->priv; @@ -6506,18 +6506,18 @@ gtk_text_view_scroll_pages (GtkTextView *text_view, static gboolean gtk_text_view_scroll_hpages (GtkTextView *text_view, - gint count, + int count, gboolean extend_selection) { GtkTextViewPrivate *priv; GtkAdjustment *adjustment; - gint cursor_x_pos, cursor_y_pos; + int cursor_x_pos, cursor_y_pos; GtkTextMark *insert_mark; GtkTextIter old_insert; GtkTextIter new_insert; gdouble newval; gdouble oldval; - gint y, height; + int y, height; priv = text_view->priv; @@ -6631,7 +6631,7 @@ gtk_text_view_insert_at_cursor (GtkTextView *text_view, static void gtk_text_view_delete_from_cursor (GtkTextView *text_view, GtkDeleteType type, - gint count) + int count) { GtkTextViewPrivate *priv; GtkTextIter insert; @@ -7182,10 +7182,10 @@ selection_data_free (SelectionData *data) static gboolean drag_gesture_get_text_surface_coords (GtkGestureDrag *gesture, GtkTextView *text_view, - gint *start_x, - gint *start_y, - gint *x, - gint *y) + int *start_x, + int *start_y, + int *x, + int *y) { gdouble sx, sy, ox, oy; @@ -7210,7 +7210,7 @@ gtk_text_view_drag_gesture_update (GtkGestureDrag *gesture, gdouble offset_y, GtkTextView *text_view) { - gint start_x, start_y, x, y; + int start_x, start_y, x, y; GdkEventSequence *sequence; gboolean is_touchscreen; GdkEvent *event; @@ -7243,7 +7243,7 @@ gtk_text_view_drag_gesture_update (GtkGestureDrag *gesture, if (!is_touchscreen) { GtkTextIter iter; - gint buffer_x, buffer_y; + int buffer_x, buffer_y; gtk_text_view_window_to_buffer_coords (text_view, GTK_TEXT_WINDOW_TEXT, @@ -7329,7 +7329,7 @@ gtk_text_view_drag_gesture_end (GtkGestureDrag *gesture, GtkTextView *text_view) { gboolean is_touchscreen, clicked_in_selection; - gint start_x, start_y, x, y; + int start_x, start_y, x, y; GdkEventSequence *sequence; GtkTextViewPrivate *priv; GdkEvent *event; @@ -7780,8 +7780,8 @@ static void gtk_text_view_start_selection_dnd (GtkTextView *text_view, const GtkTextIter *iter, GdkEvent *event, - gint x, - gint y) + int x, + int y) { GtkWidget *widget = GTK_WIDGET (text_view); GtkTextBuffer *buffer = gtk_text_view_get_buffer (text_view); @@ -7838,7 +7838,7 @@ gtk_text_view_drag_motion (GtkDropTarget *dest, GtkTextIter newplace; GtkTextIter start; GtkTextIter end; - gint bx, by; + int bx, by; gboolean can_accept = FALSE; gtk_text_view_window_to_buffer_coords (text_view, @@ -7969,7 +7969,7 @@ static void gtk_text_view_set_hadjustment_values (GtkTextView *text_view) { GtkTextViewPrivate *priv; - gint screen_width; + int screen_width; gdouble old_value; gdouble new_value; gdouble new_upper; @@ -7998,8 +7998,8 @@ gtk_text_view_set_vadjustment_values (GtkTextView *text_view) { GtkTextViewPrivate *priv; GtkTextIter first_para; - gint screen_height; - gint y; + int screen_height; + int y; gdouble old_value; gdouble new_value; gdouble new_upper; @@ -8037,9 +8037,9 @@ gtk_text_view_value_changed (GtkAdjustment *adjustment, { GtkTextViewPrivate *priv; GtkTextIter iter; - gint line_top; - gint dx = 0; - gint dy = 0; + int line_top; + int dx = 0; + int dy = 0; priv = text_view->priv; @@ -8055,12 +8055,12 @@ gtk_text_view_value_changed (GtkAdjustment *adjustment, if (adjustment == priv->hadjustment) { - dx = priv->xoffset - (gint)gtk_adjustment_get_value (adjustment); - priv->xoffset = (gint)gtk_adjustment_get_value (adjustment) - priv->left_padding; + dx = priv->xoffset - (int)gtk_adjustment_get_value (adjustment); + priv->xoffset = (int)gtk_adjustment_get_value (adjustment) - priv->left_padding; } else if (adjustment == priv->vadjustment) { - dy = priv->yoffset - (gint)gtk_adjustment_get_value (adjustment) + priv->top_margin ; + dy = priv->yoffset - (int)gtk_adjustment_get_value (adjustment) + priv->top_margin ; priv->yoffset -= dy; if (priv->layout) @@ -8206,7 +8206,7 @@ gtk_text_view_preedit_changed_handler (GtkIMContext *context, GtkTextViewPrivate *priv; gchar *str; PangoAttrList *attrs; - gint cursor_pos; + int cursor_pos; GtkTextIter iter; priv = text_view->priv; @@ -8246,7 +8246,7 @@ gtk_text_view_retrieve_surrounding_handler (GtkIMContext *context, { GtkTextIter start; GtkTextIter end; - gint pos; + int pos; gchar *text; gtk_text_buffer_get_iter_at_mark (text_view->priv->buffer, &start, @@ -8266,8 +8266,8 @@ gtk_text_view_retrieve_surrounding_handler (GtkIMContext *context, static gboolean gtk_text_view_delete_surrounding_handler (GtkIMContext *context, - gint offset, - gint n_chars, + int offset, + int n_chars, GtkTextView *text_view) { GtkTextViewPrivate *priv; @@ -8324,8 +8324,8 @@ gtk_text_view_mark_set_handler (GtkTextBuffer *buffer, static void gtk_text_view_get_virtual_cursor_pos (GtkTextView *text_view, GtkTextIter *cursor, - gint *x, - gint *y) + int *x, + int *y) { GtkTextViewPrivate *priv; GtkTextIter insert; @@ -8362,8 +8362,8 @@ gtk_text_view_get_virtual_cursor_pos (GtkTextView *text_view, static void gtk_text_view_set_virtual_cursor_pos (GtkTextView *text_view, - gint x, - gint y) + int x, + int y) { GdkRectangle pos; @@ -8695,7 +8695,7 @@ gtk_text_view_get_selection_rect (GtkTextView *text_view, cairo_rectangle_int_t rect_cursor, rect_bound; GtkTextIter cursor, bound; GtkTextBuffer *buffer; - gint x1, y1, x2, y2; + int x1, y1, x2, y2; buffer = get_buffer (text_view); gtk_text_buffer_get_iter_at_mark (buffer, &cursor, @@ -8982,13 +8982,13 @@ text_window_size_allocate (GtkTextWindow *win, win->allocation = *rect; } -static gint +static int text_window_get_width (GtkTextWindow *win) { return win->allocation.width; } -static gint +static int text_window_get_height (GtkTextWindow *win) { return win->allocation.height; @@ -9014,10 +9014,10 @@ text_window_get_height (GtkTextWindow *win) void gtk_text_view_buffer_to_window_coords (GtkTextView *text_view, GtkTextWindowType win, - gint buffer_x, - gint buffer_y, - gint *window_x, - gint *window_y) + int buffer_x, + int buffer_y, + int *window_x, + int *window_y) { GtkTextViewPrivate *priv = text_view->priv; @@ -9081,10 +9081,10 @@ gtk_text_view_buffer_to_window_coords (GtkTextView *text_view, void gtk_text_view_window_to_buffer_coords (GtkTextView *text_view, GtkTextWindowType win, - gint window_x, - gint window_y, - gint *buffer_x, - gint *buffer_y) + int window_x, + int window_y, + int *buffer_x, + int *buffer_y) { GtkTextViewPrivate *priv = text_view->priv; @@ -9248,8 +9248,8 @@ ensure_child (GtkTextView *text_view, void gtk_text_view_add_overlay (GtkTextView *text_view, GtkWidget *child, - gint xpos, - gint ypos) + int xpos, + int ypos) { g_return_if_fail (GTK_IS_TEXT_VIEW (text_view)); g_return_if_fail (GTK_IS_WIDGET (child)); @@ -9275,8 +9275,8 @@ gtk_text_view_add_overlay (GtkTextView *text_view, void gtk_text_view_move_overlay (GtkTextView *text_view, GtkWidget *child, - gint xpos, - gint ypos) + int xpos, + int ypos) { g_return_if_fail (GTK_IS_TEXT_VIEW (text_view)); g_return_if_fail (GTK_IS_WIDGET (child)); @@ -9449,7 +9449,7 @@ gtk_text_view_starts_display_line (GtkTextView *text_view, gboolean gtk_text_view_move_visually (GtkTextView *text_view, GtkTextIter *iter, - gint count) + int count) { g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), FALSE); g_return_val_if_fail (iter != NULL, FALSE); diff --git a/gtk/gtktextview.h b/gtk/gtktextview.h index 7260d4efab..c1b282a4ae 100644 --- a/gtk/gtktextview.h +++ b/gtk/gtktextview.h @@ -156,14 +156,14 @@ struct _GtkTextViewClass void (* move_cursor) (GtkTextView *text_view, GtkMovementStep step, - gint count, + int count, gboolean extend_selection); void (* set_anchor) (GtkTextView *text_view); void (* insert_at_cursor) (GtkTextView *text_view, const gchar *str); void (* delete_from_cursor) (GtkTextView *text_view, GtkDeleteType type, - gint count); + int count); void (* backspace) (GtkTextView *text_view); void (* cut_clipboard) (GtkTextView *text_view); void (* copy_clipboard) (GtkTextView *text_view); @@ -243,40 +243,40 @@ void gtk_text_view_get_iter_location (GtkTextView *text_view, GDK_AVAILABLE_IN_ALL gboolean gtk_text_view_get_iter_at_location (GtkTextView *text_view, GtkTextIter *iter, - gint x, - gint y); + int x, + int y); GDK_AVAILABLE_IN_ALL gboolean gtk_text_view_get_iter_at_position (GtkTextView *text_view, GtkTextIter *iter, - gint *trailing, - gint x, - gint y); + int *trailing, + int x, + int y); GDK_AVAILABLE_IN_ALL void gtk_text_view_get_line_yrange (GtkTextView *text_view, const GtkTextIter *iter, - gint *y, - gint *height); + int *y, + int *height); GDK_AVAILABLE_IN_ALL void gtk_text_view_get_line_at_y (GtkTextView *text_view, GtkTextIter *target_iter, - gint y, - gint *line_top); + int y, + int *line_top); GDK_AVAILABLE_IN_ALL void gtk_text_view_buffer_to_window_coords (GtkTextView *text_view, GtkTextWindowType win, - gint buffer_x, - gint buffer_y, - gint *window_x, - gint *window_y); + int buffer_x, + int buffer_y, + int *window_x, + int *window_y); GDK_AVAILABLE_IN_ALL void gtk_text_view_window_to_buffer_coords (GtkTextView *text_view, GtkTextWindowType win, - gint window_x, - gint window_y, - gint *buffer_x, - gint *buffer_y); + int window_x, + int window_y, + int *buffer_x, + int *buffer_y); GDK_AVAILABLE_IN_ALL gboolean gtk_text_view_forward_display_line (GtkTextView *text_view, @@ -296,7 +296,7 @@ gboolean gtk_text_view_starts_display_line (GtkTextView *text_v GDK_AVAILABLE_IN_ALL gboolean gtk_text_view_move_visually (GtkTextView *text_view, GtkTextIter *iter, - gint count); + int count); GDK_AVAILABLE_IN_ALL gboolean gtk_text_view_im_context_filter_keypress (GtkTextView *text_view, @@ -320,14 +320,14 @@ void gtk_text_view_add_child_at_anchor (GtkTextView *text_view, GDK_AVAILABLE_IN_ALL void gtk_text_view_add_overlay (GtkTextView *text_view, GtkWidget *child, - gint xpos, - gint ypos); + int xpos, + int ypos); GDK_AVAILABLE_IN_ALL void gtk_text_view_move_overlay (GtkTextView *text_view, GtkWidget *child, - gint xpos, - gint ypos); + int xpos, + int ypos); GDK_AVAILABLE_IN_ALL void gtk_text_view_remove (GtkTextView *text_view, @@ -357,19 +357,19 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_text_view_get_accepts_tab (GtkTextView *text_view); GDK_AVAILABLE_IN_ALL void gtk_text_view_set_pixels_above_lines (GtkTextView *text_view, - gint pixels_above_lines); + int pixels_above_lines); GDK_AVAILABLE_IN_ALL -gint gtk_text_view_get_pixels_above_lines (GtkTextView *text_view); +int gtk_text_view_get_pixels_above_lines (GtkTextView *text_view); GDK_AVAILABLE_IN_ALL void gtk_text_view_set_pixels_below_lines (GtkTextView *text_view, - gint pixels_below_lines); + int pixels_below_lines); GDK_AVAILABLE_IN_ALL -gint gtk_text_view_get_pixels_below_lines (GtkTextView *text_view); +int gtk_text_view_get_pixels_below_lines (GtkTextView *text_view); GDK_AVAILABLE_IN_ALL void gtk_text_view_set_pixels_inside_wrap (GtkTextView *text_view, - gint pixels_inside_wrap); + int pixels_inside_wrap); GDK_AVAILABLE_IN_ALL -gint gtk_text_view_get_pixels_inside_wrap (GtkTextView *text_view); +int gtk_text_view_get_pixels_inside_wrap (GtkTextView *text_view); GDK_AVAILABLE_IN_ALL void gtk_text_view_set_justification (GtkTextView *text_view, GtkJustification justification); @@ -377,29 +377,29 @@ GDK_AVAILABLE_IN_ALL GtkJustification gtk_text_view_get_justification (GtkTextView *text_view); GDK_AVAILABLE_IN_ALL void gtk_text_view_set_left_margin (GtkTextView *text_view, - gint left_margin); + int left_margin); GDK_AVAILABLE_IN_ALL -gint gtk_text_view_get_left_margin (GtkTextView *text_view); +int gtk_text_view_get_left_margin (GtkTextView *text_view); GDK_AVAILABLE_IN_ALL void gtk_text_view_set_right_margin (GtkTextView *text_view, - gint right_margin); + int right_margin); GDK_AVAILABLE_IN_ALL -gint gtk_text_view_get_right_margin (GtkTextView *text_view); +int gtk_text_view_get_right_margin (GtkTextView *text_view); GDK_AVAILABLE_IN_ALL void gtk_text_view_set_top_margin (GtkTextView *text_view, - gint top_margin); + int top_margin); GDK_AVAILABLE_IN_ALL -gint gtk_text_view_get_top_margin (GtkTextView *text_view); +int gtk_text_view_get_top_margin (GtkTextView *text_view); GDK_AVAILABLE_IN_ALL void gtk_text_view_set_bottom_margin (GtkTextView *text_view, - gint bottom_margin); + int bottom_margin); GDK_AVAILABLE_IN_ALL -gint gtk_text_view_get_bottom_margin (GtkTextView *text_view); +int gtk_text_view_get_bottom_margin (GtkTextView *text_view); GDK_AVAILABLE_IN_ALL void gtk_text_view_set_indent (GtkTextView *text_view, - gint indent); + int indent); GDK_AVAILABLE_IN_ALL -gint gtk_text_view_get_indent (GtkTextView *text_view); +int gtk_text_view_get_indent (GtkTextView *text_view); GDK_AVAILABLE_IN_ALL void gtk_text_view_set_tabs (GtkTextView *text_view, PangoTabArray *tabs); diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index e29461ff7a..d8196d4592 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -418,10 +418,10 @@ gtk_tooltip_window_hide (GtkWidget *widget, GtkWidget * _gtk_widget_find_at_coords (GdkSurface *surface, - gint surface_x, - gint surface_y, - gint *widget_x, - gint *widget_y) + int surface_x, + int surface_y, + int *widget_x, + int *widget_y) { GtkWidget *event_widget; GtkWidget *picked_widget; @@ -450,7 +450,7 @@ _gtk_widget_find_at_coords (GdkSurface *surface, return picked_widget; } -static gint +static int tooltip_browse_mode_expired (gpointer data) { GtkTooltip *tooltip; @@ -531,8 +531,8 @@ gtk_tooltip_set_surface (GtkTooltip *tooltip, static gboolean gtk_tooltip_run_requery (GtkWidget **widget, GtkTooltip *tooltip, - gint *x, - gint *y) + int *x, + int *y) { gboolean has_tooltip = FALSE; gboolean return_value = FALSE; @@ -699,7 +699,7 @@ static void gtk_tooltip_show_tooltip (GdkDisplay *display) { double px, py; - gint x, y; + int x, y; GdkSurface *surface; GtkWidget *tooltip_widget; GdkSeat *seat; @@ -801,7 +801,7 @@ gtk_tooltip_hide_tooltip (GtkTooltip *tooltip) gtk_widget_hide (tooltip->window); } -static gint +static int tooltip_popup_timeout (gpointer data) { GdkDisplay *display; diff --git a/gtk/gtktooltipprivate.h b/gtk/gtktooltipprivate.h index 8f48433775..e8746daff0 100644 --- a/gtk/gtktooltipprivate.h +++ b/gtk/gtktooltipprivate.h @@ -38,10 +38,10 @@ void _gtk_tooltip_hide (GtkWidget *widget); void gtk_tooltip_trigger_tooltip_query (GtkWidget *widget); GtkWidget * _gtk_widget_find_at_coords (GdkSurface *surface, - gint surface_x, - gint surface_y, - gint *widget_x, - gint *widget_y); + int surface_x, + int surface_y, + int *widget_x, + int *widget_y); void gtk_tooltip_maybe_allocate (GtkNative *native); void gtk_tooltip_unset_surface (GtkNative *native); diff --git a/gtk/gtktrashmonitor.c b/gtk/gtktrashmonitor.c index 45f5b3f363..46b69f529e 100644 --- a/gtk/gtktrashmonitor.c +++ b/gtk/gtktrashmonitor.c @@ -34,7 +34,7 @@ struct _GtkTrashMonitor gulong file_monitor_changed_id; gboolean pending; - gint timeout_id; + int timeout_id; guint has_trash : 1; }; diff --git a/gtk/gtktreedatalist.c b/gtk/gtktreedatalist.c index 442654c1ad..101698db55 100644 --- a/gtk/gtktreedatalist.c +++ b/gtk/gtktreedatalist.c @@ -39,7 +39,7 @@ _gtk_tree_data_list_free (GtkTreeDataList *list, GType *column_headers) { GtkTreeDataList *tmp, *next; - gint i = 0; + int i = 0; tmp = list; @@ -64,7 +64,7 @@ _gtk_tree_data_list_free (GtkTreeDataList *list, gboolean _gtk_tree_data_list_check_type (GType type) { - gint i = 0; + int i = 0; static const GType type_list[] = { G_TYPE_BOOLEAN, @@ -135,7 +135,7 @@ _gtk_tree_data_list_node_to_value (GtkTreeDataList *list, g_value_set_uchar (value, (guchar) list->data.v_uchar); break; case G_TYPE_INT: - g_value_set_int (value, (gint) list->data.v_int); + g_value_set_int (value, (int) list->data.v_int); break; case G_TYPE_UINT: g_value_set_uint (value, (guint) list->data.v_uint); @@ -316,17 +316,17 @@ _gtk_tree_data_list_node_copy (GtkTreeDataList *list, return new_list; } -gint +int _gtk_tree_data_list_compare_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data) { - gint column = GPOINTER_TO_INT (user_data); + int column = GPOINTER_TO_INT (user_data); GType type = gtk_tree_model_get_column_type (model, column); GValue a_value = G_VALUE_INIT; GValue b_value = G_VALUE_INIT; - gint retval; + int retval; const gchar *stra, *strb; gtk_tree_model_get_value (model, a, column, &a_value); @@ -465,12 +465,12 @@ _gtk_tree_data_list_compare_func (GtkTreeModel *model, GList * -_gtk_tree_data_list_header_new (gint n_columns, +_gtk_tree_data_list_header_new (int n_columns, GType *types) { GList *retval = NULL; - gint i; + int i; for (i = 0; i < n_columns; i ++) { @@ -511,7 +511,7 @@ _gtk_tree_data_list_header_free (GList *list) GtkTreeDataSortHeader * _gtk_tree_data_list_get_header (GList *header_list, - gint sort_column_id) + int sort_column_id) { GtkTreeDataSortHeader *header = NULL; @@ -527,7 +527,7 @@ _gtk_tree_data_list_get_header (GList *header_list, GList * _gtk_tree_data_list_set_header (GList *header_list, - gint sort_column_id, + int sort_column_id, GtkTreeIterCompareFunc func, gpointer data, GDestroyNotify destroy) diff --git a/gtk/gtktreedatalist.h b/gtk/gtktreedatalist.h index 85e56219e4..2d88496a66 100644 --- a/gtk/gtktreedatalist.h +++ b/gtk/gtktreedatalist.h @@ -27,7 +27,7 @@ struct _GtkTreeDataList GtkTreeDataList *next; union { - gint v_int; + int v_int; gint8 v_char; guint8 v_uchar; guint v_uint; @@ -43,7 +43,7 @@ struct _GtkTreeDataList typedef struct _GtkTreeDataSortHeader { - gint sort_column_id; + int sort_column_id; GtkTreeIterCompareFunc func; gpointer data; GDestroyNotify destroy; @@ -63,17 +63,17 @@ GtkTreeDataList *_gtk_tree_data_list_node_copy (GtkTreeDataList *list, GType type); /* Header code */ -gint _gtk_tree_data_list_compare_func (GtkTreeModel *model, +int _gtk_tree_data_list_compare_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data); -GList * _gtk_tree_data_list_header_new (gint n_columns, +GList * _gtk_tree_data_list_header_new (int n_columns, GType *types); void _gtk_tree_data_list_header_free (GList *header_list); GtkTreeDataSortHeader *_gtk_tree_data_list_get_header (GList *header_list, - gint sort_column_id); + int sort_column_id); GList *_gtk_tree_data_list_set_header (GList *header_list, - gint sort_column_id, + int sort_column_id, GtkTreeIterCompareFunc func, gpointer data, GDestroyNotify destroy); diff --git a/gtk/gtktreednd.c b/gtk/gtktreednd.c index 7d26c188f0..d98c1af6eb 100644 --- a/gtk/gtktreednd.c +++ b/gtk/gtktreednd.c @@ -269,8 +269,8 @@ gtk_tree_create_row_drag_content (GtkTreeModel *tree_model, GdkContentProvider *content; GtkTreeRowData *trd; gchar *path_str; - gint len; - gint struct_size; + int len; + int struct_size; g_return_val_if_fail (GTK_IS_TREE_MODEL (tree_model), FALSE); g_return_val_if_fail (path != NULL, FALSE); diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c index 6a34674749..347ef323d1 100644 --- a/gtk/gtktreemodel.c +++ b/gtk/gtktreemodel.c @@ -163,7 +163,7 @@ * GtkTreeModel *list_store; * GtkTreeIter iter; * gboolean valid; - * gint row_count = 0; + * int row_count = 0; * * // make a new list_store * list_store = gtk_list_store_new (N_COLUMNS, @@ -181,7 +181,7 @@ * while (valid) * { * gchar *str_data; - * gint int_data; + * int int_data; * * // Make sure you terminate calls to gtk_tree_model_get() with a “-1” value * gtk_tree_model_get (list_store, &iter, @@ -254,9 +254,9 @@ static guint tree_model_signals[LAST_SIGNAL] = { 0 }; struct _GtkTreePath { - gint depth; /* Number of elements */ - gint alloc; /* Number of allocated elements */ - gint *indices; + int depth; /* Number of elements */ + int alloc; /* Number of allocated elements */ + int *indices; }; typedef struct @@ -294,7 +294,7 @@ static void gtk_tree_row_ref_deleted (RowRefList *refs, static void gtk_tree_row_ref_reordered (RowRefList *refs, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order); + int *new_order); GType gtk_tree_model_get_type (void) @@ -569,12 +569,12 @@ rows_reordered_marshal (GClosure *closure, void (* rows_reordered_callback) (GtkTreeModel *tree_model, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order); + int *new_order); GObject *model = g_value_get_object (param_values + 0); GtkTreePath *path = (GtkTreePath *)g_value_get_boxed (param_values + 1); GtkTreeIter *iter = (GtkTreeIter *)g_value_get_boxed (param_values + 2); - gint *new_order = (gint *)g_value_get_pointer (param_values + 3); + int *new_order = (int *)g_value_get_pointer (param_values + 3); /* first, we need to update internal row references */ gtk_tree_row_ref_reordered ((RowRefList *)g_object_get_data (model, ROW_REF_DATA_STRING), @@ -631,7 +631,7 @@ gtk_tree_path_new_from_string (const gchar *path) GtkTreePath *retval; const gchar *orig_path = path; gchar *ptr; - gint i; + int i; g_return_val_if_fail (path != NULL, NULL); g_return_val_if_fail (*path != '\000', NULL); @@ -674,7 +674,7 @@ gtk_tree_path_new_from_string (const gchar *path) * Returns: A newly created #GtkTreePath-struct */ GtkTreePath * -gtk_tree_path_new_from_indices (gint first_index, +gtk_tree_path_new_from_indices (int first_index, ...) { int arg; @@ -689,7 +689,7 @@ gtk_tree_path_new_from_indices (gint first_index, while (arg != -1) { gtk_tree_path_append_index (path, arg); - arg = va_arg (args, gint); + arg = va_arg (args, int); } va_end (args); @@ -707,7 +707,7 @@ gtk_tree_path_new_from_indices (gint first_index, * Returns: A newly created #GtkTreePath-struct */ GtkTreePath * -gtk_tree_path_new_from_indicesv (gint *indices, +gtk_tree_path_new_from_indicesv (int *indices, gsize length) { GtkTreePath *path; @@ -717,8 +717,8 @@ gtk_tree_path_new_from_indicesv (gint *indices, path = gtk_tree_path_new (); path->alloc = length; path->depth = length; - path->indices = g_new (gint, length); - memcpy (path->indices, indices, length * sizeof (gint)); + path->indices = g_new (int, length); + memcpy (path->indices, indices, length * sizeof (int)); return path; } @@ -740,7 +740,7 @@ gchar * gtk_tree_path_to_string (GtkTreePath *path) { gchar *retval, *ptr, *end; - gint i, n; + int i, n; g_return_val_if_fail (path != NULL, NULL); @@ -795,7 +795,7 @@ gtk_tree_path_new_first (void) */ void gtk_tree_path_append_index (GtkTreePath *path, - gint index_) + int index_) { g_return_if_fail (path != NULL); g_return_if_fail (index_ >= 0); @@ -803,7 +803,7 @@ gtk_tree_path_append_index (GtkTreePath *path, if (path->depth == path->alloc) { path->alloc = MAX (path->alloc * 2, 1); - path->indices = g_renew (gint, path->indices, path->alloc); + path->indices = g_renew (int, path->indices, path->alloc); } path->depth += 1; @@ -821,19 +821,19 @@ gtk_tree_path_append_index (GtkTreePath *path, */ void gtk_tree_path_prepend_index (GtkTreePath *path, - gint index) + int index) { if (path->depth == path->alloc) { - gint *indices; + int *indices; path->alloc = MAX (path->alloc * 2, 1); - indices = g_new (gint, path->alloc); - memcpy (indices + 1, path->indices, path->depth * sizeof (gint)); + indices = g_new (int, path->alloc); + memcpy (indices + 1, path->indices, path->depth * sizeof (int)); g_free (path->indices); path->indices = indices; } else if (path->depth > 0) - memmove (path->indices + 1, path->indices, path->depth * sizeof (gint)); + memmove (path->indices + 1, path->indices, path->depth * sizeof (int)); path->depth += 1; path->indices[0] = index; @@ -847,7 +847,7 @@ gtk_tree_path_prepend_index (GtkTreePath *path, * * Returns: The depth of @path */ -gint +int gtk_tree_path_get_depth (GtkTreePath *path) { g_return_val_if_fail (path != NULL, 0); @@ -868,7 +868,7 @@ gtk_tree_path_get_depth (GtkTreePath *path) * * Returns: The current indices, or %NULL */ -gint * +int * gtk_tree_path_get_indices (GtkTreePath *path) { g_return_val_if_fail (path != NULL, NULL); @@ -891,9 +891,9 @@ gtk_tree_path_get_indices (GtkTreePath *path) * Returns: (array length=depth) (transfer none): The current * indices, or %NULL */ -gint * +int * gtk_tree_path_get_indices_with_depth (GtkTreePath *path, - gint *depth) + int *depth) { g_return_val_if_fail (path != NULL, NULL); @@ -937,8 +937,8 @@ gtk_tree_path_copy (const GtkTreePath *path) retval = g_slice_new (GtkTreePath); retval->depth = path->depth; retval->alloc = retval->depth; - retval->indices = g_new (gint, path->alloc); - memcpy (retval->indices, path->indices, path->depth * sizeof (gint)); + retval->indices = g_new (int, path->alloc); + memcpy (retval->indices, path->indices, path->depth * sizeof (int)); return retval; } @@ -959,11 +959,11 @@ G_DEFINE_BOXED_TYPE (GtkTreePath, gtk_tree_path, * * Returns: the relative positions of @a and @b */ -gint +int gtk_tree_path_compare (const GtkTreePath *a, const GtkTreePath *b) { - gint p = 0, q = 0; + int p = 0, q = 0; g_return_val_if_fail (a != NULL, 0); g_return_val_if_fail (b != NULL, 0); @@ -995,7 +995,7 @@ gboolean gtk_tree_path_is_ancestor (GtkTreePath *path, GtkTreePath *descendant) { - gint i; + int i; g_return_val_if_fail (path != NULL, FALSE); g_return_val_if_fail (descendant != NULL, FALSE); @@ -1028,7 +1028,7 @@ gboolean gtk_tree_path_is_descendant (GtkTreePath *path, GtkTreePath *ancestor) { - gint i; + int i; g_return_val_if_fail (path != NULL, FALSE); g_return_val_if_fail (ancestor != NULL, FALSE); @@ -1205,7 +1205,7 @@ gtk_tree_model_get_flags (GtkTreeModel *tree_model) * * Returns: the number of columns */ -gint +int gtk_tree_model_get_n_columns (GtkTreeModel *tree_model) { GtkTreeModelIface *iface; @@ -1228,7 +1228,7 @@ gtk_tree_model_get_n_columns (GtkTreeModel *tree_model) */ GType gtk_tree_model_get_column_type (GtkTreeModel *tree_model, - gint index) + int index) { GtkTreeModelIface *iface; @@ -1408,7 +1408,7 @@ gtk_tree_model_get_path (GtkTreeModel *tree_model, void gtk_tree_model_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value) { GtkTreeModelIface *iface; @@ -1574,7 +1574,7 @@ gtk_tree_model_iter_has_child (GtkTreeModel *tree_model, * * Returns: the number of children of @iter */ -gint +int gtk_tree_model_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter) { @@ -1609,7 +1609,7 @@ gboolean gtk_tree_model_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n) + int n) { GtkTreeModelIface *iface; @@ -1775,12 +1775,12 @@ gtk_tree_model_get_valist (GtkTreeModel *tree_model, GtkTreeIter *iter, va_list var_args) { - gint column; + int column; g_return_if_fail (GTK_IS_TREE_MODEL (tree_model)); g_return_if_fail (iter != NULL); - column = va_arg (var_args, gint); + column = va_arg (var_args, int); while (column != -1) { @@ -1809,7 +1809,7 @@ gtk_tree_model_get_valist (GtkTreeModel *tree_model, g_value_unset (&value); - column = va_arg (var_args, gint); + column = va_arg (var_args, int); } } @@ -1920,7 +1920,7 @@ void gtk_tree_model_rows_reordered (GtkTreeModel *tree_model, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order) + int *new_order) { g_return_if_fail (GTK_IS_TREE_MODEL (tree_model)); g_return_if_fail (new_order != NULL); @@ -1951,8 +1951,8 @@ void gtk_tree_model_rows_reordered_with_length (GtkTreeModel *tree_model, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order, - gint length) + int *new_order, + int length) { g_return_if_fail (GTK_IS_TREE_MODEL (tree_model)); g_return_if_fail (new_order != NULL); @@ -2040,7 +2040,7 @@ gtk_tree_model_foreach (GtkTreeModel *model, static void gtk_tree_row_reference_unref_path (GtkTreePath *path, GtkTreeModel *model, - gint depth); + int depth); G_DEFINE_BOXED_TYPE (GtkTreeRowReference, gtk_tree_row_reference, @@ -2109,7 +2109,7 @@ gtk_tree_row_ref_inserted (RowRefList *refs, if (reference->path->depth >= path->depth) { - gint i; + int i; gboolean ancestor = TRUE; for (i = 0; i < path->depth - 1; i ++) @@ -2155,7 +2155,7 @@ gtk_tree_row_ref_deleted (RowRefList *refs, if (reference->path) { - gint i; + int i; if (path->depth > reference->path->depth) goto next; @@ -2194,10 +2194,10 @@ static void gtk_tree_row_ref_reordered (RowRefList *refs, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order) + int *new_order) { GSList *tmp_list; - gint length; + int length; if (refs == NULL) return; @@ -2216,13 +2216,13 @@ gtk_tree_row_ref_reordered (RowRefList *refs, if ((reference->path) && (gtk_tree_path_is_ancestor (path, reference->path))) { - gint ref_depth = gtk_tree_path_get_depth (reference->path); - gint depth = gtk_tree_path_get_depth (path); + int ref_depth = gtk_tree_path_get_depth (reference->path); + int depth = gtk_tree_path_get_depth (path); if (ref_depth > depth) { - gint i; - gint *indices = gtk_tree_path_get_indices (reference->path); + int i; + int *indices = gtk_tree_path_get_indices (reference->path); for (i = 0; i < length; i++) { @@ -2246,8 +2246,8 @@ static void gtk_tree_row_reference_unref_path_helper (GtkTreePath *path, GtkTreeModel *model, GtkTreeIter *parent_iter, - gint depth, - gint current_depth) + int depth, + int current_depth) { GtkTreeIter iter; @@ -2262,7 +2262,7 @@ gtk_tree_row_reference_unref_path_helper (GtkTreePath *path, static void gtk_tree_row_reference_unref_path (GtkTreePath *path, GtkTreeModel *model, - gint depth) + int depth) { GtkTreeIter iter; @@ -2343,7 +2343,7 @@ gtk_tree_row_reference_new_proxy (GObject *proxy, GtkTreeRowReference *reference; RowRefList *refs; GtkTreeIter parent_iter; - gint i; + int i; g_return_val_if_fail (G_IS_OBJECT (proxy), NULL); g_return_val_if_fail (GTK_IS_TREE_MODEL (model), NULL); @@ -2559,7 +2559,7 @@ void gtk_tree_row_reference_reordered (GObject *proxy, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order) + int *new_order) { g_return_if_fail (G_IS_OBJECT (proxy)); diff --git a/gtk/gtktreemodel.h b/gtk/gtktreemodel.h index 9d6ad211b5..d9e1066cd6 100644 --- a/gtk/gtktreemodel.h +++ b/gtk/gtktreemodel.h @@ -92,7 +92,7 @@ typedef enum */ struct _GtkTreeIter { - gint stamp; + int stamp; gpointer user_data; gpointer user_data2; gpointer user_data3; @@ -149,14 +149,14 @@ struct _GtkTreeModelIface void (* rows_reordered) (GtkTreeModel *tree_model, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order); + int *new_order); /* Virtual Table */ GtkTreeModelFlags (* get_flags) (GtkTreeModel *tree_model); - gint (* get_n_columns) (GtkTreeModel *tree_model); + int (* get_n_columns) (GtkTreeModel *tree_model); GType (* get_column_type) (GtkTreeModel *tree_model, - gint index_); + int index_); gboolean (* get_iter) (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path); @@ -164,7 +164,7 @@ struct _GtkTreeModelIface GtkTreeIter *iter); void (* get_value) (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value); gboolean (* iter_next) (GtkTreeModel *tree_model, GtkTreeIter *iter); @@ -175,12 +175,12 @@ struct _GtkTreeModelIface GtkTreeIter *parent); gboolean (* iter_has_child) (GtkTreeModel *tree_model, GtkTreeIter *iter); - gint (* iter_n_children) (GtkTreeModel *tree_model, + int (* iter_n_children) (GtkTreeModel *tree_model, GtkTreeIter *iter); gboolean (* iter_nth_child) (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n); + int n); gboolean (* iter_parent) (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *child); @@ -197,10 +197,10 @@ GtkTreePath *gtk_tree_path_new (void); GDK_AVAILABLE_IN_ALL GtkTreePath *gtk_tree_path_new_from_string (const gchar *path); GDK_AVAILABLE_IN_ALL -GtkTreePath *gtk_tree_path_new_from_indices (gint first_index, +GtkTreePath *gtk_tree_path_new_from_indices (int first_index, ...); GDK_AVAILABLE_IN_ALL -GtkTreePath *gtk_tree_path_new_from_indicesv (gint *indices, +GtkTreePath *gtk_tree_path_new_from_indicesv (int *indices, gsize length); GDK_AVAILABLE_IN_ALL gchar *gtk_tree_path_to_string (GtkTreePath *path); @@ -208,18 +208,18 @@ GDK_AVAILABLE_IN_ALL GtkTreePath *gtk_tree_path_new_first (void); GDK_AVAILABLE_IN_ALL void gtk_tree_path_append_index (GtkTreePath *path, - gint index_); + int index_); GDK_AVAILABLE_IN_ALL void gtk_tree_path_prepend_index (GtkTreePath *path, - gint index_); + int index_); GDK_AVAILABLE_IN_ALL -gint gtk_tree_path_get_depth (GtkTreePath *path); +int gtk_tree_path_get_depth (GtkTreePath *path); GDK_AVAILABLE_IN_ALL -gint *gtk_tree_path_get_indices (GtkTreePath *path); +int *gtk_tree_path_get_indices (GtkTreePath *path); GDK_AVAILABLE_IN_ALL -gint *gtk_tree_path_get_indices_with_depth (GtkTreePath *path, - gint *depth); +int *gtk_tree_path_get_indices_with_depth (GtkTreePath *path, + int *depth); GDK_AVAILABLE_IN_ALL void gtk_tree_path_free (GtkTreePath *path); @@ -228,7 +228,7 @@ GtkTreePath *gtk_tree_path_copy (const GtkTreePath *path); GDK_AVAILABLE_IN_ALL GType gtk_tree_path_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -gint gtk_tree_path_compare (const GtkTreePath *a, +int gtk_tree_path_compare (const GtkTreePath *a, const GtkTreePath *b); GDK_AVAILABLE_IN_ALL void gtk_tree_path_next (GtkTreePath *path); @@ -285,7 +285,7 @@ GDK_AVAILABLE_IN_ALL void gtk_tree_row_reference_reordered (GObject *proxy, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order); + int *new_order); /* GtkTreeIter operations */ GDK_AVAILABLE_IN_ALL @@ -300,10 +300,10 @@ GType gtk_tree_model_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkTreeModelFlags gtk_tree_model_get_flags (GtkTreeModel *tree_model); GDK_AVAILABLE_IN_ALL -gint gtk_tree_model_get_n_columns (GtkTreeModel *tree_model); +int gtk_tree_model_get_n_columns (GtkTreeModel *tree_model); GDK_AVAILABLE_IN_ALL GType gtk_tree_model_get_column_type (GtkTreeModel *tree_model, - gint index_); + int index_); /* Iterator movement */ @@ -327,7 +327,7 @@ GtkTreePath * gtk_tree_model_get_path (GtkTreeModel *tree_model, GDK_AVAILABLE_IN_ALL void gtk_tree_model_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value); GDK_AVAILABLE_IN_ALL gboolean gtk_tree_model_iter_previous (GtkTreeModel *tree_model, @@ -343,13 +343,13 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_tree_model_iter_has_child (GtkTreeModel *tree_model, GtkTreeIter *iter); GDK_AVAILABLE_IN_ALL -gint gtk_tree_model_iter_n_children (GtkTreeModel *tree_model, +int gtk_tree_model_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter); GDK_AVAILABLE_IN_ALL gboolean gtk_tree_model_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n); + int n); GDK_AVAILABLE_IN_ALL gboolean gtk_tree_model_iter_parent (GtkTreeModel *tree_model, GtkTreeIter *iter, @@ -395,13 +395,13 @@ GDK_AVAILABLE_IN_ALL void gtk_tree_model_rows_reordered (GtkTreeModel *tree_model, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order); + int *new_order); GDK_AVAILABLE_IN_ALL void gtk_tree_model_rows_reordered_with_length (GtkTreeModel *tree_model, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order, - gint length); + int *new_order, + int length); G_END_DECLS diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c index 25fe8c700c..12b412d016 100644 --- a/gtk/gtktreemodelfilter.c +++ b/gtk/gtktreemodelfilter.c @@ -242,10 +242,10 @@ struct _FilterElt { GtkTreeIter iter; FilterLevel *children; - gint offset; - gint ref_count; - gint ext_ref_count; - gint zero_ref_count; + int offset; + int ref_count; + int ext_ref_count; + int zero_ref_count; GSequenceIter *visible_siter; /* iter into visible_seq */ }; @@ -253,8 +253,8 @@ struct _FilterLevel { GSequence *seq; GSequence *visible_seq; - gint ref_count; - gint ext_ref_count; + int ref_count; + int ext_ref_count; FilterElt *parent_elt; FilterLevel *parent_level; @@ -267,10 +267,10 @@ struct _GtkTreeModelFilterPrivate gpointer root; GtkTreePath *virtual_root; - gint stamp; + int stamp; guint child_flags; - gint zero_ref_count; - gint visible_column; + int zero_ref_count; + int visible_column; GtkTreeModelFilterVisibleFunc visible_func; gpointer visible_data; @@ -280,7 +280,7 @@ struct _GtkTreeModelFilterPrivate GtkTreeModelFilterModifyFunc modify_func; gpointer modify_data; GDestroyNotify modify_destroy; - gint modify_n_columns; + int modify_n_columns; guint visible_method_set : 1; guint modify_func_set : 1; @@ -357,14 +357,14 @@ static void gtk_tree_model_filter_row_deleted (GtkTr static void gtk_tree_model_filter_rows_reordered (GtkTreeModel *c_model, GtkTreePath *c_path, GtkTreeIter *c_iter, - gint *new_order, + int *new_order, gpointer data); /* GtkTreeModel interface */ static GtkTreeModelFlags gtk_tree_model_filter_get_flags (GtkTreeModel *model); -static gint gtk_tree_model_filter_get_n_columns (GtkTreeModel *model); +static int gtk_tree_model_filter_get_n_columns (GtkTreeModel *model); static GType gtk_tree_model_filter_get_column_type (GtkTreeModel *model, - gint index); + int index); static gboolean gtk_tree_model_filter_get_iter_full (GtkTreeModel *model, GtkTreeIter *iter, GtkTreePath *path); @@ -375,7 +375,7 @@ static GtkTreePath *gtk_tree_model_filter_get_path (GtkTr GtkTreeIter *iter); static void gtk_tree_model_filter_get_value (GtkTreeModel *model, GtkTreeIter *iter, - gint column, + int column, GValue *value); static gboolean gtk_tree_model_filter_iter_next (GtkTreeModel *model, GtkTreeIter *iter); @@ -386,12 +386,12 @@ static gboolean gtk_tree_model_filter_iter_children (GtkTr GtkTreeIter *parent); static gboolean gtk_tree_model_filter_iter_has_child (GtkTreeModel *model, GtkTreeIter *iter); -static gint gtk_tree_model_filter_iter_n_children (GtkTreeModel *model, +static int gtk_tree_model_filter_iter_n_children (GtkTreeModel *model, GtkTreeIter *iter); static gboolean gtk_tree_model_filter_iter_nth_child (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n); + int n); static gboolean gtk_tree_model_filter_iter_parent (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *child); @@ -436,7 +436,7 @@ static void gtk_tree_model_filter_real_modify (GtkTr GtkTreeModel *child_model, GtkTreeIter *iter, GValue *value, - gint column); + int column); static gboolean gtk_tree_model_filter_real_visible (GtkTreeModelFilter *filter, GtkTreeModel *child_model, GtkTreeIter *child_iter); @@ -474,12 +474,12 @@ static gboolean gtk_tree_model_filter_elt_is_visible_in_target (Filte static FilterElt *gtk_tree_model_filter_insert_elt_in_level (GtkTreeModelFilter *filter, GtkTreeIter *c_iter, FilterLevel *level, - gint offset, - gint *index); + int offset, + int *index); static FilterElt *gtk_tree_model_filter_fetch_child (GtkTreeModelFilter *filter, FilterLevel *level, - gint offset, - gint *index); + int offset, + int *index); static void gtk_tree_model_filter_remove_elt_from_level (GtkTreeModelFilter *filter, FilterLevel *level, FilterElt *elt); @@ -662,7 +662,7 @@ filter_elt_free (gpointer elt) g_slice_free (FilterElt, elt); } -static gint +static int filter_elt_cmp (gconstpointer a, gconstpointer b, gpointer user_data) @@ -680,7 +680,7 @@ filter_elt_cmp (gconstpointer a, static FilterElt * lookup_elt_with_offset (GSequence *seq, - gint offset, + int offset, GSequenceIter **ret_siter) { GSequenceIter *siter; @@ -700,7 +700,7 @@ increase_offset_iter (gpointer data, gpointer user_data) { FilterElt *elt = data; - gint offset = GPOINTER_TO_INT (user_data); + int offset = GPOINTER_TO_INT (user_data); if (elt->offset >= offset) elt->offset++; @@ -711,7 +711,7 @@ decrease_offset_iter (gpointer data, gpointer user_data) { FilterElt *elt = data; - gint offset = GPOINTER_TO_INT (user_data); + int offset = GPOINTER_TO_INT (user_data); if (elt->offset > offset) elt->offset--; @@ -730,8 +730,8 @@ gtk_tree_model_filter_build_level (GtkTreeModelFilter *filter, FilterLevel *tmp_level; FilterElt *tmp_elt; GtkTreeIter f_iter; - gint length = 0; - gint i; + int length = 0; + int i; gboolean empty = TRUE; g_assert (filter->priv->child_model != NULL); @@ -1139,8 +1139,8 @@ gtk_tree_model_filter_level_transfer_first_ref (GtkTreeModelFilter *filter, static void gtk_tree_model_filter_level_transfer_first_ref_with_index (GtkTreeModelFilter *filter, FilterLevel *level, - gint from_index, - gint to_index) + int from_index, + int to_index) { gtk_tree_model_filter_level_transfer_first_ref (filter, level, g_sequence_get_iter_at_pos (level->seq, from_index), @@ -1186,7 +1186,7 @@ gtk_tree_model_filter_add_root (GtkTreePath *src, GtkTreePath *root) { GtkTreePath *retval; - gint i; + int i; retval = gtk_tree_path_copy (root); @@ -1201,9 +1201,9 @@ gtk_tree_model_filter_remove_root (GtkTreePath *src, GtkTreePath *root) { GtkTreePath *retval; - gint i; - gint depth; - gint *indices; + int i; + int depth; + int *indices; if (gtk_tree_path_get_depth (src) <= gtk_tree_path_get_depth (root)) return NULL; @@ -1518,8 +1518,8 @@ static FilterElt * gtk_tree_model_filter_insert_elt_in_level (GtkTreeModelFilter *filter, GtkTreeIter *c_iter, FilterLevel *level, - gint offset, - gint *index) + int offset, + int *index) { FilterElt *elt; GSequenceIter *siter; @@ -1556,10 +1556,10 @@ gtk_tree_model_filter_insert_elt_in_level (GtkTreeModelFilter *filter, static FilterElt * gtk_tree_model_filter_fetch_child (GtkTreeModelFilter *filter, FilterLevel *level, - gint offset, - gint *index) + int offset, + int *index) { - gint len; + int len; GtkTreePath *c_path = NULL; GtkTreeIter c_iter; GtkTreePath *c_parent_path = NULL; @@ -1625,7 +1625,7 @@ gtk_tree_model_filter_remove_elt_from_level (GtkTreeModelFilter *filter, { FilterElt *parent; FilterLevel *parent_level; - gint length, orig_level_ext_ref_count; + int length, orig_level_ext_ref_count; GtkTreeIter iter; GtkTreePath *path = NULL; @@ -2122,7 +2122,7 @@ gtk_tree_model_filter_row_inserted (GtkTreeModel *c_model, GSequenceIter *siter; FilterElt dummy; - gint i = 0, offset; + int i = 0, offset; gboolean free_c_path = FALSE; gboolean emit_row_inserted = FALSE; @@ -2148,8 +2148,8 @@ gtk_tree_model_filter_row_inserted (GtkTreeModel *c_model, if (gtk_tree_path_get_depth (filter->priv->virtual_root) >= gtk_tree_path_get_depth (c_path)) { - gint depth; - gint *v_indices, *c_indices; + int depth; + int *v_indices, *c_indices; gboolean common_prefix = TRUE; depth = gtk_tree_path_get_depth (c_path) - 1; @@ -2391,7 +2391,7 @@ static void gtk_tree_model_filter_virtual_root_deleted (GtkTreeModelFilter *filter, GtkTreePath *c_path) { - gint i, nodes; + int i, nodes; GtkTreePath *path; FilterLevel *level = FILTER_LEVEL (filter->priv->root); @@ -2436,9 +2436,9 @@ static void gtk_tree_model_filter_adjust_virtual_root (GtkTreeModelFilter *filter, GtkTreePath *c_path) { - gint i; - gint level; - gint *v_indices, *c_indices; + int i; + int level; + int *v_indices, *c_indices; gboolean common_prefix = TRUE; level = gtk_tree_path_get_depth (c_path) - 1; @@ -2535,8 +2535,8 @@ gtk_tree_model_filter_row_deleted (GtkTreeModel *c_model, GSequenceIter *siter; gboolean emit_child_toggled = FALSE; gboolean emit_row_deleted = FALSE; - gint offset; - gint orig_level_ext_ref_count; + int offset; + int orig_level_ext_ref_count; g_return_if_fail (c_path != NULL); @@ -2705,7 +2705,7 @@ static void gtk_tree_model_filter_rows_reordered (GtkTreeModel *c_model, GtkTreePath *c_path, GtkTreeIter *c_iter, - gint *new_order, + int *new_order, gpointer data) { FilterElt *elt; @@ -2718,9 +2718,9 @@ gtk_tree_model_filter_rows_reordered (GtkTreeModel *c_model, GSequence *tmp_seq; GSequenceIter *tmp_end_iter; GSequenceIter *old_first_siter = NULL; - gint *tmp_array; - gint i, elt_count; - gint length; + int *tmp_array; + int i, elt_count; + int length; g_return_if_fail (new_order != NULL); @@ -2730,7 +2730,7 @@ gtk_tree_model_filter_rows_reordered (GtkTreeModel *c_model, if (filter->priv->virtual_root) { - gint new_pos = -1; + int new_pos = -1; /* reorder root level of path */ for (i = 0; i < length; i++) @@ -2755,9 +2755,9 @@ gtk_tree_model_filter_rows_reordered (GtkTreeModel *c_model, if (filter->priv->virtual_root && gtk_tree_path_is_ancestor (c_path, filter->priv->virtual_root)) { - gint new_pos = -1; - gint len; - gint depth; + int new_pos = -1; + int len; + int depth; GtkTreeIter real_c_iter; depth = gtk_tree_path_get_depth (c_path); @@ -2834,7 +2834,7 @@ gtk_tree_model_filter_rows_reordered (GtkTreeModel *c_model, tmp_seq = g_sequence_new (filter_elt_free); tmp_end_iter = g_sequence_get_end_iter (tmp_seq); - tmp_array = g_new (gint, g_sequence_get_length (level->visible_seq)); + tmp_array = g_new (int, g_sequence_get_length (level->visible_seq)); elt_count = 0; old_first_siter = g_sequence_get_iter_at_pos (level->seq, 0); @@ -2912,7 +2912,7 @@ gtk_tree_model_filter_get_flags (GtkTreeModel *model) return 0; } -static gint +static int gtk_tree_model_filter_get_n_columns (GtkTreeModel *model) { GtkTreeModelFilter *filter = (GtkTreeModelFilter *)model; @@ -2934,7 +2934,7 @@ gtk_tree_model_filter_get_n_columns (GtkTreeModel *model) static GType gtk_tree_model_filter_get_column_type (GtkTreeModel *model, - gint index) + int index) { GtkTreeModelFilter *filter = (GtkTreeModelFilter *)model; @@ -2964,10 +2964,10 @@ gtk_tree_model_filter_get_iter_full (GtkTreeModel *model, GtkTreePath *path) { GtkTreeModelFilter *filter = (GtkTreeModelFilter *)model; - gint *indices; + int *indices; FilterLevel *level; FilterElt *elt; - gint depth, i; + int depth, i; GSequenceIter *siter; g_return_val_if_fail (GTK_IS_TREE_MODEL_FILTER (model), FALSE); @@ -3035,11 +3035,11 @@ gtk_tree_model_filter_get_iter (GtkTreeModel *model, GtkTreePath *path) { GtkTreeModelFilter *filter = (GtkTreeModelFilter *)model; - gint *indices; + int *indices; FilterLevel *level; FilterElt *elt; GSequenceIter *siter; - gint depth, i; + int depth, i; g_return_val_if_fail (GTK_IS_TREE_MODEL_FILTER (model), FALSE); g_return_val_if_fail (filter->priv->child_model != NULL, FALSE); @@ -3121,7 +3121,7 @@ gtk_tree_model_filter_get_path (GtkTreeModel *model, while (level) { - gint index; + int index; index = g_sequence_iter_get_position (elt->visible_siter); gtk_tree_path_prepend_index (retval, index); @@ -3138,7 +3138,7 @@ gtk_tree_model_filter_real_modify (GtkTreeModelFilter *self, GtkTreeModel *child_model, GtkTreeIter *iter, GValue *value, - gint column) + int column) { if (self->priv->modify_func) { @@ -3162,7 +3162,7 @@ gtk_tree_model_filter_real_modify (GtkTreeModelFilter *self, static void gtk_tree_model_filter_get_value (GtkTreeModel *model, GtkTreeIter *iter, - gint column, + int column, GValue *value) { GtkTreeModelFilter *filter = GTK_TREE_MODEL_FILTER (model); @@ -3324,7 +3324,7 @@ gtk_tree_model_filter_iter_has_child (GtkTreeModel *model, return FALSE; } -static gint +static int gtk_tree_model_filter_iter_n_children (GtkTreeModel *model, GtkTreeIter *iter) { @@ -3371,7 +3371,7 @@ static gboolean gtk_tree_model_filter_iter_nth_child (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n) + int n) { FilterLevel *level; GtkTreeIter children; @@ -3875,7 +3875,7 @@ gtk_tree_model_filter_set_visible_func (GtkTreeModelFilter *filter, */ void gtk_tree_model_filter_set_modify_func (GtkTreeModelFilter *filter, - gint n_columns, + int n_columns, GType *types, GtkTreeModelFilterModifyFunc func, gpointer data, @@ -3898,7 +3898,7 @@ gtk_tree_model_filter_set_modify_func (GtkTreeModelFilter *filter, /** * gtk_tree_model_filter_set_visible_column: * @filter: A #GtkTreeModelFilter - * @column: A #gint which is the column containing the visible information + * @column: A #int which is the column containing the visible information * * Sets @column of the child_model to be the column where @filter should * look for visibility information. @columns should be a column of type @@ -3911,7 +3911,7 @@ gtk_tree_model_filter_set_modify_func (GtkTreeModelFilter *filter, */ void gtk_tree_model_filter_set_visible_column (GtkTreeModelFilter *filter, - gint column) + int column) { g_return_if_fail (GTK_IS_TREE_MODEL_FILTER (filter)); g_return_if_fail (column >= 0); @@ -4016,12 +4016,12 @@ gtk_real_tree_model_filter_convert_child_path_to_path (GtkTreeModelFilter *filte gboolean build_levels, gboolean fetch_children) { - gint *child_indices; + int *child_indices; GtkTreePath *retval; GtkTreePath *real_path; FilterLevel *level; FilterElt *tmp; - gint i; + int i; g_return_val_if_fail (GTK_IS_TREE_MODEL_FILTER (filter), NULL); g_return_val_if_fail (filter->priv->child_model != NULL, NULL); @@ -4159,10 +4159,10 @@ GtkTreePath * gtk_tree_model_filter_convert_path_to_child_path (GtkTreeModelFilter *filter, GtkTreePath *filter_path) { - gint *filter_indices; + int *filter_indices; GtkTreePath *retval; FilterLevel *level; - gint i; + int i; g_return_val_if_fail (GTK_IS_TREE_MODEL_FILTER (filter), NULL); g_return_val_if_fail (filter->priv->child_model != NULL, NULL); diff --git a/gtk/gtktreemodelfilter.h b/gtk/gtktreemodelfilter.h index f49005f99b..28ca44c996 100644 --- a/gtk/gtktreemodelfilter.h +++ b/gtk/gtktreemodelfilter.h @@ -69,7 +69,7 @@ typedef gboolean (* GtkTreeModelFilterVisibleFunc) (GtkTreeModel *model, typedef void (* GtkTreeModelFilterModifyFunc) (GtkTreeModel *model, GtkTreeIter *iter, GValue *value, - gint column, + int column, gpointer data); typedef struct _GtkTreeModelFilter GtkTreeModelFilter; @@ -95,7 +95,7 @@ struct _GtkTreeModelFilterClass GtkTreeModel *child_model, GtkTreeIter *iter, GValue *value, - gint column); + int column); /*< private >*/ @@ -115,14 +115,14 @@ void gtk_tree_model_filter_set_visible_func (GtkTreeModelFilt GDestroyNotify destroy); GDK_AVAILABLE_IN_ALL void gtk_tree_model_filter_set_modify_func (GtkTreeModelFilter *filter, - gint n_columns, + int n_columns, GType *types, GtkTreeModelFilterModifyFunc func, gpointer data, GDestroyNotify destroy); GDK_AVAILABLE_IN_ALL void gtk_tree_model_filter_set_visible_column (GtkTreeModelFilter *filter, - gint column); + int column); GDK_AVAILABLE_IN_ALL GtkTreeModel *gtk_tree_model_filter_get_model (GtkTreeModelFilter *filter); diff --git a/gtk/gtktreemodelsort.c b/gtk/gtktreemodelsort.c index 49a1ac784f..0b6d83aef3 100644 --- a/gtk/gtktreemodelsort.c +++ b/gtk/gtktreemodelsort.c @@ -221,17 +221,17 @@ struct _SortElt { GtkTreeIter iter; SortLevel *children; - gint offset; - gint ref_count; - gint zero_ref_count; - gint old_index; /* used while sorting */ + int offset; + int ref_count; + int zero_ref_count; + int old_index; /* used while sorting */ GSequenceIter *siter; /* iter into seq */ }; struct _SortLevel { GSequence *seq; - gint ref_count; + int ref_count; SortElt *parent_elt; SortLevel *parent_level; }; @@ -243,8 +243,8 @@ struct _SortData gpointer sort_data; GtkTreePath *parent_path; - gint *parent_path_indices; - gint parent_path_depth; + int *parent_path_indices; + int parent_path_depth; }; /* Properties */ @@ -258,14 +258,14 @@ enum { struct _GtkTreeModelSortPrivate { gpointer root; - gint stamp; + int stamp; guint child_flags; GtkTreeModel *child_model; - gint zero_ref_count; + int zero_ref_count; /* sort information */ GList *sort_list; - gint sort_column_id; + int sort_column_id; GtkSortType order; /* default sort */ @@ -337,14 +337,14 @@ static void gtk_tree_model_sort_row_deleted (GtkTreeModel *mo static void gtk_tree_model_sort_rows_reordered (GtkTreeModel *s_model, GtkTreePath *s_path, GtkTreeIter *s_iter, - gint *new_order, + int *new_order, gpointer data); /* TreeModel interface */ static GtkTreeModelFlags gtk_tree_model_sort_get_flags (GtkTreeModel *tree_model); -static gint gtk_tree_model_sort_get_n_columns (GtkTreeModel *tree_model); +static int gtk_tree_model_sort_get_n_columns (GtkTreeModel *tree_model); static GType gtk_tree_model_sort_get_column_type (GtkTreeModel *tree_model, - gint index); + int index); static gboolean gtk_tree_model_sort_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path); @@ -352,7 +352,7 @@ static GtkTreePath *gtk_tree_model_sort_get_path (GtkTreeModel GtkTreeIter *iter); static void gtk_tree_model_sort_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value); static gboolean gtk_tree_model_sort_iter_next (GtkTreeModel *tree_model, GtkTreeIter *iter); @@ -363,12 +363,12 @@ static gboolean gtk_tree_model_sort_iter_children (GtkTreeModel GtkTreeIter *parent); static gboolean gtk_tree_model_sort_iter_has_child (GtkTreeModel *tree_model, GtkTreeIter *iter); -static gint gtk_tree_model_sort_iter_n_children (GtkTreeModel *tree_model, +static int gtk_tree_model_sort_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter); static gboolean gtk_tree_model_sort_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n); + int n); static gboolean gtk_tree_model_sort_iter_parent (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *child); @@ -391,13 +391,13 @@ static gboolean gtk_tree_model_sort_drag_data_delete (GtkTreeDragSource /* TreeSortable interface */ static gboolean gtk_tree_model_sort_get_sort_column_id (GtkTreeSortable *sortable, - gint *sort_column_id, + int *sort_column_id, GtkSortType *order); static void gtk_tree_model_sort_set_sort_column_id (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkSortType order); static void gtk_tree_model_sort_set_sort_func (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkTreeIterCompareFunc func, gpointer data, GDestroyNotify destroy); @@ -432,10 +432,10 @@ static GtkTreePath *gtk_real_tree_model_sort_convert_child_path_to_path (GtkTree GtkTreePath *child_path, gboolean build_levels); -static gint gtk_tree_model_sort_compare_func (gconstpointer a, +static int gtk_tree_model_sort_compare_func (gconstpointer a, gconstpointer b, gpointer user_data); -static gint gtk_tree_model_sort_offset_compare_func (gconstpointer a, +static int gtk_tree_model_sort_offset_compare_func (gconstpointer a, gconstpointer b, gpointer user_data); static void gtk_tree_model_sort_clear_cache_helper (GtkTreeModelSort *tree_model_sort, @@ -633,7 +633,7 @@ increase_offset_iter (gpointer data, gpointer user_data) { SortElt *elt = data; - gint offset = GPOINTER_TO_INT (user_data); + int offset = GPOINTER_TO_INT (user_data); if (elt->offset >= offset) elt->offset++; @@ -644,7 +644,7 @@ decrease_offset_iter (gpointer data, gpointer user_data) { SortElt *elt = data; - gint offset = GPOINTER_TO_INT (user_data); + int offset = GPOINTER_TO_INT (user_data); if (elt->offset > offset) elt->offset--; @@ -704,7 +704,7 @@ free_sort_data (SortData *data) static SortElt * lookup_elt_with_offset (GtkTreeModelSort *tree_model_sort, SortLevel *level, - gint offset, + int offset, GSequenceIter **ret_siter) { GSequenceIter *siter, *end_siter; @@ -749,7 +749,7 @@ gtk_tree_model_sort_row_changed (GtkTreeModel *s_model, gboolean free_s_path = FALSE; - gint index = 0, old_index; + int index = 0, old_index; g_return_if_fail (start_s_path != NULL || start_s_iter != NULL); @@ -815,12 +815,12 @@ gtk_tree_model_sort_row_changed (GtkTreeModel *s_model, /* if the item moved, then emit rows_reordered */ if (old_index != index) { - gint *new_order; - gint j; + int *new_order; + int j; GtkTreePath *tmppath; - new_order = g_new (gint, g_sequence_get_length (level->seq)); + new_order = g_new (int, g_sequence_get_length (level->seq)); for (j = 0; j < g_sequence_get_length (level->seq); j++) { @@ -891,7 +891,7 @@ gtk_tree_model_sort_row_inserted (GtkTreeModel *s_model, GtkTreeIter iter; GtkTreeIter real_s_iter; - gint i = 0; + int i = 0; gboolean free_s_path = FALSE; @@ -1027,7 +1027,7 @@ gtk_tree_model_sort_row_deleted (GtkTreeModel *s_model, SortElt *elt; SortLevel *level; GtkTreeIter iter; - gint offset; + int offset; g_return_if_fail (s_path != NULL); @@ -1089,13 +1089,13 @@ static void gtk_tree_model_sort_rows_reordered (GtkTreeModel *s_model, GtkTreePath *s_path, GtkTreeIter *s_iter, - gint *new_order, + int *new_order, gpointer data) { SortLevel *level; GtkTreeIter iter; GtkTreePath *path; - gint *tmp_array; + int *tmp_array; int i, length; GSequenceIter *siter, *end_siter; GtkTreeModelSort *tree_model_sort = GTK_TREE_MODEL_SORT (data); @@ -1148,7 +1148,7 @@ gtk_tree_model_sort_rows_reordered (GtkTreeModel *s_model, siter != end_siter; siter = g_sequence_iter_next (siter)) { - gint j; + int j; SortElt *elt = g_sequence_get (siter); for (j = 0; j < length; j++) @@ -1218,7 +1218,7 @@ gtk_tree_model_sort_get_flags (GtkTreeModel *tree_model) return 0; } -static gint +static int gtk_tree_model_sort_get_n_columns (GtkTreeModel *tree_model) { GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *) tree_model; @@ -1231,7 +1231,7 @@ gtk_tree_model_sort_get_n_columns (GtkTreeModel *tree_model) static GType gtk_tree_model_sort_get_column_type (GtkTreeModel *tree_model, - gint index) + int index) { GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *) tree_model; @@ -1247,10 +1247,10 @@ gtk_tree_model_sort_get_iter (GtkTreeModel *tree_model, { GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *) tree_model; GtkTreeModelSortPrivate *priv = tree_model_sort->priv; - gint *indices; + int *indices; SortElt *elt; SortLevel *level; - gint depth, i; + int depth, i; GSequenceIter *siter; g_return_val_if_fail (priv->child_model != NULL, FALSE); @@ -1332,7 +1332,7 @@ gtk_tree_model_sort_get_path (GtkTreeModel *tree_model, while (level) { - gint index; + int index; index = g_sequence_iter_get_position (elt->siter); gtk_tree_path_prepend_index (retval, index); @@ -1347,7 +1347,7 @@ gtk_tree_model_sort_get_path (GtkTreeModel *tree_model, static void gtk_tree_model_sort_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value) { GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *) tree_model; @@ -1476,7 +1476,7 @@ gtk_tree_model_sort_iter_has_child (GtkTreeModel *tree_model, return gtk_tree_model_iter_has_child (priv->child_model, &child_iter); } -static gint +static int gtk_tree_model_sort_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter) { @@ -1500,7 +1500,7 @@ static gboolean gtk_tree_model_sort_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n) + int n) { GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *) tree_model; SortLevel *level; @@ -1659,7 +1659,7 @@ gtk_tree_model_sort_unref_node (GtkTreeModel *tree_model, /* Sortable interface */ static gboolean gtk_tree_model_sort_get_sort_column_id (GtkTreeSortable *sortable, - gint *sort_column_id, + int *sort_column_id, GtkSortType *order) { GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *)sortable; @@ -1679,7 +1679,7 @@ gtk_tree_model_sort_get_sort_column_id (GtkTreeSortable *sortable, static void gtk_tree_model_sort_set_sort_column_id (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkSortType order) { GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *)sortable; @@ -1715,7 +1715,7 @@ gtk_tree_model_sort_set_sort_column_id (GtkTreeSortable *sortable, static void gtk_tree_model_sort_set_sort_func (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkTreeIterCompareFunc func, gpointer data, GDestroyNotify destroy) @@ -1812,7 +1812,7 @@ gtk_tree_model_sort_drag_data_delete (GtkTreeDragSource *drag_source, } /* sorting code - private */ -static gint +static int gtk_tree_model_sort_compare_func (gconstpointer a, gconstpointer b, gpointer user_data) @@ -1824,7 +1824,7 @@ gtk_tree_model_sort_compare_func (gconstpointer a, const SortElt *sb = b; GtkTreeIter iter_a, iter_b; - gint retval; + int retval; if (GTK_TREE_MODEL_SORT_CACHE_CHILD_ITERS (tree_model_sort)) { @@ -1854,12 +1854,12 @@ gtk_tree_model_sort_compare_func (gconstpointer a, return retval; } -static gint +static int gtk_tree_model_sort_offset_compare_func (gconstpointer a, gconstpointer b, gpointer user_data) { - gint retval; + int retval; const SortElt *sa = (SortElt *)a; const SortElt *sb = (SortElt *)b; @@ -1891,10 +1891,10 @@ gtk_tree_model_sort_sort_level (GtkTreeModelSort *tree_model_sort, gboolean emit_reordered) { GtkTreeModelSortPrivate *priv = tree_model_sort->priv; - gint i; + int i; GSequenceIter *begin_siter, *end_siter, *siter; SortElt *begin_elt; - gint *new_order; + int *new_order; GtkTreeIter iter; GtkTreePath *path; @@ -1937,7 +1937,7 @@ gtk_tree_model_sort_sort_level (GtkTreeModelSort *tree_model_sort, free_sort_data (&data); - new_order = g_new (gint, g_sequence_get_length (level->seq)); + new_order = g_new (int, g_sequence_get_length (level->seq)); i = 0; end_siter = g_sequence_get_end_iter (level->seq); @@ -2044,7 +2044,7 @@ gtk_tree_model_sort_insert_value (GtkTreeModelSort *tree_model_sort, GtkTreeModelSortPrivate *priv = tree_model_sort->priv; SortElt *elt; SortData data; - gint offset; + int offset; elt = sort_elt_new (); @@ -2155,7 +2155,7 @@ gtk_tree_model_sort_set_model (GtkTreeModelSort *tree_model_sort, if (child_model) { GType *types; - gint i, n_columns; + int i, n_columns; priv->changed_id = g_signal_connect (child_model, "row-changed", @@ -2216,10 +2216,10 @@ gtk_real_tree_model_sort_convert_child_path_to_path (GtkTreeModelSort *tree_mode gboolean build_levels) { GtkTreeModelSortPrivate *priv = tree_model_sort->priv; - gint *child_indices; + int *child_indices; GtkTreePath *retval; SortLevel *level; - gint i; + int i; g_return_val_if_fail (priv->child_model != NULL, NULL); g_return_val_if_fail (child_path != NULL, NULL); @@ -2361,10 +2361,10 @@ gtk_tree_model_sort_convert_path_to_child_path (GtkTreeModelSort *tree_model_sor GtkTreePath *sorted_path) { GtkTreeModelSortPrivate *priv = tree_model_sort->priv; - gint *sorted_indices; + int *sorted_indices; GtkTreePath *retval; SortLevel *level; - gint i; + int i; g_return_val_if_fail (GTK_IS_TREE_MODEL_SORT (tree_model_sort), NULL); g_return_val_if_fail (priv->child_model != NULL, NULL); @@ -2459,8 +2459,8 @@ gtk_tree_model_sort_build_level (GtkTreeModelSort *tree_model_sort, GtkTreeModelSortPrivate *priv = tree_model_sort->priv; GtkTreeIter iter; SortLevel *new_level; - gint length = 0; - gint i; + int length = 0; + int i; g_assert (priv->child_model != NULL); diff --git a/gtk/gtktreepopover.c b/gtk/gtktreepopover.c index 232a85d9f8..c67357dd64 100644 --- a/gtk/gtktreepopover.c +++ b/gtk/gtktreepopover.c @@ -335,7 +335,7 @@ row_inserted_cb (GtkTreeModel *model, GtkTreeIter *iter, GtkTreePopover *popover) { - gint *indices, depth, index; + int *indices, depth, index; GtkWidget *item; GtkWidget *box; @@ -389,7 +389,7 @@ row_changed_cb (GtkTreeModel *model, { gboolean is_separator = FALSE; GtkWidget *item; - gint *indices, depth, index; + int *indices, depth, index; item = gtk_tree_popover_get_path_item (popover, path); @@ -422,7 +422,7 @@ static void row_reordered_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order, + int *new_order, GtkTreePopover *popover) { rebuild_menu (popover); diff --git a/gtk/gtktreeprivate.h b/gtk/gtktreeprivate.h index ede31a714b..37dafa8e01 100644 --- a/gtk/gtktreeprivate.h +++ b/gtk/gtktreeprivate.h @@ -91,7 +91,7 @@ void _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column); void _gtk_tree_view_column_set_tree_view (GtkTreeViewColumn *column, GtkTreeView *tree_view); -gint _gtk_tree_view_column_request_width (GtkTreeViewColumn *tree_column); +int _gtk_tree_view_column_request_width (GtkTreeViewColumn *tree_column); void _gtk_tree_view_column_allocate (GtkTreeViewColumn *tree_column, int x_offset, int width, @@ -111,13 +111,13 @@ GtkCellRenderer *_gtk_tree_view_column_get_edited_cell (GtkTreeViewColumn *co GtkCellRenderer *_gtk_tree_view_column_get_cell_at_pos (GtkTreeViewColumn *column, GdkRectangle *cell_area, GdkRectangle *background_area, - gint x, - gint y); + int x, + int y); gboolean _gtk_tree_view_column_is_blank_at_pos (GtkTreeViewColumn *column, GdkRectangle *cell_area, GdkRectangle *background_area, - gint x, - gint y); + int x, + int y); void gtk_tree_view_column_cell_snapshot (GtkTreeViewColumn *tree_column, GtkSnapshot *snapshot, @@ -130,9 +130,9 @@ void _gtk_tree_view_column_cell_set_dirty (GtkTreeViewColumn *tree_column, gboolean _gtk_tree_view_column_cell_get_dirty (GtkTreeViewColumn *tree_column); void _gtk_tree_view_column_push_padding (GtkTreeViewColumn *column, - gint padding); -gint _gtk_tree_view_column_get_requested_width (GtkTreeViewColumn *column); -gint _gtk_tree_view_column_get_drag_x (GtkTreeViewColumn *column); + int padding); +int _gtk_tree_view_column_get_requested_width (GtkTreeViewColumn *column); +int _gtk_tree_view_column_get_drag_x (GtkTreeViewColumn *column); GtkCellAreaContext *_gtk_tree_view_column_get_context (GtkTreeViewColumn *column); gboolean _gtk_tree_view_column_coords_in_resize_rect (GtkTreeViewColumn *column, double x, diff --git a/gtk/gtktreerbtree.c b/gtk/gtktreerbtree.c index 0aa90affe1..51fea70707 100644 --- a/gtk/gtktreerbtree.c +++ b/gtk/gtktreerbtree.c @@ -20,7 +20,7 @@ #include "gtkdebug.h" static GtkTreeRBNode *gtk_tree_rbnode_new (GtkTreeRBTree *tree, - gint height); + int height); static void gtk_tree_rbnode_free (GtkTreeRBNode *node); static void gtk_tree_rbnode_rotate_left (GtkTreeRBTree *tree, GtkTreeRBNode *node); @@ -57,7 +57,7 @@ gtk_tree_rbtree_is_nil (GtkTreeRBNode *node) static GtkTreeRBNode * gtk_tree_rbnode_new (GtkTreeRBTree *tree, - gint height) + int height) { GtkTreeRBNode *node = g_slice_new (GtkTreeRBNode); @@ -94,7 +94,7 @@ static void gtk_tree_rbnode_rotate_left (GtkTreeRBTree *tree, GtkTreeRBNode *node) { - gint node_height, right_height; + int node_height, right_height; GtkTreeRBNode *right; g_return_if_fail (!gtk_tree_rbtree_is_nil (node)); @@ -142,7 +142,7 @@ static void gtk_tree_rbnode_rotate_right (GtkTreeRBTree *tree, GtkTreeRBNode *node) { - gint node_height, left_height; + int node_height, left_height; GtkTreeRBNode *left; g_return_if_fail (!gtk_tree_rbtree_is_nil (node)); @@ -429,7 +429,7 @@ gtk_tree_rbtree_remove (GtkTreeRBTree *tree) GtkTreeRBNode * gtk_tree_rbtree_insert_after (GtkTreeRBTree *tree, GtkTreeRBNode *current, - gint height, + int height, gboolean valid) { GtkTreeRBNode *node; @@ -504,7 +504,7 @@ gtk_tree_rbtree_insert_after (GtkTreeRBTree *tree, GtkTreeRBNode * gtk_tree_rbtree_insert_before (GtkTreeRBTree *tree, GtkTreeRBNode *current, - gint height, + int height, gboolean valid) { GtkTreeRBNode *node; @@ -579,7 +579,7 @@ gtk_tree_rbtree_insert_before (GtkTreeRBTree *tree, GtkTreeRBNode * gtk_tree_rbtree_find_count (GtkTreeRBTree *tree, - gint count) + int count) { GtkTreeRBNode *node; @@ -602,9 +602,9 @@ gtk_tree_rbtree_find_count (GtkTreeRBTree *tree, void gtk_tree_rbtree_node_set_height (GtkTreeRBTree *tree, GtkTreeRBNode *node, - gint height) + int height) { - gint diff = height - GTK_TREE_RBNODE_GET_HEIGHT (node); + int diff = height - GTK_TREE_RBNODE_GET_HEIGHT (node); if (diff == 0) return; @@ -759,7 +759,7 @@ gtk_tree_rbtree_mark_invalid (GtkTreeRBTree *tree) void gtk_tree_rbtree_set_fixed_height (GtkTreeRBTree *tree, - gint height, + int height, gboolean mark_valid) { GtkTreeRBNode *node; @@ -835,12 +835,12 @@ reorder_copy_node (GtkTreeRBTree *tree, */ void gtk_tree_rbtree_reorder (GtkTreeRBTree *tree, - gint *new_order, - gint length) + int *new_order, + int length) { GtkTreeRBNode **nodes; GtkTreeRBNode *node; - gint i, j; + int i, j; g_return_if_fail (tree != NULL); g_return_if_fail (length > 0); @@ -924,12 +924,12 @@ gtk_tree_rbtree_contains (GtkTreeRBTree *tree, return FALSE; } -gint +int gtk_tree_rbtree_node_find_offset (GtkTreeRBTree *tree, GtkTreeRBNode *node) { GtkTreeRBNode *last; - gint retval; + int retval; g_assert (node); g_assert (node->left); @@ -993,9 +993,9 @@ gtk_tree_rbtree_node_get_index (GtkTreeRBTree *tree, return retval; } -static gint +static int gtk_rbtree_real_find_offset (GtkTreeRBTree *tree, - gint height, + int height, GtkTreeRBTree **new_tree, GtkTreeRBNode **new_node) { @@ -1055,9 +1055,9 @@ gtk_rbtree_real_find_offset (GtkTreeRBTree *tree, return (height - tmp_node->left->offset); } -gint +int gtk_tree_rbtree_find_offset (GtkTreeRBTree *tree, - gint height, + int height, GtkTreeRBTree **new_tree, GtkTreeRBNode **new_node) { @@ -1129,7 +1129,7 @@ gtk_tree_rbtree_remove_node (GtkTreeRBTree *tree, GtkTreeRBNode *node) { GtkTreeRBNode *x, *y; - gint y_height; + int y_height; guint y_total_count; g_return_if_fail (tree != NULL); @@ -1207,7 +1207,7 @@ gtk_tree_rbtree_remove_node (GtkTreeRBTree *tree, if (y != node) { - gint node_height, node_total_count; + int node_height, node_total_count; /* We want to see how much we remove from the aggregate values. * This is all the children we remove plus the node's values. @@ -1403,11 +1403,11 @@ gtk_tree_rbtree_prev_full (GtkTreeRBTree *tree, } } -gint +int gtk_tree_rbtree_get_depth (GtkTreeRBTree *tree) { GtkTreeRBTree *tmp_tree; - gint depth = 0; + int depth = 0; tmp_tree = tree->parent_tree; while (tmp_tree) @@ -1543,11 +1543,11 @@ count_total (GtkTreeRBTree *tree, return res; } -static gint +static int _count_nodes (GtkTreeRBTree *tree, GtkTreeRBNode *node) { - gint res; + int res; if (gtk_tree_rbtree_is_nil (node)) return 0; @@ -1566,7 +1566,7 @@ static void gtk_tree_rbtree_test_height (GtkTreeRBTree *tree, GtkTreeRBNode *node) { - gint computed_offset = 0; + int computed_offset = 0; /* This whole test is sort of a useless truism. */ @@ -1595,7 +1595,7 @@ gtk_tree_rbtree_test_height (GtkTreeRBTree *tree, static void gtk_tree_rbtree_test_dirty (GtkTreeRBTree *tree, GtkTreeRBNode *node, - gint expected_dirtyness) + int expected_dirtyness) { g_assert (node); @@ -1701,9 +1701,9 @@ static void gtk_tree_rbtree_debug_spew_helper (GtkTreeRBTree *tree, GtkTreeRBNode *node, GString *s, - gint depth) + int depth) { - gint i; + int i; for (i = 0; i < depth; i++) g_string_append (s, "\t"); diff --git a/gtk/gtktreerbtreeprivate.h b/gtk/gtktreerbtreeprivate.h index 3dece561f5..f998be27b6 100644 --- a/gtk/gtktreerbtreeprivate.h +++ b/gtk/gtktreerbtreeprivate.h @@ -66,7 +66,7 @@ struct _GtkTreeRBNode /* count is the number of nodes beneath us, plus 1 for ourselves. * i.e. node->left->count + node->right->count + 1 */ - gint count; + int count; GtkTreeRBNode *left; GtkTreeRBNode *right; @@ -83,7 +83,7 @@ struct _GtkTreeRBNode * of all trees in ->children, iff children exists because * the thing is expanded. */ - gint offset; + int offset; /* Child trees */ GtkTreeRBTree *children; @@ -104,25 +104,25 @@ void gtk_tree_rbtree_remove (GtkTreeRBTree void gtk_tree_rbtree_destroy (GtkTreeRBTree *tree); GtkTreeRBNode * gtk_tree_rbtree_insert_before (GtkTreeRBTree *tree, GtkTreeRBNode *node, - gint height, + int height, gboolean valid); GtkTreeRBNode * gtk_tree_rbtree_insert_after (GtkTreeRBTree *tree, GtkTreeRBNode *node, - gint height, + int height, gboolean valid); void gtk_tree_rbtree_remove_node (GtkTreeRBTree *tree, GtkTreeRBNode *node); gboolean gtk_tree_rbtree_is_nil (GtkTreeRBNode *node); void gtk_tree_rbtree_reorder (GtkTreeRBTree *tree, - gint *new_order, - gint length); + int *new_order, + int length); gboolean gtk_tree_rbtree_contains (GtkTreeRBTree *tree, GtkTreeRBTree *potential_child); GtkTreeRBNode * gtk_tree_rbtree_find_count (GtkTreeRBTree *tree, - gint count); + int count); void gtk_tree_rbtree_node_set_height (GtkTreeRBTree *tree, GtkTreeRBNode *node, - gint height); + int height); void gtk_tree_rbtree_node_mark_invalid (GtkTreeRBTree *tree, GtkTreeRBNode *node); void gtk_tree_rbtree_node_mark_valid (GtkTreeRBTree *tree, @@ -130,9 +130,9 @@ void gtk_tree_rbtree_node_mark_valid (GtkTreeRBTree void gtk_tree_rbtree_column_invalid (GtkTreeRBTree *tree); void gtk_tree_rbtree_mark_invalid (GtkTreeRBTree *tree); void gtk_tree_rbtree_set_fixed_height (GtkTreeRBTree *tree, - gint height, + int height, gboolean mark_valid); -gint gtk_tree_rbtree_node_find_offset (GtkTreeRBTree *tree, +int gtk_tree_rbtree_node_find_offset (GtkTreeRBTree *tree, GtkTreeRBNode *node); guint gtk_tree_rbtree_node_get_index (GtkTreeRBTree *tree, GtkTreeRBNode *node); @@ -140,8 +140,8 @@ gboolean gtk_tree_rbtree_find_index (GtkTreeRBTree guint index, GtkTreeRBTree **new_tree, GtkTreeRBNode **new_node); -gint gtk_tree_rbtree_find_offset (GtkTreeRBTree *tree, - gint offset, +int gtk_tree_rbtree_find_offset (GtkTreeRBTree *tree, + int offset, GtkTreeRBTree **new_tree, GtkTreeRBNode **new_node); void gtk_tree_rbtree_traverse (GtkTreeRBTree *tree, @@ -163,7 +163,7 @@ void gtk_tree_rbtree_prev_full (GtkTreeRBTree GtkTreeRBTree **new_tree, GtkTreeRBNode **new_node); -gint gtk_tree_rbtree_get_depth (GtkTreeRBTree *tree); +int gtk_tree_rbtree_get_depth (GtkTreeRBTree *tree); G_END_DECLS diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c index 89739be696..fc1e27039b 100644 --- a/gtk/gtktreeselection.c +++ b/gtk/gtktreeselection.c @@ -82,9 +82,9 @@ struct _GtkTreeSelectionClass }; static void gtk_tree_selection_finalize (GObject *object); -static gint gtk_tree_selection_real_select_all (GtkTreeSelection *selection); -static gint gtk_tree_selection_real_unselect_all (GtkTreeSelection *selection); -static gint gtk_tree_selection_real_select_node (GtkTreeSelection *selection, +static int gtk_tree_selection_real_select_all (GtkTreeSelection *selection); +static int gtk_tree_selection_real_unselect_all (GtkTreeSelection *selection); +static int gtk_tree_selection_real_select_node (GtkTreeSelection *selection, GtkTreeRBTree *tree, GtkTreeRBNode *node, gboolean select); @@ -318,7 +318,7 @@ gtk_tree_selection_set_mode (GtkTreeSelection *selection, { GtkTreeRBTree *tree = NULL; GtkTreeRBNode *node = NULL; - gint selected = FALSE; + int selected = FALSE; GtkTreePath *anchor_path = NULL; anchor_path = _gtk_tree_view_get_anchor_path (selection->tree_view); @@ -634,7 +634,7 @@ gtk_tree_selection_count_selected_rows_helper (GtkTreeRBTree *tree, GtkTreeRBNode *node, gpointer data) { - gint *count = (gint *)data; + int *count = (int *)data; g_return_if_fail (node != NULL); @@ -655,10 +655,10 @@ gtk_tree_selection_count_selected_rows_helper (GtkTreeRBTree *tree, * * Returns: The number of rows selected. **/ -gint +int gtk_tree_selection_count_selected_rows (GtkTreeSelection *selection) { - gint count = 0; + int count = 0; GtkTreeRBTree *tree; g_return_val_if_fail (GTK_IS_TREE_SELECTION (selection), 0); @@ -1044,7 +1044,7 @@ gtk_tree_selection_iter_is_selected (GtkTreeSelection *selection, /* Wish I was in python, right now... */ struct _TempTuple { GtkTreeSelection *selection; - gint dirty; + int dirty; }; static void @@ -1070,7 +1070,7 @@ select_all_helper (GtkTreeRBTree *tree, /* We have a real_{un,}select_all function that doesn't emit the signal, so we * can use it in other places without fear of the signal being emitted. */ -static gint +static int gtk_tree_selection_real_select_all (GtkTreeSelection *selection) { struct _TempTuple *tuple; @@ -1230,9 +1230,9 @@ enum RANGE_UNSELECT }; -static gint +static int gtk_tree_selection_real_modify_range (GtkTreeSelection *selection, - gint mode, + int mode, GtkTreePath *start_path, GtkTreePath *end_path) { @@ -1412,8 +1412,8 @@ _gtk_tree_selection_internal_select_node (GtkTreeSelection *selection, GtkTreeSelectMode mode, gboolean override_browse_mode) { - gint flags; - gint dirty = FALSE; + int flags; + int dirty = FALSE; GtkTreePath *anchor_path = NULL; if (selection->type == GTK_SELECTION_NONE) @@ -1535,7 +1535,7 @@ _gtk_tree_selection_emit_changed (GtkTreeSelection *selection) /* NOTE: Any {un,}selection ever done _MUST_ be done through this function! */ -static gint +static int gtk_tree_selection_real_select_node (GtkTreeSelection *selection, GtkTreeRBTree *tree, GtkTreeRBNode *node, diff --git a/gtk/gtktreeselection.h b/gtk/gtktreeselection.h index efff9130ec..351b1a665a 100644 --- a/gtk/gtktreeselection.h +++ b/gtk/gtktreeselection.h @@ -99,7 +99,7 @@ GDK_AVAILABLE_IN_ALL GList * gtk_tree_selection_get_selected_rows (GtkTreeSelection *selection, GtkTreeModel **model); GDK_AVAILABLE_IN_ALL -gint gtk_tree_selection_count_selected_rows (GtkTreeSelection *selection); +int gtk_tree_selection_count_selected_rows (GtkTreeSelection *selection); GDK_AVAILABLE_IN_ALL void gtk_tree_selection_selected_foreach (GtkTreeSelection *selection, GtkTreeSelectionForeachFunc func, diff --git a/gtk/gtktreesortable.c b/gtk/gtktreesortable.c index 0a2c010253..585eb8b448 100644 --- a/gtk/gtktreesortable.c +++ b/gtk/gtktreesortable.c @@ -122,7 +122,7 @@ gtk_tree_sortable_sort_column_changed (GtkTreeSortable *sortable) **/ gboolean gtk_tree_sortable_get_sort_column_id (GtkTreeSortable *sortable, - gint *sort_column_id, + int *sort_column_id, GtkSortType *order) { GtkTreeSortableIface *iface; @@ -155,7 +155,7 @@ gtk_tree_sortable_get_sort_column_id (GtkTreeSortable *sortable, */ void gtk_tree_sortable_set_sort_column_id (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkSortType order) { GtkTreeSortableIface *iface; @@ -184,7 +184,7 @@ gtk_tree_sortable_set_sort_column_id (GtkTreeSortable *sortable, */ void gtk_tree_sortable_set_sort_func (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkTreeIterCompareFunc sort_func, gpointer user_data, GDestroyNotify destroy) diff --git a/gtk/gtktreesortable.h b/gtk/gtktreesortable.h index bb49682698..a0579829da 100644 --- a/gtk/gtktreesortable.h +++ b/gtk/gtktreesortable.h @@ -80,10 +80,10 @@ typedef struct _GtkTreeSortableIface GtkTreeSortableIface; * Returns: a negative integer, zero or a positive integer depending on whether * @a sorts before, with or after @b */ -typedef gint (* GtkTreeIterCompareFunc) (GtkTreeModel *model, - GtkTreeIter *a, - GtkTreeIter *b, - gpointer user_data); +typedef int (* GtkTreeIterCompareFunc) (GtkTreeModel *model, + GtkTreeIter *a, + GtkTreeIter *b, + gpointer user_data); /** @@ -113,13 +113,13 @@ struct _GtkTreeSortableIface /* virtual table */ gboolean (* get_sort_column_id) (GtkTreeSortable *sortable, - gint *sort_column_id, + int *sort_column_id, GtkSortType *order); void (* set_sort_column_id) (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkSortType order); void (* set_sort_func) (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkTreeIterCompareFunc sort_func, gpointer user_data, GDestroyNotify destroy); @@ -138,15 +138,15 @@ GDK_AVAILABLE_IN_ALL void gtk_tree_sortable_sort_column_changed (GtkTreeSortable *sortable); GDK_AVAILABLE_IN_ALL gboolean gtk_tree_sortable_get_sort_column_id (GtkTreeSortable *sortable, - gint *sort_column_id, + int *sort_column_id, GtkSortType *order); GDK_AVAILABLE_IN_ALL void gtk_tree_sortable_set_sort_column_id (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkSortType order); GDK_AVAILABLE_IN_ALL void gtk_tree_sortable_set_sort_func (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkTreeIterCompareFunc sort_func, gpointer user_data, GDestroyNotify destroy); diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c index ce69dc187b..1c90e518f3 100644 --- a/gtk/gtktreestore.c +++ b/gtk/gtktreestore.c @@ -63,12 +63,12 @@ struct _GtkTreeStorePrivate { - gint stamp; + int stamp; GtkSortType order; gpointer root; gpointer last; - gint n_columns; - gint sort_column_id; + int n_columns; + int sort_column_id; GList *sort_list; GType *column_headers; GtkTreeIterCompareFunc default_sort_func; @@ -89,9 +89,9 @@ static void gtk_tree_store_sortable_init (GtkTreeSortableIface *ifac static void gtk_tree_store_buildable_init (GtkBuildableIface *iface); static void gtk_tree_store_finalize (GObject *object); static GtkTreeModelFlags gtk_tree_store_get_flags (GtkTreeModel *tree_model); -static gint gtk_tree_store_get_n_columns (GtkTreeModel *tree_model); +static int gtk_tree_store_get_n_columns (GtkTreeModel *tree_model); static GType gtk_tree_store_get_column_type (GtkTreeModel *tree_model, - gint index); + int index); static gboolean gtk_tree_store_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path); @@ -99,7 +99,7 @@ static GtkTreePath *gtk_tree_store_get_path (GtkTreeModel *tree_mode GtkTreeIter *iter); static void gtk_tree_store_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value); static gboolean gtk_tree_store_iter_next (GtkTreeModel *tree_model, GtkTreeIter *iter); @@ -110,21 +110,21 @@ static gboolean gtk_tree_store_iter_children (GtkTreeModel *tree_mode GtkTreeIter *parent); static gboolean gtk_tree_store_iter_has_child (GtkTreeModel *tree_model, GtkTreeIter *iter); -static gint gtk_tree_store_iter_n_children (GtkTreeModel *tree_model, +static int gtk_tree_store_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter); static gboolean gtk_tree_store_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n); + int n); static gboolean gtk_tree_store_iter_parent (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *child); static void gtk_tree_store_set_n_columns (GtkTreeStore *tree_store, - gint n_columns); + int n_columns); static void gtk_tree_store_set_column_type (GtkTreeStore *tree_store, - gint column, + int column, GType type); static void gtk_tree_store_increment_stamp (GtkTreeStore *tree_store); @@ -150,16 +150,16 @@ static gboolean gtk_tree_store_row_drop_possible (GtkTreeDragDest *drag_dest, static void gtk_tree_store_sort (GtkTreeStore *tree_store); static void gtk_tree_store_sort_iter_changed (GtkTreeStore *tree_store, GtkTreeIter *iter, - gint column, + int column, gboolean emit_signal); static gboolean gtk_tree_store_get_sort_column_id (GtkTreeSortable *sortable, - gint *sort_column_id, + int *sort_column_id, GtkSortType *order); static void gtk_tree_store_set_sort_column_id (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkSortType order); static void gtk_tree_store_set_sort_func (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkTreeIterCompareFunc func, gpointer data, GDestroyNotify destroy); @@ -310,17 +310,17 @@ gtk_tree_store_init (GtkTreeStore *tree_store) * * As an example, `gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING, * GDK_TYPE_TEXTURE);` will create a new #GtkTreeStore with three columns, of type - * #gint, #gchararray, and #GdkTexture respectively. + * #int, #gchararray, and #GdkTexture respectively. * * Returns: a new #GtkTreeStore **/ GtkTreeStore * -gtk_tree_store_new (gint n_columns, +gtk_tree_store_new (int n_columns, ...) { GtkTreeStore *retval; va_list args; - gint i; + int i; g_return_val_if_fail (n_columns > 0, NULL); @@ -355,11 +355,11 @@ gtk_tree_store_new (gint n_columns, * Returns: (transfer full): a new #GtkTreeStore **/ GtkTreeStore * -gtk_tree_store_newv (gint n_columns, +gtk_tree_store_newv (int n_columns, GType *types) { GtkTreeStore *retval; - gint i; + int i; g_return_val_if_fail (n_columns > 0, NULL); @@ -394,10 +394,10 @@ gtk_tree_store_newv (gint n_columns, **/ void gtk_tree_store_set_column_types (GtkTreeStore *tree_store, - gint n_columns, + int n_columns, GType *types) { - gint i; + int i; g_return_if_fail (GTK_IS_TREE_STORE (tree_store)); g_return_if_fail (tree_store->priv->columns_dirty == 0); @@ -416,7 +416,7 @@ gtk_tree_store_set_column_types (GtkTreeStore *tree_store, static void gtk_tree_store_set_n_columns (GtkTreeStore *tree_store, - gint n_columns) + int n_columns) { GtkTreeStorePrivate *priv = tree_store->priv; int i; @@ -449,7 +449,7 @@ gtk_tree_store_set_n_columns (GtkTreeStore *tree_store, **/ static void gtk_tree_store_set_column_type (GtkTreeStore *tree_store, - gint column, + int column, GType type) { GtkTreeStorePrivate *priv = tree_store->priv; @@ -510,7 +510,7 @@ gtk_tree_store_get_flags (GtkTreeModel *tree_model) return GTK_TREE_MODEL_ITERS_PERSIST; } -static gint +static int gtk_tree_store_get_n_columns (GtkTreeModel *tree_model) { GtkTreeStore *tree_store = (GtkTreeStore *) tree_model; @@ -523,7 +523,7 @@ gtk_tree_store_get_n_columns (GtkTreeModel *tree_model) static GType gtk_tree_store_get_column_type (GtkTreeModel *tree_model, - gint index) + int index) { GtkTreeStore *tree_store = (GtkTreeStore *) tree_model; GtkTreeStorePrivate *priv = tree_store->priv; @@ -543,8 +543,8 @@ gtk_tree_store_get_iter (GtkTreeModel *tree_model, GtkTreeStore *tree_store = (GtkTreeStore *) tree_model; GtkTreeStorePrivate *priv = tree_store->priv; GtkTreeIter parent; - gint *indices; - gint depth, i; + int *indices; + int depth, i; priv->columns_dirty = TRUE; @@ -583,7 +583,7 @@ gtk_tree_store_get_path (GtkTreeModel *tree_model, GtkTreeStorePrivate *priv = tree_store->priv; GtkTreePath *retval; GNode *tmp_node; - gint i = 0; + int i = 0; g_return_val_if_fail (iter->user_data != NULL, NULL); g_return_val_if_fail (iter->stamp == priv->stamp, NULL); @@ -643,13 +643,13 @@ gtk_tree_store_get_path (GtkTreeModel *tree_model, static void gtk_tree_store_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value) { GtkTreeStore *tree_store = (GtkTreeStore *) tree_model; GtkTreeStorePrivate *priv = tree_store->priv; GtkTreeDataList *list; - gint tmp_column = column; + int tmp_column = column; g_return_if_fail (column < priv->n_columns); g_return_if_fail (VALID_ITER (iter, tree_store)); @@ -748,12 +748,12 @@ gtk_tree_store_iter_has_child (GtkTreeModel *tree_model, return G_NODE (iter->user_data)->children != NULL; } -static gint +static int gtk_tree_store_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter) { GNode *node; - gint i = 0; + int i = 0; g_return_val_if_fail (iter == NULL || iter->user_data != NULL, 0); @@ -775,7 +775,7 @@ static gboolean gtk_tree_store_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n) + int n) { GtkTreeStore *tree_store = (GtkTreeStore *) tree_model; GtkTreeStorePrivate *priv = tree_store->priv; @@ -838,14 +838,14 @@ gtk_tree_store_iter_parent (GtkTreeModel *tree_model, static gboolean gtk_tree_store_real_set_value (GtkTreeStore *tree_store, GtkTreeIter *iter, - gint column, + int column, GValue *value, gboolean sort) { GtkTreeStorePrivate *priv = tree_store->priv; GtkTreeDataList *list; GtkTreeDataList *prev; - gint old_column = column; + int old_column = column; GValue real_value = G_VALUE_INIT; gboolean converted = FALSE; gboolean retval = FALSE; @@ -946,7 +946,7 @@ gtk_tree_store_real_set_value (GtkTreeStore *tree_store, void gtk_tree_store_set_value (GtkTreeStore *tree_store, GtkTreeIter *iter, - gint column, + int column, GValue *value) { g_return_if_fail (GTK_IS_TREE_STORE (tree_store)); @@ -995,12 +995,12 @@ gtk_tree_store_set_vector_internal (GtkTreeStore *tree_store, GtkTreeIter *iter, gboolean *emit_signal, gboolean *maybe_need_sort, - gint *columns, + int *columns, GValue *values, - gint n_values) + int n_values) { GtkTreeStorePrivate *priv = tree_store->priv; - gint i; + int i; GtkTreeIterCompareFunc func = NULL; func = gtk_tree_store_get_compare_func (tree_store); @@ -1027,10 +1027,10 @@ gtk_tree_store_set_valist_internal (GtkTreeStore *tree_store, va_list var_args) { GtkTreeStorePrivate *priv = tree_store->priv; - gint column; + int column; GtkTreeIterCompareFunc func = NULL; - column = va_arg (var_args, gint); + column = va_arg (var_args, int); func = gtk_tree_store_get_compare_func (tree_store); if (func != _gtk_tree_data_list_compare_func) @@ -1072,7 +1072,7 @@ gtk_tree_store_set_valist_internal (GtkTreeStore *tree_store, g_value_unset (&value); - column = va_arg (var_args, gint); + column = va_arg (var_args, int); } } @@ -1092,9 +1092,9 @@ gtk_tree_store_set_valist_internal (GtkTreeStore *tree_store, void gtk_tree_store_set_valuesv (GtkTreeStore *tree_store, GtkTreeIter *iter, - gint *columns, + int *columns, GValue *values, - gint n_values) + int n_values) { GtkTreeStorePrivate *priv = tree_store->priv; gboolean emit_signal = FALSE; @@ -1277,7 +1277,7 @@ void gtk_tree_store_insert (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent, - gint position) + int position) { GtkTreeStorePrivate *priv = tree_store->priv; GtkTreePath *path; @@ -1513,7 +1513,7 @@ void gtk_tree_store_insert_with_values (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent, - gint position, + int position, ...) { GtkTreeStorePrivate *priv = tree_store->priv; @@ -1590,10 +1590,10 @@ void gtk_tree_store_insert_with_valuesv (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent, - gint position, - gint *columns, + int position, + int *columns, GValue *values, - gint n_values) + int n_values) { GtkTreeStorePrivate *priv = tree_store->priv; GtkTreePath *path; @@ -1801,7 +1801,7 @@ gtk_tree_store_is_ancestor (GtkTreeStore *tree_store, * * Returns: The depth of @iter **/ -gint +int gtk_tree_store_iter_depth (GtkTreeStore *tree_store, GtkTreeIter *iter) { @@ -1978,7 +1978,7 @@ copy_node_data (GtkTreeStore *tree_store, GtkTreeDataList *copy_prev = NULL; GtkTreeDataList *copy_iter = NULL; GtkTreePath *path; - gint col; + int col; col = 0; while (dl) @@ -2205,12 +2205,12 @@ gtk_tree_store_row_drop_possible (GtkTreeDragDest *drag_dest, /* Sorting and reordering */ typedef struct _SortTuple { - gint offset; + int offset; GNode *node; } SortTuple; /* Reordering */ -static gint +static int gtk_tree_store_reorder_func (gconstpointer a, gconstpointer b, gpointer user_data) @@ -2244,9 +2244,9 @@ gtk_tree_store_reorder_func (gconstpointer a, void gtk_tree_store_reorder (GtkTreeStore *tree_store, GtkTreeIter *parent, - gint *new_order) + int *new_order) { - gint i, length = 0; + int i, length = 0; GNode *level, *node; GtkTreePath *path; SortTuple *sort_array; @@ -2334,7 +2334,7 @@ gtk_tree_store_swap (GtkTreeStore *tree_store, { GNode *tmp, *node_a, *node_b, *parent_node; GNode *a_prev, *a_next, *b_prev, *b_next; - gint i, a_count, b_count, length, *order; + int i, a_count, b_count, length, *order; GtkTreePath *path_a, *path_b; GtkTreeIter parent; @@ -2443,7 +2443,7 @@ gtk_tree_store_swap (GtkTreeStore *tree_store, node_b->next = a_next; /* emit signal */ - order = g_new (gint, length); + order = g_new (int, length); for (i = 0; i < length; i++) if (i == a_count) order[i] = b_count; @@ -2470,10 +2470,10 @@ gtk_tree_store_move (GtkTreeStore *tree_store, gboolean before) { GNode *parent, *node, *a, *b, *tmp, *tmp_a, *tmp_b; - gint old_pos, new_pos, length, i, *order; + int old_pos, new_pos, length, i, *order; GtkTreePath *path = NULL, *tmppath, *pos_path = NULL; GtkTreeIter parent_iter, dst_a, dst_b; - gint depth = 0; + int depth = 0; gboolean handle_b = TRUE; g_return_if_fail (GTK_IS_TREE_STORE (tree_store)); @@ -2729,7 +2729,7 @@ gtk_tree_store_move (GtkTreeStore *tree_store, new_pos++; } - order = g_new (gint, length); + order = g_new (int, length); if (new_pos > old_pos) { for (i = 0; i < length; i++) @@ -2819,7 +2819,7 @@ gtk_tree_store_move_after (GtkTreeStore *tree_store, } /* Sorting */ -static gint +static int gtk_tree_store_compare_func (gconstpointer a, gconstpointer b, gpointer user_data) @@ -2833,7 +2833,7 @@ gtk_tree_store_compare_func (gconstpointer a, GtkTreeIter iter_a; GtkTreeIter iter_b; - gint retval; + int retval; if (priv->sort_column_id != -1) { @@ -2883,9 +2883,9 @@ gtk_tree_store_sort_helper (GtkTreeStore *tree_store, GArray *sort_array; GNode *node; GNode *tmp_node; - gint list_length; - gint i; - gint *new_order; + int list_length; + int i; + int *new_order; GtkTreePath *path; node = parent->children; @@ -2929,7 +2929,7 @@ gtk_tree_store_sort_helper (GtkTreeStore *tree_store, parent->children = g_array_index (sort_array, SortTuple, 0).node; /* Let the world know about our new order */ - new_order = g_new (gint, list_length); + new_order = g_new (int, list_length); for (i = 0; i < list_length; i++) new_order[i] = g_array_index (sort_array, SortTuple, i).offset; @@ -2982,7 +2982,7 @@ gtk_tree_store_sort (GtkTreeStore *tree_store) static void gtk_tree_store_sort_iter_changed (GtkTreeStore *tree_store, GtkTreeIter *iter, - gint column, + int column, gboolean emit_signal) { GtkTreeStorePrivate *priv = tree_store->priv; @@ -2991,13 +2991,13 @@ gtk_tree_store_sort_iter_changed (GtkTreeStore *tree_store, GNode *node; GtkTreePath *tmp_path; GtkTreeIter tmp_iter; - gint cmp_a = 0; - gint cmp_b = 0; - gint i; - gint old_location; - gint new_location; - gint *new_order; - gint length; + int cmp_a = 0; + int cmp_b = 0; + int i; + int old_location; + int new_location; + int *new_order; + int length; GtkTreeIterCompareFunc func; gpointer data; @@ -3176,7 +3176,7 @@ gtk_tree_store_sort_iter_changed (GtkTreeStore *tree_store, static gboolean gtk_tree_store_get_sort_column_id (GtkTreeSortable *sortable, - gint *sort_column_id, + int *sort_column_id, GtkSortType *order) { GtkTreeStore *tree_store = (GtkTreeStore *) sortable; @@ -3196,7 +3196,7 @@ gtk_tree_store_get_sort_column_id (GtkTreeSortable *sortable, static void gtk_tree_store_set_sort_column_id (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkSortType order) { GtkTreeStore *tree_store = (GtkTreeStore *) sortable; @@ -3235,7 +3235,7 @@ gtk_tree_store_set_sort_column_id (GtkTreeSortable *sortable, static void gtk_tree_store_set_sort_func (GtkTreeSortable *sortable, - gint sort_column_id, + int sort_column_id, GtkTreeIterCompareFunc func, gpointer data, GDestroyNotify destroy) diff --git a/gtk/gtktreestore.h b/gtk/gtktreestore.h index 649dc2154b..676491f3a6 100644 --- a/gtk/gtktreestore.h +++ b/gtk/gtktreestore.h @@ -61,14 +61,14 @@ struct _GtkTreeStoreClass GDK_AVAILABLE_IN_ALL GType gtk_tree_store_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkTreeStore *gtk_tree_store_new (gint n_columns, +GtkTreeStore *gtk_tree_store_new (int n_columns, ...); GDK_AVAILABLE_IN_ALL -GtkTreeStore *gtk_tree_store_newv (gint n_columns, +GtkTreeStore *gtk_tree_store_newv (int n_columns, GType *types); GDK_AVAILABLE_IN_ALL void gtk_tree_store_set_column_types (GtkTreeStore *tree_store, - gint n_columns, + int n_columns, GType *types); /* NOTE: use gtk_tree_model_get to get values from a GtkTreeStore */ @@ -76,7 +76,7 @@ void gtk_tree_store_set_column_types (GtkTreeStore *tree_store, GDK_AVAILABLE_IN_ALL void gtk_tree_store_set_value (GtkTreeStore *tree_store, GtkTreeIter *iter, - gint column, + int column, GValue *value); GDK_AVAILABLE_IN_ALL void gtk_tree_store_set (GtkTreeStore *tree_store, @@ -85,9 +85,9 @@ void gtk_tree_store_set (GtkTreeStore *tree_store, GDK_AVAILABLE_IN_ALL void gtk_tree_store_set_valuesv (GtkTreeStore *tree_store, GtkTreeIter *iter, - gint *columns, + int *columns, GValue *values, - gint n_values); + int n_values); GDK_AVAILABLE_IN_ALL void gtk_tree_store_set_valist (GtkTreeStore *tree_store, GtkTreeIter *iter, @@ -99,7 +99,7 @@ GDK_AVAILABLE_IN_ALL void gtk_tree_store_insert (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent, - gint position); + int position); GDK_AVAILABLE_IN_ALL void gtk_tree_store_insert_before (GtkTreeStore *tree_store, GtkTreeIter *iter, @@ -114,16 +114,16 @@ GDK_AVAILABLE_IN_ALL void gtk_tree_store_insert_with_values (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent, - gint position, + int position, ...); GDK_AVAILABLE_IN_ALL void gtk_tree_store_insert_with_valuesv (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *parent, - gint position, - gint *columns, + int position, + int *columns, GValue *values, - gint n_values); + int n_values); GDK_AVAILABLE_IN_ALL void gtk_tree_store_prepend (GtkTreeStore *tree_store, GtkTreeIter *iter, @@ -137,7 +137,7 @@ gboolean gtk_tree_store_is_ancestor (GtkTreeStore *tree_store, GtkTreeIter *iter, GtkTreeIter *descendant); GDK_AVAILABLE_IN_ALL -gint gtk_tree_store_iter_depth (GtkTreeStore *tree_store, +int gtk_tree_store_iter_depth (GtkTreeStore *tree_store, GtkTreeIter *iter); GDK_AVAILABLE_IN_ALL void gtk_tree_store_clear (GtkTreeStore *tree_store); @@ -147,7 +147,7 @@ gboolean gtk_tree_store_iter_is_valid (GtkTreeStore *tree_store, GDK_AVAILABLE_IN_ALL void gtk_tree_store_reorder (GtkTreeStore *tree_store, GtkTreeIter *parent, - gint *new_order); + int *new_order); GDK_AVAILABLE_IN_ALL void gtk_tree_store_swap (GtkTreeStore *tree_store, GtkTreeIter *a, diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 3be5b40b81..7906fc9063 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -284,8 +284,8 @@ typedef enum { typedef struct _GtkTreeViewColumnReorder GtkTreeViewColumnReorder; struct _GtkTreeViewColumnReorder { - gint left_align; - gint right_align; + int left_align; + int right_align; GtkTreeViewColumn *left_column; GtkTreeViewColumn *right_column; }; @@ -327,25 +327,25 @@ typedef struct /* Container info */ GList *children; - gint width; + int width; guint presize_handler_tick_cb; /* Adjustments */ GtkAdjustment *hadjustment; GtkAdjustment *vadjustment; - gint min_display_width; - gint min_display_height; + int min_display_width; + int min_display_height; /* CSS nodes */ GtkCssNode *header_node; /* Scroll position state keeping */ GtkTreeRowReference *top_row; - gint top_row_dy; + int top_row_dy; /* dy == y pos of top_row + top_row_dy */ /* we cache it for simplicity of the code */ - gint dy; + int dy; guint validate_rows_timer; guint scroll_sync_timer; @@ -353,10 +353,10 @@ typedef struct /* Indentation and expander layout */ GtkTreeViewColumn *expander_column; - gint level_indentation; + int level_indentation; /* Key navigation (focus), selection */ - gint cursor_offset; + int cursor_offset; GtkTreeRowReference *anchor; GtkTreeRBNode *cursor_node; @@ -368,11 +368,11 @@ typedef struct GtkTreeRBNode *button_pressed_node; GtkTreeRBTree *button_pressed_tree; - gint press_start_x; - gint press_start_y; + int press_start_x; + int press_start_y; - gint event_last_x; - gint event_last_y; + int event_last_x; + int event_last_y; GtkTreeRBNode *prelight_node; GtkTreeRBTree *prelight_tree; @@ -387,8 +387,8 @@ typedef struct GtkTreeSelection *selection; /* Header information */ - gint header_height; - gint n_columns; + int header_height; + int n_columns; GList *columns; GtkTreeViewColumnDropFunc column_drop_func; @@ -397,19 +397,19 @@ typedef struct GList *column_drag_info; GtkTreeViewColumnReorder *cur_reorder; - gint prev_width_before_expander; + int prev_width_before_expander; /* Scroll timeout (e.g. during dnd, rubber banding) */ guint scroll_timeout; /* Interactive Header reordering */ GtkTreeViewColumn *drag_column; - gint drag_column_x; - gint drag_column_y; + int drag_column_x; + int drag_column_y; /* Interactive Header Resizing */ - gint drag_pos; - gint x_drag; + int drag_pos; + int x_drag; /* Row drag-and-drop */ GtkTreeRowReference *drag_dest_row; @@ -417,14 +417,14 @@ typedef struct guint open_dest_timeout; /* Rubber banding */ - gint rubber_band_status; - gint rubber_band_x; - gint rubber_band_y; - gint rubber_band_extend; - gint rubber_band_modify; + int rubber_band_status; + int rubber_band_x; + int rubber_band_y; + int rubber_band_extend; + int rubber_band_modify; /* fixed height */ - gint fixed_height; + int fixed_height; GtkTreeRBNode *rubber_band_start_node; GtkTreeRBTree *rubber_band_start_tree; @@ -440,8 +440,8 @@ typedef struct gfloat scroll_to_col_align; /* Interactive search */ - gint selected_iter; - gint search_column; + int selected_iter; + int search_column; GtkTreeViewSearchEqualFunc search_equal_func; gpointer search_user_data; GDestroyNotify search_destroy; @@ -467,7 +467,7 @@ typedef struct GtkGesture *column_drag_gesture; /* Column reordering, resizing */ /* Tooltip support */ - gint tooltip_column; + int tooltip_column; int expander_size; @@ -632,7 +632,7 @@ static void gtk_tree_view_key_controller_key_released (GtkEventControllerKey static void gtk_tree_view_focus_controller_focus_out (GtkEventController *focus, GtkTreeView *tree_view); -static gint gtk_tree_view_focus (GtkWidget *widget, +static int gtk_tree_view_focus (GtkWidget *widget, GtkDirectionType direction); static gboolean gtk_tree_view_grab_focus (GtkWidget *widget); static void gtk_tree_view_css_changed (GtkWidget *widget, @@ -668,7 +668,7 @@ static void gtk_tree_view_drag_data_received (GObject /* tree_model signals */ static gboolean gtk_tree_view_real_move_cursor (GtkTreeView *tree_view, GtkMovementStep step, - gint count, + int count, gboolean extend, gboolean modify); static gboolean gtk_tree_view_real_select_all (GtkTreeView *tree_view); @@ -699,7 +699,7 @@ static void gtk_tree_view_row_deleted (GtkTreeModel *mode static void gtk_tree_view_rows_reordered (GtkTreeModel *model, GtkTreePath *parent, GtkTreeIter *iter, - gint *new_order, + int *new_order, gpointer data); /* Incremental reflow */ @@ -716,7 +716,7 @@ static void install_presize_handler (GtkTreeView *tree_view); static void install_scroll_sync_handler (GtkTreeView *tree_view); static void gtk_tree_view_set_top_row (GtkTreeView *tree_view, GtkTreePath *path, - gint offset); + int offset); static void gtk_tree_view_dy_to_top_row (GtkTreeView *tree_view); static void gtk_tree_view_top_row_to_dy (GtkTreeView *tree_view); static void invalidate_empty_focus (GtkTreeView *tree_view); @@ -730,8 +730,8 @@ static void gtk_tree_view_add_move_binding (GtkWidgetClass guint modmask, gboolean add_shifted_binding, GtkMovementStep step, - gint count); -static gint gtk_tree_view_unref_and_check_selection_tree (GtkTreeView *tree_view, + int count); +static int gtk_tree_view_unref_and_check_selection_tree (GtkTreeView *tree_view, GtkTreeRBTree *tree); static void gtk_tree_view_snapshot_arrow (GtkTreeView *tree_view, GtkSnapshot *snapshot, @@ -739,14 +739,14 @@ static void gtk_tree_view_snapshot_arrow (GtkTreeView GtkTreeRBNode *node); static void gtk_tree_view_get_arrow_xrange (GtkTreeView *tree_view, GtkTreeRBTree *tree, - gint *x1, - gint *x2); + int *x1, + int *x2); static void gtk_tree_view_adjustment_changed (GtkAdjustment *adjustment, GtkTreeView *tree_view); static void gtk_tree_view_build_tree (GtkTreeView *tree_view, GtkTreeRBTree *tree, GtkTreeIter *iter, - gint depth, + int depth, gboolean recurse); static void gtk_tree_view_clamp_node_visible (GtkTreeView *tree_view, GtkTreeRBTree *tree, @@ -757,13 +757,13 @@ static void gtk_tree_view_clamp_column_visible (GtkTreeView static gboolean gtk_tree_view_maybe_begin_dragging_row (GtkTreeView *tree_view); static void gtk_tree_view_focus_to_cursor (GtkTreeView *tree_view); static void gtk_tree_view_move_cursor_up_down (GtkTreeView *tree_view, - gint count); + int count); static void gtk_tree_view_move_cursor_page_up_down (GtkTreeView *tree_view, - gint count); + int count); static void gtk_tree_view_move_cursor_left_right (GtkTreeView *tree_view, - gint count); + int count); static void gtk_tree_view_move_cursor_start_end (GtkTreeView *tree_view, - gint count); + int count); static gboolean gtk_tree_view_real_collapse_row (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeRBTree *tree, @@ -786,18 +786,18 @@ static void update_prelight (GtkTreeView int x, int y); -static inline gint gtk_tree_view_get_effective_header_height (GtkTreeView *tree_view); +static inline int gtk_tree_view_get_effective_header_height (GtkTreeView *tree_view); -static inline gint gtk_tree_view_get_cell_area_y_offset (GtkTreeView *tree_view, +static inline int gtk_tree_view_get_cell_area_y_offset (GtkTreeView *tree_view, GtkTreeRBTree *tree, GtkTreeRBNode *node); -static inline gint gtk_tree_view_get_cell_area_height (GtkTreeView *tree_view, +static inline int gtk_tree_view_get_cell_area_height (GtkTreeView *tree_view, GtkTreeRBNode *node); -static inline gint gtk_tree_view_get_row_y_offset (GtkTreeView *tree_view, +static inline int gtk_tree_view_get_row_y_offset (GtkTreeView *tree_view, GtkTreeRBTree *tree, GtkTreeRBNode *node); -static inline gint gtk_tree_view_get_row_height (GtkTreeView *tree_view, +static inline int gtk_tree_view_get_row_height (GtkTreeView *tree_view, GtkTreeRBNode *node); static TreeViewDragInfo* get_info (GtkTreeView *tree_view); @@ -830,7 +830,7 @@ static gboolean gtk_tree_view_search_move (GtkWidget *windo GtkTreeView *tree_view, gboolean up); static gboolean gtk_tree_view_search_equal_func (GtkTreeModel *model, - gint column, + int column, const gchar *key, GtkTreeIter *iter, gpointer search_data); @@ -838,8 +838,8 @@ static gboolean gtk_tree_view_search_iter (GtkTreeModel *model GtkTreeSelection *selection, GtkTreeIter *iter, const gchar *text, - gint *count, - gint n); + int *count, + int n); static void gtk_tree_view_search_init (GtkWidget *entry, GtkTreeView *tree_view); static void gtk_tree_view_put (GtkTreeView *tree_view, @@ -857,7 +857,7 @@ static gboolean gtk_tree_view_real_start_interactive_search (GtkTreeView *tree_v static gboolean gtk_tree_view_start_interactive_search (GtkTreeView *tree_view); static GtkTreeViewColumn *gtk_tree_view_get_drop_column (GtkTreeView *tree_view, GtkTreeViewColumn *column, - gint drop_position); + int drop_position); /* GtkBuildable */ static void gtk_tree_view_buildable_add_child (GtkBuildable *tree_view, @@ -885,18 +885,18 @@ static void grab_focus_and_unset_draw_keyfocus (GtkTreeView *tree_view); /* Gestures */ static void gtk_tree_view_column_click_gesture_pressed (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkTreeView *tree_view); static void gtk_tree_view_click_gesture_pressed (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkTreeView *tree_view); static void gtk_tree_view_click_gesture_released (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkTreeView *tree_view); @@ -2303,7 +2303,7 @@ gtk_tree_view_update_height (GtkTreeView *tree_view) } } -static gint +static int gtk_tree_view_get_height (GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -2330,7 +2330,7 @@ gtk_tree_view_measure (GtkWidget *widget, { GList *list; GtkTreeViewColumn *column; - gint width = 0; + int width = 0; /* we validate some rows initially just to make sure we have some size. * In practice, with a lot of static lists, this should get a good width. @@ -2390,10 +2390,10 @@ gtk_tree_view_size_allocate_columns (GtkWidget *widget) const int x_offset = - gtk_adjustment_get_value (priv->hadjustment); GList *list, *first_column, *last_column; GtkTreeViewColumn *column; - gint widget_width, width = 0; - gint extra, extra_per_column; - gint full_requested_width = 0; - gint number_of_expand_columns = 0; + int widget_width, width = 0; + int extra, extra_per_column; + int full_requested_width = 0; + int number_of_expand_columns = 0; gboolean rtl; for (last_column = g_list_last (priv->columns); @@ -2441,7 +2441,7 @@ gtk_tree_view_size_allocate_columns (GtkWidget *widget) list != last_column->next; list = list->next) { - gint column_width; + int column_width; column = list->data; column_width = _gtk_tree_view_column_request_width (column); @@ -2569,7 +2569,7 @@ gtk_tree_view_size_allocate (GtkWidget *widget, * width that makes the expander move vertically. Always updating * prelight status causes trouble with hover selections. */ - gint width_before_expander; + int width_before_expander; width_before_expander = gtk_tree_view_calculate_width_before_expander (tree_view); @@ -2758,12 +2758,12 @@ gtk_tree_view_click_gesture_pressed (GtkGestureClick *gesture, GdkEventSequence *sequence; GdkModifierType modifiers; GdkEvent *event; - gint new_y, y_offset; - gint bin_x, bin_y; + int new_y, y_offset; + int bin_x, bin_y; GtkTreePath *path; GtkTreeRBNode *node; GtkTreeRBTree *tree; - gint depth; + int depth; guint button; GList *list; gboolean rtl; @@ -2880,7 +2880,7 @@ gtk_tree_view_click_gesture_pressed (GtkGestureClick *gesture, if (gtk_tree_view_draw_expanders (tree_view)) { - gint expander_size = gtk_tree_view_get_expander_size (tree_view); + int expander_size = gtk_tree_view_get_expander_size (tree_view); if (!rtl) cell_area.x += depth * expander_size; cell_area.width -= depth * expander_size; @@ -3017,7 +3017,7 @@ gtk_tree_view_drag_gesture_begin (GtkGestureDrag *gesture, GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); - gint bin_x, bin_y; + int bin_x, bin_y; GtkTreeRBTree *tree; GtkTreeRBNode *node; @@ -3052,7 +3052,7 @@ gtk_tree_view_drag_gesture_begin (GtkGestureDrag *gesture, static void gtk_tree_view_column_click_gesture_pressed (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkTreeView *tree_view) @@ -3094,14 +3094,14 @@ gtk_tree_view_column_drag_gesture_begin (GtkGestureDrag *gesture, GtkTreeViewColumn *column; gboolean rtl; GList *list; - gint i; + int i; rtl = (gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL); for (i = 0, list = priv->columns; list; list = list->next, i++) { gpointer drag_data; - gint column_width; + int column_width; column = list->data; @@ -3257,7 +3257,7 @@ gtk_tree_view_drag_gesture_end (GtkGestureDrag *gesture, static void gtk_tree_view_click_gesture_released (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkTreeView *tree_view) @@ -3320,11 +3320,11 @@ coords_are_over_arrow (GtkTreeView *tree_view, GtkTreeRBTree *tree, GtkTreeRBNode *node, /* these are in bin window coords */ - gint x, - gint y) + int x, + int y) { GdkRectangle arrow; - gint x2; + int x2; if (!gtk_widget_get_realized (GTK_WIDGET (tree_view))) return FALSE; @@ -3383,8 +3383,8 @@ do_prelight (GtkTreeView *tree_view, GtkTreeRBTree *tree, GtkTreeRBNode *node, /* these are in bin_window coords */ - gint x, - gint y) + int x, + int y) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -3470,8 +3470,8 @@ prelight_or_select (GtkTreeView *tree_view, GtkTreeRBTree *tree, GtkTreeRBNode *node, /* these are in bin_window coords */ - gint x, - gint y) + int x, + int y) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkSelectionMode mode = gtk_tree_selection_get_mode (priv->selection); @@ -3520,8 +3520,8 @@ ensure_unprelighted (GtkTreeView *tree_view) static void update_prelight (GtkTreeView *tree_view, - gint x, - gint y) + int x, + int y) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); int new_y; @@ -3554,7 +3554,7 @@ gtk_tree_view_motion_resize_column (GtkTreeView *tree_view, gdouble y) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); - gint new_width; + int new_width; GtkTreeViewColumn *column; column = gtk_tree_view_get_column (tree_view, priv->drag_pos); @@ -3601,8 +3601,8 @@ gtk_tree_view_vertical_autoscroll (GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GdkRectangle visible_rect; - gint y; - gint offset; + int y; + int offset; if (gtk_gesture_is_recognized (priv->drag_gesture)) { @@ -3643,7 +3643,7 @@ gtk_tree_view_horizontal_autoscroll (GtkTreeView *tree_view) GdkEventSequence *sequence; GdkRectangle visible_rect; gdouble x; - gint offset; + int offset; sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (priv->column_drag_gesture)); @@ -3675,7 +3675,7 @@ gtk_tree_view_motion_drag_column (GtkTreeView *tree_view, GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreeViewColumn *column = priv->drag_column; GtkWidget *button; - gint width, button_width; + int width, button_width; button = gtk_tree_view_column_get_button (column); x += gtk_adjustment_get_value (priv->hadjustment); @@ -3850,7 +3850,7 @@ gtk_tree_view_update_rubber_band_selection (GtkTreeView *tree_view) GtkTreeRBTree *start_tree, *end_tree; GtkTreeRBNode *start_node, *end_node; gdouble start_y, offset_y; - gint bin_y; + int bin_y; if (!gtk_gesture_is_active (priv->drag_gesture)) return; @@ -3987,7 +3987,7 @@ gtk_tree_view_update_rubber_band (GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); gdouble start_x, start_y, offset_x, offset_y, x, y; - gint bin_x, bin_y; + int bin_x, bin_y; if (!gtk_gesture_is_recognized (priv->drag_gesture)) return; @@ -4019,7 +4019,7 @@ gtk_tree_view_snapshot_rubber_band (GtkTreeView *tree_view, gdouble start_x, start_y, offset_x, offset_y; GdkRectangle rect; GtkStyleContext *context; - gint bin_x, bin_y; + int bin_x, bin_y; if (!gtk_gesture_is_recognized (priv->drag_gesture)) return; @@ -4129,13 +4129,13 @@ gtk_tree_view_motion_controller_motion (GtkEventControllerMotion *controller, GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreeRBTree *tree; GtkTreeRBNode *node; - gint new_y; + int new_y; GList *list; gboolean cursor_set = FALSE; if (priv->tree) { - gint bin_x, bin_y; + int bin_x, bin_y; /* If we are currently pressing down a button, we don't want to prelight anything else. */ if (gtk_gesture_is_active (priv->drag_gesture) || @@ -4394,22 +4394,22 @@ gtk_tree_view_bin_snapshot (GtkWidget *widget, GtkTreeRBNode *drag_highlight = NULL; GtkTreeRBTree *drag_highlight_tree = NULL; GtkTreeIter iter; - gint new_y; - gint y_offset, cell_offset; - gint max_height; - gint depth; + int new_y; + int y_offset, cell_offset; + int max_height; + int depth; GdkRectangle background_area; GdkRectangle cell_area; GdkRectangle clip; guint flags; - gint bin_window_width; - gint bin_window_height; + int bin_window_width; + int bin_window_height; GtkTreePath *drag_dest_path; GList *first_column, *last_column; gboolean has_can_focus_cell; gboolean rtl; - gint n_visible_columns; - gint expander_size; + int n_visible_columns; + int expander_size; gboolean draw_vgrid_lines, draw_hgrid_lines; GtkStyleContext *context; gboolean parity; @@ -4500,7 +4500,7 @@ gtk_tree_view_bin_snapshot (GtkWidget *widget, do { gboolean is_separator = FALSE; - gint n_col = 0; + int n_col = 0; parity = !parity; is_separator = row_is_separator (tree_view, &iter, NULL); @@ -4544,7 +4544,7 @@ gtk_tree_view_bin_snapshot (GtkWidget *widget, { GtkTreeViewColumn *column = list->data; GtkStateFlags state = 0; - gint width; + int width; gboolean draw_focus; if (!gtk_tree_view_column_get_visible (column)) @@ -4761,11 +4761,11 @@ gtk_tree_view_bin_snapshot (GtkWidget *widget, if (gtk_tree_view_is_expander_column (tree_view, column) && priv->tree_lines_enabled) { - gint x = background_area.x; - gint mult = rtl ? -1 : 1; - gint y0 = background_area.y; - gint y1 = background_area.y + background_area.height/2; - gint y2 = background_area.y + background_area.height; + int x = background_area.x; + int mult = rtl ? -1 : 1; + int y0 = background_area.y; + int y1 = background_area.y + background_area.height/2; + int y2 = background_area.y + background_area.height; if (rtl) x += background_area.width - 1; @@ -4894,7 +4894,7 @@ gtk_tree_view_bin_snapshot (GtkWidget *widget, priv->draw_keyfocus && gtk_widget_has_visible_focus (widget)) { - gint tmp_y, tmp_height; + int tmp_y, tmp_height; GtkStateFlags focus_rect_state = 0; gtk_style_context_save (context); @@ -4996,7 +4996,7 @@ gtk_tree_view_snapshot (GtkWidget *widget, GtkWidget *button; GtkStyleContext *context; GList *list; - gint width, height; + int width, height; context = gtk_widget_get_style_context (widget); width = gtk_widget_get_width (widget); @@ -5011,7 +5011,7 @@ gtk_tree_view_snapshot (GtkWidget *widget, gtk_snapshot_save (snapshot); gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT ( - - (gint) gtk_adjustment_get_value (priv->hadjustment), + - (int) gtk_adjustment_get_value (priv->hadjustment), gtk_tree_view_get_effective_header_height (tree_view))); gtk_tree_view_bin_snapshot (widget, snapshot); gtk_snapshot_restore (snapshot); @@ -5076,7 +5076,7 @@ enum static GtkTreeViewColumn * gtk_tree_view_get_drop_column (GtkTreeView *tree_view, GtkTreeViewColumn *column, - gint drop_position) + int drop_position) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreeViewColumn *left_column = NULL; @@ -5341,7 +5341,7 @@ gtk_tree_view_key_controller_key_pressed (GtkEventControllerKey *key, || keyval == GDK_KEY_Right || keyval == GDK_KEY_KP_Right)) { GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN (focus_column->data); - gint column_width; + int column_width; if (!gtk_tree_view_column_get_resizable (column)) { @@ -5482,7 +5482,7 @@ gtk_tree_view_motion_controller_enter (GtkEventControllerMotion *controller, GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreeRBTree *tree; GtkTreeRBNode *node; - gint new_y; + int new_y; if (priv->tree == NULL) return; @@ -5532,13 +5532,13 @@ gtk_tree_view_focus_controller_focus_out (GtkEventController *focus, /* Incremental Reflow */ -static gint +static int get_separator_height (GtkTreeView *tree_view) { GtkStyleContext *context; GtkCssStyle *style; gdouble d; - gint min_size; + int min_size; context = gtk_widget_get_style_context (GTK_WIDGET (tree_view)); gtk_style_context_save (context); @@ -5570,12 +5570,12 @@ validate_row (GtkTreeView *tree_view, GtkTreeViewColumn *column; GtkStyleContext *context; GList *list, *first_column, *last_column; - gint height = 0; - gint depth = gtk_tree_path_get_depth (path); + int height = 0; + int depth = gtk_tree_path_get_depth (path); gboolean retval = FALSE; gboolean is_separator = FALSE; gboolean draw_vgrid_lines, draw_hgrid_lines; - gint expander_size; + int expander_size; int separator_height; /* double check the row needs validating */ @@ -5613,10 +5613,10 @@ validate_row (GtkTreeView *tree_view, for (list = priv->columns; list; list = list->next) { - gint padding = 0; - gint original_width; - gint new_width; - gint row_height; + int padding = 0; + int original_width; + int new_width; + int row_height; column = list->data; @@ -5701,9 +5701,9 @@ validate_visible_area (GtkTreeView *tree_view) GtkTreeRBNode *node = NULL; gboolean need_redraw = FALSE; gboolean size_changed = FALSE; - gint total_height; - gint area_above = 0; - gint area_below = 0; + int total_height; + int area_above = 0; + int area_below = 0; if (priv->tree == NULL) return; @@ -5737,7 +5737,7 @@ validate_visible_area (GtkTreeView *tree_view) if (priv->scroll_to_use_align) { - gint height = gtk_tree_view_get_row_height (tree_view, node); + int height = gtk_tree_view_get_row_height (tree_view, node); area_above = (total_height - height) * priv->scroll_to_row_align; area_below = total_height - area_above - height; @@ -5750,8 +5750,8 @@ validate_visible_area (GtkTreeView *tree_view) * 1) row not visible * 2) row visible */ - gint dy; - gint height = gtk_tree_view_get_row_height (tree_view, node); + int dy; + int height = gtk_tree_view_get_row_height (tree_view, node); dy = gtk_tree_rbtree_node_find_offset (tree, node); @@ -5821,7 +5821,7 @@ validate_visible_area (GtkTreeView *tree_view) */ if (path == NULL) { - gint offset; + int offset; offset = gtk_tree_rbtree_find_offset (priv->tree, TREE_WINDOW_Y_TO_RBTREE_Y (priv, 0), @@ -6107,14 +6107,14 @@ do_validate_rows (GtkTreeView *tree_view, gboolean queue_resize) GtkTreeRBTree *tree = NULL; GtkTreeRBNode *node = NULL; gboolean validated_area = FALSE; - gint retval = TRUE; + int retval = TRUE; GtkTreePath *path = NULL; GtkTreeIter iter; GTimer *timer; - gint i = 0; + int i = 0; - gint y = -1; - gint prev_height = -1; + int y = -1; + int prev_height = -1; gboolean fixed_height = TRUE; g_assert (tree_view); @@ -6205,7 +6205,7 @@ do_validate_rows (GtkTreeView *tree_view, gboolean queue_resize) if (changed) { - gint offset = gtk_tree_view_get_row_y_offset (tree_view, tree, node); + int offset = gtk_tree_view_get_row_y_offset (tree_view, tree, node); if (y == -1 || y > offset) y = offset; @@ -6213,7 +6213,7 @@ do_validate_rows (GtkTreeView *tree_view, gboolean queue_resize) if (!priv->fixed_height_check) { - gint height; + int height; height = gtk_tree_view_get_row_height (tree_view, node); if (prev_height < 0) @@ -6238,7 +6238,7 @@ do_validate_rows (GtkTreeView *tree_view, gboolean queue_resize) if (validated_area) { GtkRequisition requisition; - gint dummy; + int dummy; /* We temporarily guess a size, under the assumption that it will be the * same when we get our next size_allocate. If we don't do this, we'll be @@ -6447,7 +6447,7 @@ install_scroll_sync_handler (GtkTreeView *tree_view) static void gtk_tree_view_set_top_row (GtkTreeView *tree_view, GtkTreePath *path, - gint offset) + int offset) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -6472,7 +6472,7 @@ static void gtk_tree_view_dy_to_top_row (GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); - gint offset; + int offset; GtkTreePath *path; GtkTreeRBTree *tree; GtkTreeRBNode *node; @@ -6791,7 +6791,7 @@ remove_open_timeout (GtkTreeView *tree_view) } -static gint +static int open_row_timeout (gpointer data) { GtkTreeView *tree_view = data; @@ -6843,8 +6843,8 @@ static gboolean set_destination_row (GtkTreeView *tree_view, GtkDropTargetAsync *dest, /* coordinates relative to the widget */ - gint x, - gint y, + int x, + int y, GdkDragAction *suggested_action, GType *target) { @@ -6890,7 +6890,7 @@ set_destination_row (GtkTreeView *tree_view, &path, &pos)) { - gint n_children; + int n_children; GtkTreeModel *model; remove_open_timeout (tree_view); @@ -7020,10 +7020,10 @@ gtk_tree_view_maybe_begin_dragging_row (GtkTreeView *tree_view) gdouble start_x, start_y, offset_x, offset_y; TreeViewDragInfo *di; GtkTreePath *path = NULL; - gint button; + int button; GtkTreeModel *model; gboolean retval = FALSE; - gint bin_x, bin_y; + int bin_x, bin_y; GdkSurface *surface; GdkDevice *device; GdkContentProvider *content; @@ -7826,7 +7826,7 @@ search_first_focusable_path (GtkTreeView *tree_view, return (*path != NULL); } -static gint +static int gtk_tree_view_focus (GtkWidget *widget, GtkDirectionType direction) { @@ -7919,7 +7919,7 @@ gtk_tree_view_css_changed (GtkWidget *widget, static gboolean gtk_tree_view_real_move_cursor (GtkTreeView *tree_view, GtkMovementStep step, - gint count, + int count, gboolean extend, gboolean modify) { @@ -8101,12 +8101,12 @@ gtk_tree_view_row_inserted (GtkTreeModel *model, { GtkTreeView *tree_view = (GtkTreeView *) data; GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); - gint *indices; + int *indices; GtkTreeRBTree *tree; GtkTreeRBNode *tmpnode = NULL; - gint depth; - gint i = 0; - gint height; + int depth; + int i = 0; + int height; gboolean free_path = FALSE; g_return_if_fail (path != NULL || iter != NULL); @@ -8287,7 +8287,7 @@ check_selection_helper (GtkTreeRBTree *tree, GtkTreeRBNode *node, gpointer data) { - gint *value = (gint *)data; + int *value = (int *)data; *value |= GTK_TREE_RBNODE_FLAG_SET (node, GTK_TREE_RBNODE_IS_SELECTED); @@ -8427,14 +8427,14 @@ static void gtk_tree_view_rows_reordered (GtkTreeModel *model, GtkTreePath *parent, GtkTreeIter *iter, - gint *new_order, + int *new_order, gpointer data) { GtkTreeView *tree_view = GTK_TREE_VIEW (data); GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreeRBTree *tree; GtkTreeRBNode *node; - gint len; + int len; len = gtk_tree_model_iter_n_children (model, iter); @@ -8485,12 +8485,12 @@ static void gtk_tree_view_get_background_xrange (GtkTreeView *tree_view, GtkTreeRBTree *tree, GtkTreeViewColumn *column, - gint *x1, - gint *x2) + int *x1, + int *x2) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreeViewColumn *tmp_column = NULL; - gint total_width; + int total_width; GList *list; gboolean rtl; @@ -8537,15 +8537,15 @@ gtk_tree_view_get_background_xrange (GtkTreeView *tree_view, static void gtk_tree_view_get_arrow_xrange (GtkTreeView *tree_view, GtkTreeRBTree *tree, - gint *x1, - gint *x2) + int *x1, + int *x2) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); - gint x_offset = 0; + int x_offset = 0; GList *list; GtkTreeViewColumn *tmp_column = NULL; - gint total_width; - gint expander_size, expander_render_size; + int total_width; + int expander_size, expander_render_size; gboolean rtl; rtl = (_gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL); @@ -8593,7 +8593,7 @@ static void gtk_tree_view_build_tree (GtkTreeView *tree_view, GtkTreeRBTree *tree, GtkTreeIter *iter, - gint depth, + int depth, gboolean recurse) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -8662,7 +8662,7 @@ gtk_tree_view_clamp_node_visible (GtkTreeView *tree_view, GtkTreeRBNode *node) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); - gint node_dy, height; + int node_dy, height; GtkTreePath *path = NULL; if (!gtk_widget_get_realized (GTK_WIDGET (tree_view))) @@ -8692,7 +8692,7 @@ gtk_tree_view_clamp_column_visible (GtkTreeView *tree_view, { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkAllocation allocation; - gint x, width; + int x, width; if (column == NULL) return; @@ -8756,7 +8756,7 @@ _gtk_tree_path_new_from_rbtree (GtkTreeRBTree *tree, GtkTreePath *path; GtkTreeRBTree *tmp_tree; GtkTreeRBNode *tmp_node, *last; - gint count; + int count; path = gtk_tree_path_new (); @@ -8801,9 +8801,9 @@ _gtk_tree_view_find_node (GtkTreeView *tree_view, GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreeRBNode *tmpnode = NULL; GtkTreeRBTree *tmptree = priv->tree; - gint *indices = gtk_tree_path_get_indices (path); - gint depth = gtk_tree_path_get_depth (path); - gint i = 0; + int *indices = gtk_tree_path_get_indices (path); + int depth = gtk_tree_path_get_depth (path); + int i = 0; *node = NULL; *tree = NULL; @@ -8881,7 +8881,7 @@ gtk_tree_view_add_move_binding (GtkWidgetClass *widget_class, guint modmask, gboolean add_shifted_binding, GtkMovementStep step, - gint count) + int count) { gtk_widget_class_add_binding_signal (widget_class, keyval, modmask, @@ -8909,13 +8909,13 @@ gtk_tree_view_add_move_binding (GtkWidgetClass *widget_class, "(iibb)", step, count, TRUE, TRUE); } -static gint +static int gtk_tree_view_unref_tree_helper (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeRBTree *tree, GtkTreeRBNode *node) { - gint retval = FALSE; + int retval = FALSE; do { g_return_val_if_fail (node != NULL, FALSE); @@ -8945,7 +8945,7 @@ gtk_tree_view_unref_tree_helper (GtkTreeModel *model, return retval; } -static gint +static int gtk_tree_view_unref_and_check_selection_tree (GtkTreeView *tree_view, GtkTreeRBTree *tree) { @@ -8953,7 +8953,7 @@ gtk_tree_view_unref_and_check_selection_tree (GtkTreeView *tree_view, GtkTreeIter iter; GtkTreePath *path; GtkTreeRBNode *node; - gint retval; + int retval; if (!tree) return FALSE; @@ -8980,7 +8980,7 @@ gtk_tree_view_set_column_drag_info (GtkTreeView *tree_view, GtkTreeViewColumnReorder *reorder; gboolean rtl; GList *tmp_list; - gint left; + int left; /* We want to precalculate the motion list such that we know what column slots * are available. @@ -9115,7 +9115,7 @@ _gtk_tree_view_column_start_drag (GtkTreeView *tree_view, GTK_EVENT_SEQUENCE_CLAIMED); } -static inline gint +static inline int gtk_tree_view_get_effective_header_height (GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -9227,8 +9227,8 @@ gtk_tree_view_snapshot_arrow (GtkTreeView *tree_view, GtkStateFlags state = 0; GtkStyleContext *context; GtkWidget *widget; - gint x_offset = 0; - gint x2; + int x_offset = 0; + int x2; GtkCellRendererState flags = 0; widget = GTK_WIDGET (tree_view); @@ -9360,10 +9360,10 @@ gtk_tree_view_focus_to_cursor (GtkTreeView *tree_view) static void gtk_tree_view_move_cursor_up_down (GtkTreeView *tree_view, - gint count) + int count) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); - gint selection_count; + int selection_count; GtkTreeRBTree *new_cursor_tree = NULL; GtkTreeRBNode *new_cursor_node = NULL; GtkTreePath *cursor_path = NULL; @@ -9512,7 +9512,7 @@ gtk_tree_view_move_cursor_up_down (GtkTreeView *tree_view, static void gtk_tree_view_move_cursor_page_up_down (GtkTreeView *tree_view, - gint count) + int count) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreePath *old_cursor_path = NULL; @@ -9521,8 +9521,8 @@ gtk_tree_view_move_cursor_page_up_down (GtkTreeView *tree_view, GtkTreeRBNode *start_cursor_node = NULL; GtkTreeRBTree *cursor_tree; GtkTreeRBNode *cursor_node; - gint y; - gint window_y; + int y; + int window_y; if (!gtk_widget_has_focus (GTK_WIDGET (tree_view))) return; @@ -9537,7 +9537,7 @@ gtk_tree_view_move_cursor_page_up_down (GtkTreeView *tree_view, window_y = RBTREE_Y_TO_TREE_WINDOW_Y (priv, y); y += priv->cursor_offset; y += count * (int)gtk_adjustment_get_page_increment (priv->vadjustment); - y = CLAMP (y, (gint)gtk_adjustment_get_lower (priv->vadjustment), (gint)gtk_adjustment_get_upper (priv->vadjustment)); + y = CLAMP (y, (int)gtk_adjustment_get_lower (priv->vadjustment), (int)gtk_adjustment_get_upper (priv->vadjustment)); if (y >= gtk_tree_view_get_height (tree_view)) y = gtk_tree_view_get_height (tree_view) - 1; @@ -9609,7 +9609,7 @@ cleanup: static void gtk_tree_view_move_cursor_left_right (GtkTreeView *tree_view, - gint count) + int count) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreePath *cursor_path = NULL; @@ -9706,7 +9706,7 @@ gtk_tree_view_move_cursor_left_right (GtkTreeView *tree_view, static void gtk_tree_view_move_cursor_start_end (GtkTreeView *tree_view, - gint count) + int count) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreeRBTree *cursor_tree; @@ -10165,7 +10165,7 @@ gtk_tree_view_adjustment_changed (GtkAdjustment *adjustment, if (gtk_widget_get_realized (GTK_WIDGET (tree_view))) { GtkAllocation allocation; - gint dy; + int dy; gtk_widget_get_allocation (GTK_WIDGET (tree_view), &allocation); dy = priv->dy - (int) gtk_adjustment_get_value (priv->vadjustment); @@ -10326,7 +10326,7 @@ gtk_tree_view_set_model (GtkTreeView *tree_view, if (priv->model) { - gint i; + int i; GtkTreePath *path; GtkTreeIter iter; GtkTreeModelFlags flags; @@ -10698,7 +10698,7 @@ gtk_tree_view_get_activate_on_single_click (GtkTreeView *tree_view) * * Returns: The number of columns in @tree_view after appending. **/ -gint +int gtk_tree_view_append_column (GtkTreeView *tree_view, GtkTreeViewColumn *column) { @@ -10718,7 +10718,7 @@ gtk_tree_view_append_column (GtkTreeView *tree_view, * * Returns: The number of columns in @tree_view after removing. **/ -gint +int gtk_tree_view_remove_column (GtkTreeView *tree_view, GtkTreeViewColumn *column) { @@ -10791,10 +10791,10 @@ gtk_tree_view_remove_column (GtkTreeView *tree_view, * * Returns: The number of columns in @tree_view after insertion. **/ -gint +int gtk_tree_view_insert_column (GtkTreeView *tree_view, GtkTreeViewColumn *column, - gint position) + int position) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -10860,9 +10860,9 @@ gtk_tree_view_insert_column (GtkTreeView *tree_view, * * Returns: The number of columns in @tree_view after insertion. **/ -gint +int gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view, - gint position, + int position, const gchar *title, GtkCellRenderer *cell, ...) @@ -10871,7 +10871,7 @@ gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view, GtkTreeViewColumn *column; gchar *attribute; va_list args; - gint column_id; + int column_id; g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), -1); @@ -10888,7 +10888,7 @@ gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view, while (attribute != NULL) { - column_id = va_arg (args, gint); + column_id = va_arg (args, int); gtk_tree_view_column_add_attribute (column, cell, attribute, column_id); attribute = va_arg (args, gchar *); } @@ -10917,9 +10917,9 @@ gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view, * * Returns: number of columns in the tree view post-insert **/ -gint +int gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view, - gint position, + int position, const gchar *title, GtkCellRenderer *cell, GtkTreeCellDataFunc func, @@ -10972,7 +10972,7 @@ gtk_tree_view_get_n_columns (GtkTreeView *tree_view) **/ GtkTreeViewColumn * gtk_tree_view_get_column (GtkTreeView *tree_view, - gint n) + int n) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -11168,8 +11168,8 @@ gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view, **/ void gtk_tree_view_scroll_to_point (GtkTreeView *tree_view, - gint tree_x, - gint tree_y) + int tree_x, + int tree_y) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkAdjustment *hadj; @@ -11263,7 +11263,7 @@ gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view, { GdkRectangle cell_rect; GdkRectangle vis_rect; - gint dest_x, dest_y; + int dest_x, dest_y; gtk_tree_view_get_background_area (tree_view, path, column, &cell_rect); gtk_tree_view_get_visible_rect (tree_view, &vis_rect); @@ -11402,7 +11402,7 @@ gtk_tree_view_collapse_all (GtkTreeView *tree_view) GtkTreeRBTree *tree; GtkTreeRBNode *node; GtkTreePath *path; - gint *indices; + int *indices; g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); @@ -11439,8 +11439,8 @@ void gtk_tree_view_expand_to_path (GtkTreeView *tree_view, GtkTreePath *path) { - gint i, depth; - gint *indices; + int i, depth; + int *indices; GtkTreePath *tmp; g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); @@ -12157,17 +12157,17 @@ gtk_tree_view_set_cursor_on_cell (GtkTreeView *tree_view, **/ gboolean gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view, - gint x, - gint y, + int x, + int y, GtkTreePath **path, GtkTreeViewColumn **column, - gint *cell_x, - gint *cell_y) + int *cell_x, + int *cell_y) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreeRBTree *tree; GtkTreeRBNode *node; - gint y_offset; + int y_offset; g_return_val_if_fail (tree_view != NULL, FALSE); @@ -12190,10 +12190,10 @@ gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view, GtkTreeViewColumn *tmp_column; GtkTreeViewColumn *last_column = NULL; GList *list; - gint remaining_x = x; + int remaining_x = x; gboolean found = FALSE; gboolean rtl; - gint width; + int width; rtl = (_gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL); for (list = (rtl ? g_list_last (priv->columns) : g_list_first (priv->columns)); @@ -12259,7 +12259,7 @@ gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view, } -static inline gint +static inline int gtk_tree_view_get_cell_area_height (GtkTreeView *tree_view, GtkTreeRBNode *node) { @@ -12281,7 +12281,7 @@ gtk_tree_view_get_cell_area_height (GtkTreeView *tree_view, return height; } -static inline gint +static inline int gtk_tree_view_get_cell_area_y_offset (GtkTreeView *tree_view, GtkTreeRBTree *tree, GtkTreeRBNode *node) @@ -12362,7 +12362,7 @@ gtk_tree_view_get_cell_area (GtkTreeView *tree_view, if (column && gtk_tree_view_is_expander_column (tree_view, column)) { - gint depth = gtk_tree_path_get_depth (path); + int depth = gtk_tree_path_get_depth (path); gboolean rtl; rtl = _gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL; @@ -12384,7 +12384,7 @@ gtk_tree_view_get_cell_area (GtkTreeView *tree_view, } } -static inline gint +static inline int gtk_tree_view_get_row_height (GtkTreeView *tree_view, GtkTreeRBNode *node) { @@ -12406,7 +12406,7 @@ gtk_tree_view_get_row_height (GtkTreeView *tree_view, return height; } -static inline gint +static inline int gtk_tree_view_get_row_y_offset (GtkTreeView *tree_view, GtkTreeRBTree *tree, GtkTreeRBNode *node) @@ -12469,7 +12469,7 @@ gtk_tree_view_get_background_area (GtkTreeView *tree_view, if (column) { - gint x2 = 0; + int x2 = 0; gtk_tree_view_get_background_xrange (tree_view, tree, column, &rect->x, &x2); rect->width = x2 - rect->x; @@ -12522,12 +12522,12 @@ gtk_tree_view_get_visible_rect (GtkTreeView *tree_view, **/ void gtk_tree_view_convert_widget_to_tree_coords (GtkTreeView *tree_view, - gint wx, - gint wy, - gint *tx, - gint *ty) + int wx, + int wy, + int *tx, + int *ty) { - gint x, y; + int x, y; g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); @@ -12552,12 +12552,12 @@ gtk_tree_view_convert_widget_to_tree_coords (GtkTreeView *tree_view, **/ void gtk_tree_view_convert_tree_to_widget_coords (GtkTreeView *tree_view, - gint tx, - gint ty, - gint *wx, - gint *wy) + int tx, + int ty, + int *wx, + int *wy) { - gint x, y; + int x, y; g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); @@ -12581,10 +12581,10 @@ gtk_tree_view_convert_tree_to_widget_coords (GtkTreeView *tree_view, **/ void gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view, - gint wx, - gint wy, - gint *bx, - gint *by) + int wx, + int wy, + int *bx, + int *by) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -12608,10 +12608,10 @@ gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view, **/ void gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view, - gint bx, - gint by, - gint *wx, - gint *wy) + int bx, + int by, + int *wx, + int *wy) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -12636,10 +12636,10 @@ gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view, **/ void gtk_tree_view_convert_tree_to_bin_window_coords (GtkTreeView *tree_view, - gint tx, - gint ty, - gint *bx, - gint *by) + int tx, + int ty, + int *bx, + int *by) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -12664,10 +12664,10 @@ gtk_tree_view_convert_tree_to_bin_window_coords (GtkTreeView *tree_view, **/ void gtk_tree_view_convert_bin_window_to_tree_coords (GtkTreeView *tree_view, - gint bx, - gint by, - gint *tx, - gint *ty) + int bx, + int by, + int *tx, + int *ty) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -12725,7 +12725,7 @@ gtk_tree_view_get_visible_range (GtkTreeView *tree_view, if (end_path) { - gint y; + int y; if (gtk_tree_view_get_height (tree_view) < gtk_adjustment_get_page_size (priv->vadjustment)) y = gtk_tree_view_get_height (tree_view) - 1; @@ -12779,12 +12779,12 @@ gtk_tree_view_get_visible_range (GtkTreeView *tree_view, */ gboolean gtk_tree_view_is_blank_at_pos (GtkTreeView *tree_view, - gint x, - gint y, + int x, + int y, GtkTreePath **path, GtkTreeViewColumn **column, - gint *cell_x, - gint *cell_y) + int *cell_x, + int *cell_y) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreeRBTree *tree; @@ -13040,7 +13040,7 @@ gtk_tree_view_set_drag_dest_row (GtkTreeView *tree_view, && gtk_tree_path_get_depth (path) == 1 && gtk_tree_path_get_indices (path)[0] == 0) { - gint n_children; + int n_children; n_children = gtk_tree_model_iter_n_children (priv->model, NULL); @@ -13122,14 +13122,14 @@ gtk_tree_view_get_drag_dest_row (GtkTreeView *tree_view, **/ gboolean gtk_tree_view_get_dest_row_at_pos (GtkTreeView *tree_view, - gint drag_x, - gint drag_y, + int drag_x, + int drag_y, GtkTreePath **path, GtkTreeViewDropPosition *pos) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); - gint cell_y; - gint bin_x, bin_y; + int cell_y; + int bin_x, bin_y; gdouble offset_into_row; gdouble fourth; GdkRectangle cell; @@ -13244,16 +13244,16 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view, GtkTreeRBTree *tree; GtkTreeRBNode *node; GtkStyleContext *context; - gint cell_offset; + int cell_offset; GList *list; GdkRectangle background_area; GtkWidget *widget; GtkSnapshot *snapshot; GdkPaintable *paintable; - gint depth; + int depth; /* start drawing inside the black outline */ - gint x = 1, y = 1; - gint bin_window_width; + int x = 1, y = 1; + int bin_window_width; gboolean is_separator = FALSE; gboolean rtl; @@ -13436,7 +13436,7 @@ gtk_tree_view_get_enable_search (GtkTreeView *tree_view) * * Returns: the column the interactive search code searches in. */ -gint +int gtk_tree_view_get_search_column (GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -13463,7 +13463,7 @@ gtk_tree_view_get_search_column (GtkTreeView *tree_view) */ void gtk_tree_view_set_search_column (GtkTreeView *tree_view, - gint column) + int column) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -13838,8 +13838,8 @@ gtk_tree_view_search_move (GtkWidget *popover, { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); gboolean ret; - gint len; - gint count = 0; + int len; + int count = 0; const gchar *text; GtkTreeIter iter; GtkTreeModel *model; @@ -13888,7 +13888,7 @@ gtk_tree_view_search_move (GtkWidget *popover, static gboolean gtk_tree_view_search_equal_func (GtkTreeModel *model, - gint column, + int column, const gchar *key, GtkTreeIter *iter, gpointer search_data) @@ -13947,8 +13947,8 @@ gtk_tree_view_search_iter (GtkTreeModel *model, GtkTreeSelection *selection, GtkTreeIter *iter, const gchar *text, - gint *count, - gint n) + int *count, + int n) { GtkTreeRBTree *tree = NULL; GtkTreeRBNode *node = NULL; @@ -14053,8 +14053,8 @@ gtk_tree_view_search_init (GtkWidget *entry, GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); - gint ret; - gint count = 0; + int ret; + int count = 0; const gchar *text; GtkTreeIter iter; GtkTreeModel *model; @@ -14127,7 +14127,7 @@ gtk_tree_view_start_editing (GtkTreeView *tree_view, GdkRectangle cell_area; GtkTreeViewColumn *focus_column; guint flags = 0; /* can be 0, as the flags are primarily for rendering */ - gint retval = FALSE; + int retval = FALSE; GtkTreeRBTree *cursor_tree; GtkTreeRBNode *cursor_node; @@ -14586,7 +14586,7 @@ gtk_tree_view_get_show_expanders (GtkTreeView *tree_view) */ void gtk_tree_view_set_level_indentation (GtkTreeView *tree_view, - gint indentation) + int indentation) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -14605,7 +14605,7 @@ gtk_tree_view_set_level_indentation (GtkTreeView *tree_view, * Returns: the amount of extra indentation for child levels in * @tree_view. A return value of 0 means that this feature is disabled. */ -gint +int gtk_tree_view_get_level_indentation (GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -14675,7 +14675,7 @@ gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view, if (column && cell) { GdkRectangle tmp; - gint start, width; + int start, width; /* We always pass in path here, whether it is NULL or not. * For cells in expander columns path must be specified so that @@ -14755,8 +14755,8 @@ gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view, */ gboolean gtk_tree_view_get_tooltip_context (GtkTreeView *tree_view, - gint *x, - gint *y, + int *x, + int *y, gboolean keyboard_tip, GtkTreeModel **model, GtkTreePath **path, @@ -14802,8 +14802,8 @@ gtk_tree_view_get_tooltip_context (GtkTreeView *tree_view, static gboolean gtk_tree_view_set_tooltip_query_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) @@ -14872,7 +14872,7 @@ gtk_tree_view_set_tooltip_query_cb (GtkWidget *widget, */ void gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view, - gint column) + int column) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -14912,7 +14912,7 @@ gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view, * Returns: the index of the tooltip column that is currently being * used, or -1 if this is disabled. */ -gint +int gtk_tree_view_get_tooltip_column (GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); diff --git a/gtk/gtktreeview.h b/gtk/gtktreeview.h index 1678b02495..cd378de86a 100644 --- a/gtk/gtktreeview.h +++ b/gtk/gtktreeview.h @@ -115,7 +115,7 @@ typedef void (* GtkTreeViewMappingFunc) (GtkTreeView *tree_vi * Returns: %FALSE if the row matches, %TRUE otherwise. */ typedef gboolean (*GtkTreeViewSearchEqualFunc) (GtkTreeModel *model, - gint column, + int column, const gchar *key, GtkTreeIter *iter, gpointer search_data); @@ -167,7 +167,7 @@ struct _GtkTreeViewClass /* Key Binding signals */ gboolean (* move_cursor) (GtkTreeView *tree_view, GtkMovementStep step, - gint count, + int count, gboolean extend, gboolean modify); gboolean (* select_all) (GtkTreeView *tree_view); @@ -224,24 +224,24 @@ void gtk_tree_view_set_activate_on_single_click (GtkTreeView /* Column functions */ GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_append_column (GtkTreeView *tree_view, +int gtk_tree_view_append_column (GtkTreeView *tree_view, GtkTreeViewColumn *column); GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_remove_column (GtkTreeView *tree_view, +int gtk_tree_view_remove_column (GtkTreeView *tree_view, GtkTreeViewColumn *column); GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_insert_column (GtkTreeView *tree_view, +int gtk_tree_view_insert_column (GtkTreeView *tree_view, GtkTreeViewColumn *column, - gint position); + int position); GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view, - gint position, +int gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view, + int position, const gchar *title, GtkCellRenderer *cell, ...) G_GNUC_NULL_TERMINATED; GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view, - gint position, +int gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view, + int position, const gchar *title, GtkCellRenderer *cell, GtkTreeCellDataFunc func, @@ -252,7 +252,7 @@ GDK_AVAILABLE_IN_ALL guint gtk_tree_view_get_n_columns (GtkTreeView *tree_view); GDK_AVAILABLE_IN_ALL GtkTreeViewColumn *gtk_tree_view_get_column (GtkTreeView *tree_view, - gint n); + int n); GDK_AVAILABLE_IN_ALL GList *gtk_tree_view_get_columns (GtkTreeView *tree_view); GDK_AVAILABLE_IN_ALL @@ -273,8 +273,8 @@ void gtk_tree_view_set_column_drag_function (GtkTreeView /* Actions */ GDK_AVAILABLE_IN_ALL void gtk_tree_view_scroll_to_point (GtkTreeView *tree_view, - gint tree_x, - gint tree_y); + int tree_x, + int tree_y); GDK_AVAILABLE_IN_ALL void gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view, GtkTreePath *path, @@ -332,12 +332,12 @@ void gtk_tree_view_get_cursor (GtkTreeView /* Layout information */ GDK_AVAILABLE_IN_ALL gboolean gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view, - gint x, - gint y, + int x, + int y, GtkTreePath **path, GtkTreeViewColumn **column, - gint *cell_x, - gint *cell_y); + int *cell_x, + int *cell_y); GDK_AVAILABLE_IN_ALL void gtk_tree_view_get_cell_area (GtkTreeView *tree_view, GtkTreePath *path, @@ -357,12 +357,12 @@ gboolean gtk_tree_view_get_visible_range (GtkTreeView GtkTreePath **end_path); GDK_AVAILABLE_IN_ALL gboolean gtk_tree_view_is_blank_at_pos (GtkTreeView *tree_view, - gint x, - gint y, + int x, + int y, GtkTreePath **path, GtkTreeViewColumn **column, - gint *cell_x, - gint *cell_y); + int *cell_x, + int *cell_y); /* Drag-and-Drop support */ GDK_AVAILABLE_IN_ALL @@ -391,8 +391,8 @@ void gtk_tree_view_get_drag_dest_row (GtkTreeView GtkTreeViewDropPosition *pos); GDK_AVAILABLE_IN_ALL gboolean gtk_tree_view_get_dest_row_at_pos (GtkTreeView *tree_view, - gint drag_x, - gint drag_y, + int drag_x, + int drag_y, GtkTreePath **path, GtkTreeViewDropPosition *pos); GDK_AVAILABLE_IN_ALL @@ -406,10 +406,10 @@ void gtk_tree_view_set_enable_search (GtkTreeView GDK_AVAILABLE_IN_ALL gboolean gtk_tree_view_get_enable_search (GtkTreeView *tree_view); GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_get_search_column (GtkTreeView *tree_view); +int gtk_tree_view_get_search_column (GtkTreeView *tree_view); GDK_AVAILABLE_IN_ALL void gtk_tree_view_set_search_column (GtkTreeView *tree_view, - gint column); + int column); GDK_AVAILABLE_IN_ALL GtkTreeViewSearchEqualFunc gtk_tree_view_get_search_equal_func (GtkTreeView *tree_view); GDK_AVAILABLE_IN_ALL @@ -427,40 +427,40 @@ void gtk_tree_view_set_search_entry (GtkTreeVie /* Convert between the different coordinate systems */ GDK_AVAILABLE_IN_ALL void gtk_tree_view_convert_widget_to_tree_coords (GtkTreeView *tree_view, - gint wx, - gint wy, - gint *tx, - gint *ty); + int wx, + int wy, + int *tx, + int *ty); GDK_AVAILABLE_IN_ALL void gtk_tree_view_convert_tree_to_widget_coords (GtkTreeView *tree_view, - gint tx, - gint ty, - gint *wx, - gint *wy); + int tx, + int ty, + int *wx, + int *wy); GDK_AVAILABLE_IN_ALL void gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view, - gint wx, - gint wy, - gint *bx, - gint *by); + int wx, + int wy, + int *bx, + int *by); GDK_AVAILABLE_IN_ALL void gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view, - gint bx, - gint by, - gint *wx, - gint *wy); + int bx, + int by, + int *wx, + int *wy); GDK_AVAILABLE_IN_ALL void gtk_tree_view_convert_tree_to_bin_window_coords (GtkTreeView *tree_view, - gint tx, - gint ty, - gint *bx, - gint *by); + int tx, + int ty, + int *bx, + int *by); GDK_AVAILABLE_IN_ALL void gtk_tree_view_convert_bin_window_to_tree_coords (GtkTreeView *tree_view, - gint bx, - gint by, - gint *tx, - gint *ty); + int bx, + int by, + int *tx, + int *ty); GDK_AVAILABLE_IN_ALL void gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view, @@ -511,9 +511,9 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_tree_view_get_show_expanders (GtkTreeView *tree_view); GDK_AVAILABLE_IN_ALL void gtk_tree_view_set_level_indentation (GtkTreeView *tree_view, - gint indentation); + int indentation); GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_get_level_indentation (GtkTreeView *tree_view); +int gtk_tree_view_get_level_indentation (GtkTreeView *tree_view); /* Convenience functions for setting tooltips */ GDK_AVAILABLE_IN_ALL @@ -528,17 +528,17 @@ void gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view, GtkCellRenderer *cell); GDK_AVAILABLE_IN_ALL gboolean gtk_tree_view_get_tooltip_context(GtkTreeView *tree_view, - gint *x, - gint *y, + int *x, + int *y, gboolean keyboard_tip, GtkTreeModel **model, GtkTreePath **path, GtkTreeIter *iter); GDK_AVAILABLE_IN_ALL void gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view, - gint column); + int column); GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_get_tooltip_column (GtkTreeView *tree_view); +int gtk_tree_view_get_tooltip_column (GtkTreeView *tree_view); G_END_DECLS diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 2cd41084b1..f9dc51f799 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -166,23 +166,23 @@ struct _GtkTreeViewColumnPrivate /* Sizing fields */ /* see gtk+/doc/tree-column-sizing.txt for more information on them */ GtkTreeViewColumnSizing column_type; - gint padding; - gint x_offset; - gint width; - gint fixed_width; - gint min_width; - gint max_width; + int padding; + int x_offset; + int width; + int fixed_width; + int min_width; + int max_width; /* dragging columns */ - gint drag_x; - gint drag_y; + int drag_x; + int drag_y; gchar *title; /* Sorting */ gulong sort_clicked_signal; gulong sort_column_changed_signal; - gint sort_column_id; + int sort_column_id; GtkSortType sort_order; /* Cell area */ @@ -904,7 +904,7 @@ static void gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column) { GtkTreeViewColumnPrivate *priv = tree_column->priv; - gint sort_column_id = -1; + int sort_column_id = -1; GtkWidget *hbox; GtkWidget *frame; GtkWidget *arrow; @@ -1112,7 +1112,7 @@ gtk_tree_view_model_sort_column_changed (GtkTreeSortable *sortable, GtkTreeViewColumn *column) { GtkTreeViewColumnPrivate *priv = column->priv; - gint sort_column_id; + int sort_column_id; GtkSortType order; if (gtk_tree_sortable_get_sort_column_id (sortable, @@ -1142,7 +1142,7 @@ gtk_tree_view_column_sort (GtkTreeViewColumn *tree_column, GtkTreeViewColumnPrivate *priv = tree_column->priv; GtkTreeModel *model; GtkTreeSortable *sortable; - gint sort_column_id; + int sort_column_id; GtkSortType order; gboolean has_sort_column; gboolean has_default_sort_func; @@ -1200,7 +1200,7 @@ gtk_tree_view_column_setup_sort_column_id_callback (GtkTreeViewColumn *tree_colu if (GTK_IS_TREE_SORTABLE (model) && priv->sort_column_id != -1) { - gint real_sort_column_id; + int real_sort_column_id; GtkSortType real_order; if (priv->sort_column_changed_signal == 0) @@ -1403,8 +1403,8 @@ GtkCellRenderer * _gtk_tree_view_column_get_cell_at_pos (GtkTreeViewColumn *column, GdkRectangle *cell_area, GdkRectangle *background_area, - gint x, - gint y) + int x, + int y) { GtkCellRenderer *match = NULL; GtkTreeViewColumnPrivate *priv = column->priv; @@ -1448,8 +1448,8 @@ gboolean _gtk_tree_view_column_is_blank_at_pos (GtkTreeViewColumn *column, GdkRectangle *cell_area, GdkRectangle *background_area, - gint x, - gint y) + int x, + int y) { GtkCellRenderer *match; GdkRectangle cell_alloc, aligned_area, inner_area; @@ -1637,7 +1637,7 @@ void gtk_tree_view_column_add_attribute (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, const gchar *attribute, - gint column) + int column) { gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (tree_column), cell_renderer, attribute, column); @@ -1650,7 +1650,7 @@ gtk_tree_view_column_set_attributesv (GtkTreeViewColumn *tree_column, { GtkTreeViewColumnPrivate *priv = tree_column->priv; gchar *attribute; - gint column; + int column; attribute = va_arg (args, gchar *); @@ -1659,7 +1659,7 @@ gtk_tree_view_column_set_attributesv (GtkTreeViewColumn *tree_column, while (attribute != NULL) { - column = va_arg (args, gint); + column = va_arg (args, int); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (priv->cell_area), cell_renderer, attribute, column); attribute = va_arg (args, gchar *); @@ -1747,7 +1747,7 @@ gtk_tree_view_column_clear_attributes (GtkTreeViewColumn *tree_column, **/ void gtk_tree_view_column_set_spacing (GtkTreeViewColumn *tree_column, - gint spacing) + int spacing) { GtkTreeViewColumnPrivate *priv; @@ -1773,7 +1773,7 @@ gtk_tree_view_column_set_spacing (GtkTreeViewColumn *tree_column, * * Returns: the spacing of @tree_column. **/ -gint +int gtk_tree_view_column_get_spacing (GtkTreeViewColumn *tree_column) { GtkTreeViewColumnPrivate *priv; @@ -1947,7 +1947,7 @@ gtk_tree_view_column_get_sizing (GtkTreeViewColumn *tree_column) * * Returns: The current width of @tree_column. **/ -gint +int gtk_tree_view_column_get_width (GtkTreeViewColumn *tree_column) { g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), 0); @@ -1963,7 +1963,7 @@ gtk_tree_view_column_get_width (GtkTreeViewColumn *tree_column) * * Returns: The current X offset of @tree_column. */ -gint +int gtk_tree_view_column_get_x_offset (GtkTreeViewColumn *tree_column) { g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), 0); @@ -1971,11 +1971,11 @@ gtk_tree_view_column_get_x_offset (GtkTreeViewColumn *tree_column) return tree_column->priv->x_offset; } -gint +int _gtk_tree_view_column_request_width (GtkTreeViewColumn *tree_column) { GtkTreeViewColumnPrivate *priv; - gint real_requested_width; + int real_requested_width; priv = tree_column->priv; @@ -1985,8 +1985,8 @@ _gtk_tree_view_column_request_width (GtkTreeViewColumn *tree_column) } else if (gtk_tree_view_get_headers_visible (GTK_TREE_VIEW (priv->tree_view))) { - gint button_request; - gint requested_width; + int button_request; + int requested_width; gtk_cell_area_context_get_preferred_width (priv->cell_area_context, &requested_width, NULL); requested_width += priv->padding; @@ -1997,7 +1997,7 @@ _gtk_tree_view_column_request_width (GtkTreeViewColumn *tree_column) } else { - gint requested_width; + int requested_width; gtk_cell_area_context_get_preferred_width (priv->cell_area_context, &requested_width, NULL); requested_width += priv->padding; @@ -2073,7 +2073,7 @@ _gtk_tree_view_column_allocate (GtkTreeViewColumn *tree_column, **/ void gtk_tree_view_column_set_fixed_width (GtkTreeViewColumn *tree_column, - gint fixed_width) + int fixed_width) { GtkTreeViewColumnPrivate *priv; @@ -2103,7 +2103,7 @@ gtk_tree_view_column_set_fixed_width (GtkTreeViewColumn *tree_column, * * Returns: The fixed width of the column. **/ -gint +int gtk_tree_view_column_get_fixed_width (GtkTreeViewColumn *tree_column) { g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), 0); @@ -2121,7 +2121,7 @@ gtk_tree_view_column_get_fixed_width (GtkTreeViewColumn *tree_column) **/ void gtk_tree_view_column_set_min_width (GtkTreeViewColumn *tree_column, - gint min_width) + int min_width) { GtkTreeViewColumnPrivate *priv; @@ -2165,7 +2165,7 @@ gtk_tree_view_column_set_min_width (GtkTreeViewColumn *tree_column, * * Returns: The minimum width of the @tree_column. **/ -gint +int gtk_tree_view_column_get_min_width (GtkTreeViewColumn *tree_column) { g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), -1); @@ -2185,7 +2185,7 @@ gtk_tree_view_column_get_min_width (GtkTreeViewColumn *tree_column) **/ void gtk_tree_view_column_set_max_width (GtkTreeViewColumn *tree_column, - gint max_width) + int max_width) { GtkTreeViewColumnPrivate *priv; @@ -2229,7 +2229,7 @@ gtk_tree_view_column_set_max_width (GtkTreeViewColumn *tree_column, * * Returns: The maximum width of the @tree_column. **/ -gint +int gtk_tree_view_column_get_max_width (GtkTreeViewColumn *tree_column) { g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), -1); @@ -2548,7 +2548,7 @@ gtk_tree_view_column_get_reorderable (GtkTreeViewColumn *tree_column) **/ void gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column, - gint sort_column_id) + int sort_column_id) { GtkTreeViewColumnPrivate *priv; @@ -2609,7 +2609,7 @@ gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column, * Returns: the current @sort_column_id for this column, or -1 if * this column can’t be used for sorting. **/ -gint +int gtk_tree_view_column_get_sort_column_id (GtkTreeViewColumn *tree_column) { g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), 0); @@ -2755,7 +2755,7 @@ gtk_tree_view_column_cell_get_size (GtkTreeViewColumn *tree_column, int *height) { GtkTreeViewColumnPrivate *priv; - gint min_width = 0, min_height = 0; + int min_width = 0, min_height = 0; g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column)); @@ -2948,8 +2948,8 @@ _gtk_tree_view_column_cell_get_dirty (GtkTreeViewColumn *tree_column) gboolean gtk_tree_view_column_cell_get_position (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, - gint *x_offset, - gint *width) + int *x_offset, + int *width) { GtkTreeViewColumnPrivate *priv; GdkRectangle cell_area; @@ -3035,22 +3035,22 @@ gtk_tree_view_column_get_button (GtkTreeViewColumn *tree_column) void _gtk_tree_view_column_push_padding (GtkTreeViewColumn *column, - gint padding) + int padding) { column->priv->padding = MAX (column->priv->padding, padding); } -gint +int _gtk_tree_view_column_get_requested_width (GtkTreeViewColumn *column) { - gint requested_width; + int requested_width; gtk_cell_area_context_get_preferred_width (column->priv->cell_area_context, &requested_width, NULL); return requested_width + column->priv->padding; } -gint +int _gtk_tree_view_column_get_drag_x (GtkTreeViewColumn *column) { return column->priv->drag_x; diff --git a/gtk/gtktreeviewcolumn.h b/gtk/gtktreeviewcolumn.h index c9dc183592..67b025aedb 100644 --- a/gtk/gtktreeviewcolumn.h +++ b/gtk/gtktreeviewcolumn.h @@ -100,7 +100,7 @@ GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_add_attribute (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, const gchar *attribute, - gint column); + int column); GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_set_attributes (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, @@ -116,9 +116,9 @@ void gtk_tree_view_column_clear_attributes (GtkTreeViewCol GtkCellRenderer *cell_renderer); GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_set_spacing (GtkTreeViewColumn *tree_column, - gint spacing); + int spacing); GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_column_get_spacing (GtkTreeViewColumn *tree_column); +int gtk_tree_view_column_get_spacing (GtkTreeViewColumn *tree_column); GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_set_visible (GtkTreeViewColumn *tree_column, gboolean visible); @@ -135,24 +135,24 @@ void gtk_tree_view_column_set_sizing (GtkTreeViewCol GDK_AVAILABLE_IN_ALL GtkTreeViewColumnSizing gtk_tree_view_column_get_sizing (GtkTreeViewColumn *tree_column); GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_column_get_x_offset (GtkTreeViewColumn *tree_column); +int gtk_tree_view_column_get_x_offset (GtkTreeViewColumn *tree_column); GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_column_get_width (GtkTreeViewColumn *tree_column); +int gtk_tree_view_column_get_width (GtkTreeViewColumn *tree_column); GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_column_get_fixed_width (GtkTreeViewColumn *tree_column); +int gtk_tree_view_column_get_fixed_width (GtkTreeViewColumn *tree_column); GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_set_fixed_width (GtkTreeViewColumn *tree_column, - gint fixed_width); + int fixed_width); GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_set_min_width (GtkTreeViewColumn *tree_column, - gint min_width); + int min_width); GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_column_get_min_width (GtkTreeViewColumn *tree_column); +int gtk_tree_view_column_get_min_width (GtkTreeViewColumn *tree_column); GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_set_max_width (GtkTreeViewColumn *tree_column, - gint max_width); + int max_width); GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_column_get_max_width (GtkTreeViewColumn *tree_column); +int gtk_tree_view_column_get_max_width (GtkTreeViewColumn *tree_column); GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_clicked (GtkTreeViewColumn *tree_column); @@ -198,9 +198,9 @@ gboolean gtk_tree_view_column_get_reorderable (GtkTreeViewCol */ GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column, - gint sort_column_id); + int sort_column_id); GDK_AVAILABLE_IN_ALL -gint gtk_tree_view_column_get_sort_column_id (GtkTreeViewColumn *tree_column); +int gtk_tree_view_column_get_sort_column_id (GtkTreeViewColumn *tree_column); GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_set_sort_indicator (GtkTreeViewColumn *tree_column, gboolean setting); @@ -235,8 +235,8 @@ void gtk_tree_view_column_focus_cell (GtkTreeViewCol GDK_AVAILABLE_IN_ALL gboolean gtk_tree_view_column_cell_get_position (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, - gint *x_offset, - gint *width); + int *x_offset, + int *width); GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_queue_resize (GtkTreeViewColumn *tree_column); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkvolumebutton.c b/gtk/gtkvolumebutton.c index 85a79f554f..badbba2f55 100644 --- a/gtk/gtkvolumebutton.c +++ b/gtk/gtkvolumebutton.c @@ -79,8 +79,8 @@ enum }; static gboolean cb_query_tooltip (GtkWidget *button, - gint x, - gint y, + int x, + int y, gboolean keyboard_mode, GtkTooltip *tooltip, gpointer user_data); @@ -214,8 +214,8 @@ gtk_volume_button_new (void) static gboolean cb_query_tooltip (GtkWidget *button, - gint x, - gint y, + int x, + int y, gboolean keyboard_mode, GtkTooltip *tooltip, gpointer user_data) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 06f95b3e86..df02699f07 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -548,7 +548,7 @@ struct _GtkStateData guint flags_to_set; guint flags_to_unset; - gint old_scale_factor; + int old_scale_factor; }; /* --- prototypes --- */ @@ -584,8 +584,8 @@ static void gtk_widget_real_direction_changed(GtkWidget *widget, GtkTextDirection previous_direction); static gboolean gtk_widget_real_query_tooltip (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip); static void gtk_widget_real_css_changed (GtkWidget *widget, @@ -659,8 +659,8 @@ static GtkSizeRequestMode gtk_widget_real_get_request_mode (GtkWidget static void template_data_free (GtkWidgetTemplate*template_data); static void gtk_widget_set_usize_internal (GtkWidget *widget, - gint width, - gint height); + int width, + int height); static gboolean event_surface_is_still_viewable (GdkEvent *event); @@ -673,7 +673,7 @@ static void gtk_widget_queue_compute_expand (GtkWidget *widget); /* --- variables --- */ -static gint GtkWidget_private_offset = 0; +static int GtkWidget_private_offset = 0; static gpointer gtk_widget_parent_class = NULL; static guint widget_signals[LAST_SIGNAL] = { 0 }; GtkTextDirection gtk_default_direction = GTK_TEXT_DIR_LTR; @@ -2097,7 +2097,7 @@ gtk_widget_needs_press_emulation (GtkWidget *widget, return !sequence_press_handled; } -static gint +static int _gtk_widget_set_sequence_state_internal (GtkWidget *widget, GdkEventSequence *sequence, GtkEventSequenceState state, @@ -2109,7 +2109,7 @@ _gtk_widget_set_sequence_state_internal (GtkWidget *widget, GtkWidget *target; GList *group = NULL; GdkEventSequence *seq; - gint n_handled = 0; + int n_handled = 0; guint i; if (state != GTK_EVENT_SEQUENCE_CLAIMED && @@ -3582,7 +3582,7 @@ gtk_widget_get_frame_clock (GtkWidget *widget) } } -static gint +static int get_number (GtkCssValue *value) { double d = _gtk_css_number_value_get (value, 100); @@ -3672,9 +3672,9 @@ effective_align (GtkAlign align, static void adjust_for_align (GtkAlign align, - gint natural_size, - gint *allocated_pos, - gint *allocated_size) + int natural_size, + int *allocated_pos, + int *allocated_size) { switch (align) { @@ -3709,8 +3709,8 @@ gtk_widget_adjust_size_allocation (GtkWidget *widget, GtkAllocation *allocation) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); - gint natural_width, natural_height; - gint min_width, min_height; + int natural_width, natural_height; + int min_width, min_height; if (priv->halign == GTK_ALIGN_FILL && priv->valign == GTK_ALIGN_FILL) return; @@ -3969,8 +3969,8 @@ gtk_widget_common_ancestor (GtkWidget *widget_a, { GtkWidget *parent_a; GtkWidget *parent_b; - gint depth_a = 0; - gint depth_b = 0; + int depth_a = 0; + int depth_b = 0; parent_a = widget_a; while (parent_a->priv->parent) @@ -4636,8 +4636,8 @@ gtk_widget_grab_focus_child (GtkWidget *widget) static gboolean gtk_widget_real_query_tooltip (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip) { @@ -4660,8 +4660,8 @@ gtk_widget_real_query_tooltip (GtkWidget *widget, gboolean gtk_widget_query_tooltip (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_mode, GtkTooltip *tooltip) { @@ -6462,7 +6462,7 @@ _gtk_widget_scale_changed (GtkWidget *widget) * * Returns: the scale factor for @widget */ -gint +int gtk_widget_get_scale_factor (GtkWidget *widget) { GtkRoot *root; @@ -6655,8 +6655,8 @@ gtk_widget_error_bell (GtkWidget *widget) static void gtk_widget_set_usize_internal (GtkWidget *widget, - gint width, - gint height) + int width, + int height) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); gboolean changed = FALSE; @@ -6723,8 +6723,8 @@ gtk_widget_set_usize_internal (GtkWidget *widget, **/ void gtk_widget_set_size_request (GtkWidget *widget, - gint width, - gint height) + int width, + int height) { g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (width >= -1); @@ -6750,8 +6750,8 @@ gtk_widget_set_size_request (GtkWidget *widget, **/ void gtk_widget_get_size_request (GtkWidget *widget, - gint *width, - gint *height) + int *width, + int *height) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); @@ -7427,8 +7427,8 @@ gtk_widget_real_unrealize (GtkWidget *widget) void gtk_widget_adjust_size_request (GtkWidget *widget, GtkOrientation orientation, - gint *minimum_size, - gint *natural_size) + int *minimum_size, + int *natural_size) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); @@ -7457,8 +7457,8 @@ gtk_widget_adjust_size_request (GtkWidget *widget, void gtk_widget_adjust_baseline_request (GtkWidget *widget, - gint *minimum_baseline, - gint *natural_baseline) + int *minimum_baseline, + int *natural_baseline) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); @@ -7564,7 +7564,7 @@ gtk_widget_propagate_state (GtkWidget *widget, GtkStateFlags new_flags, old_flags = priv->state_flags; GtkStateData child_data; GtkWidget *child; - gint new_scale_factor = gtk_widget_get_scale_factor (widget); + int new_scale_factor = gtk_widget_get_scale_factor (widget); priv->state_flags |= data->flags_to_set; priv->state_flags &= ~(data->flags_to_unset); @@ -7996,8 +7996,8 @@ gtk_widget_set_expand (GtkWidget *widget, gboolean expand) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); - gint expand_prop; - gint expand_set_prop; + int expand_prop; + int expand_set_prop; g_return_if_fail (GTK_IS_WIDGET (widget)); @@ -8042,7 +8042,7 @@ gtk_widget_set_expand_set (GtkWidget *widget, gboolean set) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); - gint prop; + int prop; set = set != FALSE; @@ -8393,8 +8393,8 @@ typedef struct { gchar *target; AtkRelationType type; - gint line; - gint col; + int line; + int col; } AtkRelationData; static void @@ -8955,7 +8955,7 @@ gtk_widget_buildable_custom_finished (GtkBuildable *buildable, { AtkObject *accessible; AtkAction *action; - gint i, n_actions; + int i, n_actions; GSList *l; accessible = gtk_widget_get_accessible (GTK_WIDGET (buildable)); @@ -9156,7 +9156,7 @@ gtk_widget_set_valign (GtkWidget *widget, * * Returns: The start margin of @widget */ -gint +int gtk_widget_get_margin_start (GtkWidget *widget) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); @@ -9176,7 +9176,7 @@ gtk_widget_get_margin_start (GtkWidget *widget) */ void gtk_widget_set_margin_start (GtkWidget *widget, - gint margin) + int margin) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); @@ -9201,7 +9201,7 @@ gtk_widget_set_margin_start (GtkWidget *widget, * * Returns: The end margin of @widget */ -gint +int gtk_widget_get_margin_end (GtkWidget *widget) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); @@ -9221,7 +9221,7 @@ gtk_widget_get_margin_end (GtkWidget *widget) */ void gtk_widget_set_margin_end (GtkWidget *widget, - gint margin) + int margin) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); @@ -9246,7 +9246,7 @@ gtk_widget_set_margin_end (GtkWidget *widget, * * Returns: The top margin of @widget */ -gint +int gtk_widget_get_margin_top (GtkWidget *widget) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); @@ -9266,7 +9266,7 @@ gtk_widget_get_margin_top (GtkWidget *widget) */ void gtk_widget_set_margin_top (GtkWidget *widget, - gint margin) + int margin) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); @@ -9289,7 +9289,7 @@ gtk_widget_set_margin_top (GtkWidget *widget, * * Returns: The bottom margin of @widget */ -gint +int gtk_widget_get_margin_bottom (GtkWidget *widget) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); @@ -9309,7 +9309,7 @@ gtk_widget_get_margin_bottom (GtkWidget *widget) */ void gtk_widget_set_margin_bottom (GtkWidget *widget, - gint margin) + int margin) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index cf812b9b26..afebe81037 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -108,8 +108,8 @@ typedef gboolean (*GtkTickCallback) (GtkWidget *widget, */ struct _GtkRequisition { - gint width; - gint height; + int width; + int height; }; /* The widget is the base of the tree for displayable objects. @@ -256,8 +256,8 @@ struct _GtkWidgetClass AtkObject * (* get_accessible) (GtkWidget *widget); gboolean (* query_tooltip) (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tooltip, GtkTooltip *tooltip); @@ -529,12 +529,12 @@ void gtk_widget_error_bell (GtkWidget *widget); GDK_AVAILABLE_IN_ALL void gtk_widget_set_size_request (GtkWidget *widget, - gint width, - gint height); + int width, + int height); GDK_AVAILABLE_IN_ALL void gtk_widget_get_size_request (GtkWidget *widget, - gint *width, - gint *height); + int *width, + int *height); GDK_AVAILABLE_IN_ALL void gtk_widget_set_opacity (GtkWidget *widget, double opacity); @@ -551,7 +551,7 @@ GtkWidget* gtk_widget_get_ancestor (GtkWidget *widget, GType widget_type); GDK_AVAILABLE_IN_ALL -gint gtk_widget_get_scale_factor (GtkWidget *widget); +int gtk_widget_get_scale_factor (GtkWidget *widget); GDK_AVAILABLE_IN_ALL GdkDisplay * gtk_widget_get_display (GtkWidget *widget); GDK_AVAILABLE_IN_ALL @@ -610,25 +610,25 @@ GDK_AVAILABLE_IN_ALL void gtk_widget_set_valign (GtkWidget *widget, GtkAlign align); GDK_AVAILABLE_IN_ALL -gint gtk_widget_get_margin_start (GtkWidget *widget); +int gtk_widget_get_margin_start (GtkWidget *widget); GDK_AVAILABLE_IN_ALL void gtk_widget_set_margin_start (GtkWidget *widget, - gint margin); + int margin); GDK_AVAILABLE_IN_ALL -gint gtk_widget_get_margin_end (GtkWidget *widget); +int gtk_widget_get_margin_end (GtkWidget *widget); GDK_AVAILABLE_IN_ALL void gtk_widget_set_margin_end (GtkWidget *widget, - gint margin); + int margin); GDK_AVAILABLE_IN_ALL -gint gtk_widget_get_margin_top (GtkWidget *widget); +int gtk_widget_get_margin_top (GtkWidget *widget); GDK_AVAILABLE_IN_ALL void gtk_widget_set_margin_top (GtkWidget *widget, - gint margin); + int margin); GDK_AVAILABLE_IN_ALL -gint gtk_widget_get_margin_bottom (GtkWidget *widget); +int gtk_widget_get_margin_bottom (GtkWidget *widget); GDK_AVAILABLE_IN_ALL void gtk_widget_set_margin_bottom (GtkWidget *widget, - gint margin); + int margin); GDK_AVAILABLE_IN_ALL gboolean gtk_widget_is_ancestor (GtkWidget *widget, diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h index d674b9867d..47b3a531d7 100644 --- a/gtk/gtkwidgetprivate.h +++ b/gtk/gtkwidgetprivate.h @@ -150,7 +150,7 @@ struct _GtkWidgetPrivate GskTransform *allocated_transform; int allocated_width; int allocated_height; - gint allocated_size_baseline; + int allocated_size_baseline; GskTransform *transform; int width; @@ -289,8 +289,8 @@ GtkEventController **gtk_widget_list_controllers (GtkWidget guint *out_n_controllers); gboolean gtk_widget_query_tooltip (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_mode, GtkTooltip *tooltip); @@ -298,11 +298,11 @@ void gtk_widget_snapshot (GtkWidget GtkSnapshot *snapshot); void gtk_widget_adjust_size_request (GtkWidget *widget, GtkOrientation orientation, - gint *minimum_size, - gint *natural_size); + int *minimum_size, + int *natural_size); void gtk_widget_adjust_baseline_request (GtkWidget *widget, - gint *minimum_baseline, - gint *natural_baseline); + int *minimum_baseline, + int *natural_baseline); void gtk_widget_forall (GtkWidget *widget, GtkCallback callback, diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index c2591b90c1..84042052eb 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -196,9 +196,9 @@ typedef struct guint focus_visible_timeout; - gint scale; + int scale; - gint title_height; + int title_height; GtkWidget *title_box; GtkWidget *titlebar; GtkWidget *key_press_focus; @@ -336,14 +336,14 @@ struct _GtkWindowGeometryInfo /* from last gtk_window_resize () - if > 0, indicates that * we should resize to this size. */ - gint resize_width; - gint resize_height; + int resize_width; + int resize_height; /* Default size - used only the FIRST time we map a window, * only if > 0. */ - gint default_width; - gint default_height; + int default_width; + int default_height; GtkWindowLastGeometryInfo last; }; @@ -389,7 +389,7 @@ static gboolean surface_event (GdkSurface *surface, GdkEvent *event, GtkWidget *widget); -static gint gtk_window_focus (GtkWidget *widget, +static int gtk_window_focus (GtkWidget *widget, GtkDirectionType direction); static void gtk_window_move_focus (GtkWidget *widget, GtkDirectionType dir); @@ -416,14 +416,14 @@ static gboolean gtk_window_compare_hints (GdkGeometry *geometry_a, static void gtk_window_constrain_size (GtkWindow *window, GdkGeometry *geometry, guint flags, - gint width, - gint height, - gint *new_width, - gint *new_height); + int width, + int height, + int *new_width, + int *new_height); static void gtk_window_update_fixed_size (GtkWindow *window, GdkGeometry *new_geometry, - gint new_width, - gint new_height); + int new_width, + int new_height); static void gtk_window_compute_hints (GtkWindow *window, GdkGeometry *new_geometry, guint *new_flags); @@ -434,9 +434,9 @@ static void gtk_window_compute_configure_request (GtkWindow *window, static void gtk_window_set_default_size_internal (GtkWindow *window, gboolean change_width, - gint width, + int width, gboolean change_height, - gint height); + int height); static void update_themed_icon (GtkWindow *window); static GList *icon_list_from_theme (GtkWindow *window, @@ -1210,7 +1210,7 @@ constraints_for_edge (GdkSurfaceEdge edge) } } -static gint +static int get_number (GtkCssValue *value) { double d = _gtk_css_number_value_get (value, 100); @@ -1321,7 +1321,7 @@ get_edge_for_coordinates (GtkWindow *window, static void click_gesture_pressed_cb (GtkGestureClick *gesture, - gint n_press, + int n_press, gdouble x, gdouble y, GtkWindow *window) @@ -3063,8 +3063,8 @@ icon_list_from_theme (GtkWindow *window, GtkIconTheme *icon_theme; GtkIconPaintable *info; GdkTexture *texture; - gint *sizes; - gint i; + int *sizes; + int i; icon_theme = gtk_icon_theme_get_for_display (priv->display); @@ -3311,13 +3311,13 @@ gtk_window_get_default_icon_name (void) static void gtk_window_update_csd_size (GtkWindow *window, - gint *width, - gint *height, - gint apply) + int *width, + int *height, + int apply) { GtkWindowPrivate *priv = gtk_window_get_instance_private (window); GtkBorder window_border = { 0 }; - gint w, h; + int w, h; if (!priv->decorated || priv->fullscreen) @@ -3331,8 +3331,8 @@ gtk_window_update_csd_size (GtkWindow *window, gtk_widget_get_visible (priv->title_box) && gtk_widget_get_child_visible (priv->title_box)) { - gint minimum_height; - gint natural_height; + int minimum_height; + int natural_height; gtk_widget_measure (priv->title_box, GTK_ORIENTATION_VERTICAL, -1, &minimum_height, &natural_height, @@ -3356,9 +3356,9 @@ gtk_window_update_csd_size (GtkWindow *window, static void gtk_window_set_default_size_internal (GtkWindow *window, gboolean change_width, - gint width, + int width, gboolean change_height, - gint height) + int height) { GtkWindowGeometryInfo *info; @@ -3440,8 +3440,8 @@ gtk_window_set_default_size_internal (GtkWindow *window, */ void gtk_window_set_default_size (GtkWindow *window, - gint width, - gint height) + int width, + int height) { g_return_if_fail (GTK_IS_WINDOW (window)); g_return_if_fail (width >= -1); @@ -3464,8 +3464,8 @@ gtk_window_set_default_size (GtkWindow *window, **/ void gtk_window_get_default_size (GtkWindow *window, - gint *width, - gint *height) + int *width, + int *height) { GtkWindowGeometryInfo *info; @@ -3518,8 +3518,8 @@ gtk_window_get_default_size (GtkWindow *window, **/ void gtk_window_resize (GtkWindow *window, - gint width, - gint height) + int width, + int height) { GtkWindowGeometryInfo *info; @@ -3608,11 +3608,11 @@ gtk_window_resize (GtkWindow *window, */ void gtk_window_get_size (GtkWindow *window, - gint *width, - gint *height) + int *width, + int *height) { GtkWindowPrivate *priv = gtk_window_get_instance_private (window); - gint w, h; + int w, h; g_return_if_fail (GTK_IS_WINDOW (window)); @@ -4010,8 +4010,8 @@ gtk_window_unmap (GtkWidget *widget) static void gtk_window_guess_default_size (GtkWindow *window, - gint *width, - gint *height) + int *width, + int *height) { GtkWindowPrivate *priv = gtk_window_get_instance_private (window); GtkWidget *widget; @@ -5211,8 +5211,8 @@ _gtk_window_unset_focus_and_default (GtkWindow *window, static void gtk_window_compute_configure_request_size (GtkWindow *window, guint flags, - gint *width, - gint *height) + int *width, + int *height) { GtkWindowPrivate *priv = gtk_window_get_instance_private (window); GtkWindowGeometryInfo *info; @@ -5236,8 +5236,8 @@ gtk_window_compute_configure_request_size (GtkWindow *window, /* Take width of shadows/headerbar into account. We want to set the * default size of the content area and not the window area. */ - gint default_width_csd = info->default_width; - gint default_height_csd = info->default_height; + int default_width_csd = info->default_width; + int default_height_csd = info->default_height; gtk_window_update_csd_size (window, &default_width_csd, &default_height_csd, INCLUDE_CSD_SIZE); @@ -5262,8 +5262,8 @@ gtk_window_compute_configure_request_size (GtkWindow *window, } else if (info) { - gint resize_width_csd = info->resize_width; - gint resize_height_csd = info->resize_height; + int resize_width_csd = info->resize_width; + int resize_height_csd = info->resize_height; gtk_window_update_csd_size (window, &resize_width_csd, &resize_height_csd, INCLUDE_CSD_SIZE); @@ -5681,10 +5681,10 @@ static void gtk_window_constrain_size (GtkWindow *window, GdkGeometry *geometry, guint flags, - gint width, - gint height, - gint *new_width, - gint *new_height) + int width, + int height, + int *new_width, + int *new_height) { GtkWindowPrivate *priv = gtk_window_get_instance_private (window); guint geometry_flags; @@ -5711,8 +5711,8 @@ gtk_window_constrain_size (GtkWindow *window, static void gtk_window_update_fixed_size (GtkWindow *window, GdkGeometry *new_geometry, - gint new_width, - gint new_height) + int new_width, + int new_height) { GtkWindowPrivate *priv = gtk_window_get_instance_private (window); GtkWindowGeometryInfo *info; @@ -5726,8 +5726,8 @@ gtk_window_update_fixed_size (GtkWindow *window, info = gtk_window_get_geometry_info (window, FALSE); if (info) { - gint default_width_csd = info->default_width; - gint default_height_csd = info->default_height; + int default_width_csd = info->default_width; + int default_height_csd = info->default_height; gtk_window_update_csd_size (window, &default_width_csd, &default_height_csd, @@ -5735,14 +5735,14 @@ gtk_window_update_fixed_size (GtkWindow *window, if (info->default_width > -1) { - gint w = MAX (MAX (default_width_csd, new_width), new_geometry->min_width); + int w = MAX (MAX (default_width_csd, new_width), new_geometry->min_width); new_geometry->min_width = w; new_geometry->max_width = w; } if (info->default_height > -1) { - gint h = MAX (MAX (default_height_csd, new_height), new_geometry->min_height); + int h = MAX (MAX (default_height_csd, new_height), new_geometry->min_height); new_geometry->min_height = h; new_geometry->max_height = h; } @@ -6596,7 +6596,7 @@ static void gtk_window_set_debugging (GdkDisplay *display, static void warn_response (GtkDialog *dialog, - gint response) + int response) { GtkWidget *check; gboolean remember; diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h index b64c11ee7e..ba9db9d501 100644 --- a/gtk/gtkwindow.h +++ b/gtk/gtkwindow.h @@ -209,20 +209,20 @@ void gtk_window_close (GtkWindow *window); */ GDK_AVAILABLE_IN_ALL void gtk_window_set_default_size (GtkWindow *window, - gint width, - gint height); + int width, + int height); GDK_AVAILABLE_IN_ALL void gtk_window_get_default_size (GtkWindow *window, - gint *width, - gint *height); + int *width, + int *height); GDK_AVAILABLE_IN_ALL void gtk_window_resize (GtkWindow *window, - gint width, - gint height); + int width, + int height); GDK_AVAILABLE_IN_ALL void gtk_window_get_size (GtkWindow *window, - gint *width, - gint *height); + int *width, + int *height); GDK_AVAILABLE_IN_ALL GtkWindowGroup *gtk_window_get_group (GtkWindow *window); diff --git a/gtk/gtkwindowhandle.c b/gtk/gtkwindowhandle.c index 9740be43ef..691fdc8a51 100644 --- a/gtk/gtkwindowhandle.c +++ b/gtk/gtkwindowhandle.c @@ -265,7 +265,7 @@ static gboolean perform_titlebar_action (GtkWindowHandle *self, GdkEvent *event, guint button, - gint n_press) + int n_press) { GtkSettings *settings; gchar *action = NULL; diff --git a/gtk/inspector/actions.c b/gtk/inspector/actions.c index 0819f66f9a..4402fbfa24 100644 --- a/gtk/inspector/actions.c +++ b/gtk/inspector/actions.c @@ -258,7 +258,7 @@ static void add_group (GtkInspectorActions *sl, GActionGroup *group) { - gint i; + int i; gchar **names; names = g_action_group_list_actions (group); @@ -271,7 +271,7 @@ static void add_muxer (GtkInspectorActions *sl, GtkActionMuxer *muxer) { - gint i; + int i; gchar **names; names = gtk_action_muxer_list_actions (muxer); diff --git a/gtk/inspector/cellrenderergraph.c b/gtk/inspector/cellrenderergraph.c index e8570fb7fb..b702f50dd5 100644 --- a/gtk/inspector/cellrenderergraph.c +++ b/gtk/inspector/cellrenderergraph.c @@ -119,10 +119,10 @@ static void gtk_cell_renderer_graph_get_size (GtkCellRenderer *cell, GtkWidget *widget, const GdkRectangle *cell_area, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height) + int *x_offset, + int *y_offset, + int *width, + int *height) { int xpad, ypad; diff --git a/gtk/inspector/css-editor.c b/gtk/inspector/css-editor.c index e30a6184b0..2a45b73168 100644 --- a/gtk/inspector/css-editor.c +++ b/gtk/inspector/css-editor.c @@ -66,8 +66,8 @@ css_error_free (gpointer data) static gboolean query_tooltip_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, GtkInspectorCssEditor *ce) @@ -77,14 +77,14 @@ query_tooltip_cb (GtkWidget *widget, if (keyboard_tip) { - gint offset; + int offset; g_object_get (ce->priv->text, "cursor-position", &offset, NULL); gtk_text_buffer_get_iter_at_offset (ce->priv->text, &iter, offset); } else { - gint bx, by, trailing; + int bx, by, trailing; gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (ce->priv->view), GTK_TEXT_WINDOW_TEXT, x, y, &bx, &by); @@ -221,7 +221,7 @@ save_to_file (GtkInspectorCssEditor *ce, static void save_response (GtkWidget *dialog, - gint response, + int response, GtkInspectorCssEditor *ce) { gtk_widget_hide (dialog); diff --git a/gtk/inspector/css-node-tree.c b/gtk/inspector/css-node-tree.c index 3fb1221b17..31dccb43b4 100644 --- a/gtk/inspector/css-node-tree.c +++ b/gtk/inspector/css-node-tree.c @@ -282,7 +282,7 @@ format_state_flags (GtkStateFlags state) if (state) { GString *str; - gint i; + int i; gboolean first = TRUE; str = g_string_new (""); @@ -348,7 +348,7 @@ static void gtk_inspector_css_node_tree_init (GtkInspectorCssNodeTree *cnt) { GtkInspectorCssNodeTreePrivate *priv; - gint i; + int i; cnt->priv = gtk_inspector_css_node_tree_get_instance_private (cnt); gtk_widget_init_template (GTK_WIDGET (cnt)); @@ -433,7 +433,7 @@ gtk_inspector_css_node_tree_update_style (GtkInspectorCssNodeTree *cnt, GtkCssStyle *new_style) { GtkInspectorCssNodeTreePrivate *priv = cnt->priv; - gint i; + int i; for (i = 0; i < _gtk_css_style_property_get_n_properties (); i++) { diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c index 2a5b304d09..243e6d9369 100644 --- a/gtk/inspector/general.c +++ b/gtk/inspector/general.c @@ -166,7 +166,7 @@ add_check_row (GtkInspectorGeneral *gen, GtkListBox *list, const gchar *name, gboolean value, - gint indent) + int indent) { GtkWidget *row, *box, *label, *check; @@ -206,7 +206,7 @@ add_label_row (GtkInspectorGeneral *gen, GtkListBox *list, const char *name, const char *value, - gint indent) + int indent) { GtkWidget *box; GtkWidget *label; @@ -566,7 +566,7 @@ populate_monitor (gpointer item, gchar *name; gchar *value; GdkRectangle rect; - gint scale; + int scale; char *scale_str = NULL; const char *manufacturer; const char *model; diff --git a/gtk/inspector/gtktreemodelcssnode.c b/gtk/inspector/gtktreemodelcssnode.c index 0af42b167f..e6d87dc985 100644 --- a/gtk/inspector/gtktreemodelcssnode.c +++ b/gtk/inspector/gtktreemodelcssnode.c @@ -23,7 +23,7 @@ struct _GtkTreeModelCssNodePrivate { GtkTreeModelCssNodeGetFunc get_func; - gint n_columns; + int n_columns; GType *column_types; GtkCssNode *root; @@ -48,7 +48,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkTreeModelCssNode, gtk_tree_model_css_node, G_TYPE_OB static GtkCssNode * get_nth_child (GtkCssNode *node, - gint i) + int i) { for (node = gtk_css_node_get_first_child (node); node != NULL && i > 0; @@ -75,7 +75,7 @@ gtk_tree_model_css_node_get_flags (GtkTreeModel *tree_model) return GTK_TREE_MODEL_ITERS_PERSIST; } -static gint +static int gtk_tree_model_css_node_get_n_columns (GtkTreeModel *tree_model) { GtkTreeModelCssNode *nodemodel = GTK_TREE_MODEL_CSS_NODE (tree_model); @@ -86,7 +86,7 @@ gtk_tree_model_css_node_get_n_columns (GtkTreeModel *tree_model) static GType gtk_tree_model_css_node_get_column_type (GtkTreeModel *tree_model, - gint column) + int column) { GtkTreeModelCssNode *nodemodel = GTK_TREE_MODEL_CSS_NODE (tree_model); GtkTreeModelCssNodePrivate *priv = nodemodel->priv; @@ -156,7 +156,7 @@ gtk_tree_model_css_node_get_path (GtkTreeModel *tree_model, static void gtk_tree_model_css_node_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value) { GtkTreeModelCssNode *nodemodel = GTK_TREE_MODEL_CSS_NODE (tree_model); @@ -246,7 +246,7 @@ gtk_tree_model_css_node_iter_has_child (GtkTreeModel *tree_model, return gtk_css_node_get_first_child (node) != NULL; } -static gint +static int gtk_tree_model_css_node_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter) { @@ -270,7 +270,7 @@ static gboolean gtk_tree_model_css_node_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n) + int n) { GtkTreeModelCssNode *nodemodel = GTK_TREE_MODEL_CSS_NODE (tree_model); GtkTreeModelCssNodePrivate *priv = nodemodel->priv; @@ -364,13 +364,13 @@ gtk_tree_model_css_node_init (GtkTreeModelCssNode *nodemodel) GtkTreeModel * gtk_tree_model_css_node_new (GtkTreeModelCssNodeGetFunc get_func, - gint n_columns, + int n_columns, ...) { GtkTreeModel *result; va_list args; GType *types; - gint i; + int i; g_return_val_if_fail (get_func != NULL, NULL); g_return_val_if_fail (n_columns > 0, NULL); @@ -394,7 +394,7 @@ gtk_tree_model_css_node_new (GtkTreeModelCssNodeGetFunc get_func, GtkTreeModel * gtk_tree_model_css_node_newv (GtkTreeModelCssNodeGetFunc get_func, - gint n_columns, + int n_columns, GType *types) { GtkTreeModelCssNode *result; diff --git a/gtk/inspector/gtktreemodelcssnode.h b/gtk/inspector/gtktreemodelcssnode.h index d6cabe14c7..efb3cce9c1 100644 --- a/gtk/inspector/gtktreemodelcssnode.h +++ b/gtk/inspector/gtktreemodelcssnode.h @@ -58,10 +58,10 @@ struct _GtkTreeModelCssNodeClass GType gtk_tree_model_css_node_get_type (void) G_GNUC_CONST; GtkTreeModel *gtk_tree_model_css_node_new (GtkTreeModelCssNodeGetFunc get_func, - gint n_columns, + int n_columns, ...); GtkTreeModel *gtk_tree_model_css_node_newv (GtkTreeModelCssNodeGetFunc get_func, - gint n_columns, + int n_columns, GType *types); void gtk_tree_model_css_node_set_root_node (GtkTreeModelCssNode *model, diff --git a/gtk/inspector/layoutoverlay.c b/gtk/inspector/layoutoverlay.c index 589fe8e815..74f4084084 100644 --- a/gtk/inspector/layoutoverlay.c +++ b/gtk/inspector/layoutoverlay.c @@ -20,7 +20,7 @@ struct _GtkLayoutOverlayClass G_DEFINE_TYPE (GtkLayoutOverlay, gtk_layout_overlay, GTK_TYPE_INSPECTOR_OVERLAY) -static gint +static int get_number (GtkCssValue *value) { double d = _gtk_css_number_value_get (value, 100); diff --git a/gtk/inspector/menu.c b/gtk/inspector/menu.c index 3374418942..fb7a78d318 100644 --- a/gtk/inspector/menu.c +++ b/gtk/inspector/menu.c @@ -58,7 +58,7 @@ static void add_item (GtkInspectorMenu *sl, GtkStackPage *page, GMenuModel *menu, - gint idx, + int idx, GtkTreeIter *parent) { GtkTreeIter iter; @@ -117,8 +117,8 @@ add_menu (GtkInspectorMenu *sl, GMenuModel *menu, GtkTreeIter *parent) { - gint n_items; - gint i; + int n_items; + int i; g_object_set (page, "visible", TRUE, NULL); diff --git a/gtk/inspector/misc-info.c b/gtk/inspector/misc-info.c index 38350eb2ad..72621786f1 100644 --- a/gtk/inspector/misc-info.c +++ b/gtk/inspector/misc-info.c @@ -103,7 +103,7 @@ format_state_flags (GtkStateFlags state) { GFlagsClass *fclass; GString *str; - gint i; + int i; str = g_string_new (""); diff --git a/gtk/inspector/prop-editor.c b/gtk/inspector/prop-editor.c index 5ce78cec3a..8dcc463b67 100644 --- a/gtk/inspector/prop-editor.c +++ b/gtk/inspector/prop-editor.c @@ -468,7 +468,7 @@ enum_changed (GObject *object, GParamSpec *pspec, gpointer data) { GValue val = G_VALUE_INIT; GEnumClass *eclass; - gint i; + int i; eclass = G_ENUM_CLASS (g_type_class_peek (pspec->value_type)); @@ -495,7 +495,7 @@ flags_modified (GtkCheckButton *button, ObjectProperty *p) gboolean active; GFlagsClass *fclass; guint flags; - gint i; + int i; GValue val = G_VALUE_INIT; active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); @@ -552,7 +552,7 @@ flags_changed (GObject *object, GParamSpec *pspec, gpointer data) GValue val = G_VALUE_INIT; GFlagsClass *fclass; guint flags; - gint i; + int i; GtkPopover *popover; GtkWidget *sw; GtkWidget *viewport; @@ -622,7 +622,7 @@ unichar_changed (GObject *object, GParamSpec *pspec, gpointer data) gunichar old_val = unichar_get_value (entry); GValue val = G_VALUE_INIT; gchar buf[7]; - gint len; + int len; g_value_init (&val, pspec->value_type); get_property_value (object, pspec, &val); @@ -940,7 +940,7 @@ property_editor (GObject *object, { GEnumClass *eclass; char **names; - gint j; + int j; eclass = G_ENUM_CLASS (g_type_class_ref (spec->value_type)); @@ -971,7 +971,7 @@ property_editor (GObject *object, GtkWidget *sw; GtkWidget *popover; GFlagsClass *fclass; - gint j; + int j; popover = gtk_popover_new (); prop_edit = gtk_menu_button_new (); @@ -1172,7 +1172,7 @@ attribute_mapping_changed (GtkDropDown *dropdown, GParamSpec *pspec, GtkInspectorPropEditor *self) { - gint col; + int col; gpointer layout; GtkCellRenderer *cell; GtkCellArea *area; @@ -1266,14 +1266,14 @@ attribute_editor (GObject *object, gpointer layout; GtkCellArea *area; GtkTreeModel *model = NULL; - gint col = -1; + int col = -1; GtkWidget *label; GtkWidget *button; GtkWidget *box; GtkWidget *dropdown; GListStore *store; GtkListItemFactory *factory; - gint i; + int i; AttributeHolder *holder; gboolean sensitive; @@ -1429,7 +1429,7 @@ struct _GSettingsSchemaKey GVariant *minimum, *maximum; GVariant *default_value; - gint ref_count; + int ref_count; }; typedef struct diff --git a/gtk/inspector/resource-list.c b/gtk/inspector/resource-list.c index 63cf4745c2..386935aed9 100644 --- a/gtk/inspector/resource-list.c +++ b/gtk/inspector/resource-list.c @@ -84,7 +84,7 @@ load_resources_recurse (const char *path, gsize *size_out) { gchar **names; - gint i; + int i; GListStore *result; result = g_list_store_new (RESOURCE_TYPE_HOLDER); @@ -92,10 +92,10 @@ load_resources_recurse (const char *path, names = g_resources_enumerate_children (path, 0, NULL); for (i = 0; names[i]; i++) { - gint len; + int len; gchar *p; gboolean has_slash; - gint count; + int count; gsize size; GListModel *children; ResourceHolder *holder; @@ -306,7 +306,7 @@ close_details (GtkWidget *button, static GListModel * load_resources (void) { - gint count = 0; + int count = 0; gsize size = 0; return load_resources_recurse ("/", &count, &size); diff --git a/gtk/inspector/statistics.c b/gtk/inspector/statistics.c index 525f28df8d..e299fceb3b 100644 --- a/gtk/inspector/statistics.c +++ b/gtk/inspector/statistics.c @@ -84,14 +84,14 @@ enum G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorStatistics, gtk_inspector_statistics, GTK_TYPE_BOX) -static gint +static int add_type_count (GtkInspectorStatistics *sl, GType type) { - gint cumulative; - gint self; + int cumulative; + int self; GType *children; guint n_children; - gint i; + int i; TypeData *data; cumulative = 0; @@ -202,8 +202,8 @@ cell_data_data (GtkCellLayout *layout, GtkTreeIter *iter, gpointer data) { - gint column; - gint count; + int column; + int count; gchar *text; column = GPOINTER_TO_INT (data); @@ -222,9 +222,9 @@ cell_data_delta (GtkCellLayout *layout, GtkTreeIter *iter, gpointer data) { - gint column; - gint count1; - gint count2; + int column; + int count1; + int count2; gchar *text; column = GPOINTER_TO_INT (data); @@ -304,7 +304,7 @@ match_string (const gchar *string, static gboolean match_row (GtkTreeModel *model, - gint column, + int column, const gchar *key, GtkTreeIter *iter, gpointer data) diff --git a/gtk/inspector/strv-editor.c b/gtk/inspector/strv-editor.c index c8b19d6dda..4b0f87fdce 100644 --- a/gtk/inspector/strv-editor.c +++ b/gtk/inspector/strv-editor.c @@ -132,7 +132,7 @@ gtk_inspector_strv_editor_set_strv (GtkInspectorStrvEditor *editor, gchar **strv) { GtkWidget *child; - gint i; + int i; editor->blocked = TRUE; diff --git a/gtk/inspector/tree-data.c b/gtk/inspector/tree-data.c index fdf77a2cfd..402cff68a3 100644 --- a/gtk/inspector/tree-data.c +++ b/gtk/inspector/tree-data.c @@ -67,7 +67,7 @@ cell_data_func (GtkTreeViewColumn *col, GtkTreeIter *iter, gpointer data) { - gint num; + int num; GValue gvalue = { 0, }; gchar *value; @@ -82,12 +82,12 @@ cell_data_func (GtkTreeViewColumn *col, static void add_columns (GtkInspectorTreeData *sl) { - gint n_columns; + int n_columns; GtkCellRenderer *cell; GType type; gchar *title; GtkTreeViewColumn *col; - gint i; + int i; n_columns = gtk_tree_model_get_n_columns (sl->object); for (i = 0; i < n_columns; i++) diff --git a/gtk/inspector/type-info.c b/gtk/inspector/type-info.c index f14d32cb61..a2c72d9a50 100644 --- a/gtk/inspector/type-info.c +++ b/gtk/inspector/type-info.c @@ -82,7 +82,7 @@ gtk_inspector_type_popover_set_gtype (GtkInspectorTypePopover *self, const gchar *name; GType *interfaces; GType tmp; - gint i; + int i; GtkWidget *child; g_return_if_fail (GTK_IS_INSPECTOR_TYPE_POPOVER (self)); diff --git a/gtk/inspector/visual.c b/gtk/inspector/visual.c index 928b644a41..28798507cd 100644 --- a/gtk/inspector/visual.c +++ b/gtk/inspector/visual.c @@ -209,7 +209,7 @@ update_font_scale (GtkInspectorVisual *vis, gboolean update_entry) { g_object_set (gtk_settings_get_for_display (vis->display), - "gtk-xft-dpi", (gint)(factor * 96 * 1024), + "gtk-xft-dpi", (int)(factor * 96 * 1024), NULL); if (update_adjustment) @@ -757,7 +757,7 @@ init_cursors (GtkInspectorVisual *vis) static void cursor_size_changed (GtkAdjustment *adjustment, GtkInspectorVisual *vis) { - gint size; + int size; size = gtk_adjustment_get_value (adjustment); g_object_set (gtk_settings_get_for_display (vis->display), "gtk-cursor-theme-size", size, NULL); @@ -766,7 +766,7 @@ cursor_size_changed (GtkAdjustment *adjustment, GtkInspectorVisual *vis) static void init_cursor_size (GtkInspectorVisual *vis) { - gint size; + int size; g_object_get (gtk_settings_get_for_display (vis->display), "gtk-cursor-theme-size", &size, NULL); if (size == 0) @@ -803,7 +803,7 @@ init_font_scale (GtkInspectorVisual *vis) static void scale_changed (GtkAdjustment *adjustment, GtkInspectorVisual *vis) { - gint scale; + int scale; scale = gtk_adjustment_get_value (adjustment); gdk_x11_display_set_surface_scale (vis->display, scale); diff --git a/gtk/inspector/window.h b/gtk/inspector/window.h index 928c1c5289..ae3bc7e32a 100644 --- a/gtk/inspector/window.h +++ b/gtk/inspector/window.h @@ -37,7 +37,7 @@ #define TREE_TEXT_SCALE 0.8 -#define TREE_CHECKBOX_SIZE (gint)(0.8 * 13) +#define TREE_CHECKBOX_SIZE (int)(0.8 * 13) typedef struct { @@ -89,8 +89,8 @@ typedef struct GdkSeat *grab_seat; GtkInspectorOverlay *flash_overlay; - gint flash_count; - gint flash_cnx; + int flash_count; + int flash_cnx; GArray *objects; diff --git a/gtk/tools/gdkpixbufutils.c b/gtk/tools/gdkpixbufutils.c index 97125e3247..ad67e3b8e8 100644 --- a/gtk/tools/gdkpixbufutils.c +++ b/gtk/tools/gdkpixbufutils.c @@ -72,8 +72,8 @@ load_from_stream (GdkPixbufLoader *loader, static void size_prepared_cb (GdkPixbufLoader *loader, - gint width, - gint height, + int width, + int height, gpointer data) { gdouble *scale = data; @@ -120,8 +120,8 @@ _gdk_pixbuf_new_from_stream_scaled (GInputStream *stream, static void size_prepared_cb2 (GdkPixbufLoader *loader, - gint width, - gint height, + int width, + int height, gpointer data) { int *scales = data; diff --git a/gtk/tools/gtk-builder-tool-enumerate.c b/gtk/tools/gtk-builder-tool-enumerate.c index 9e4ef118be..45e8275378 100644 --- a/gtk/tools/gtk-builder-tool-enumerate.c +++ b/gtk/tools/gtk-builder-tool-enumerate.c @@ -42,7 +42,7 @@ do_enumerate (int *argc, const char ***argv) { GtkBuilder *builder; GError *error = NULL; - gint ret; + int ret; GSList *list, *l; GObject *object; const gchar *name; diff --git a/gtk/tools/gtk-builder-tool-simplify.c b/gtk/tools/gtk-builder-tool-simplify.c index 6bc65b5015..8545d69b00 100644 --- a/gtk/tools/gtk-builder-tool-simplify.c +++ b/gtk/tools/gtk-builder-tool-simplify.c @@ -191,7 +191,7 @@ needs_explicit_setting (GParamSpec *pspec, { "GtkGridLayoutChild", "left-attach", PROP_KIND_LAYOUT }, }; gboolean found; - gint k; + int k; const char *class_name; class_name = g_type_name (pspec->owner_type); @@ -241,7 +241,7 @@ keep_for_rewrite (const char *class_name, { "GtkStack", "needs-attention", PROP_KIND_PACKING }, }; gboolean found; - gint k; + int k; char *canonical_name; canonical_name = g_strdup (property_name); @@ -629,7 +629,7 @@ static gboolean property_can_be_omitted (Element *element, MyParserData *data) { - gint i; + int i; gboolean bound; gboolean translatable; const char *class_name; @@ -700,7 +700,7 @@ property_has_been_removed (Element *element, }; gchar *canonical_name; gboolean found; - gint i, k; + int i, k; PropKind kind; kind = get_prop_kind (element); diff --git a/gtk/tools/gtk-builder-tool-validate.c b/gtk/tools/gtk-builder-tool-validate.c index 9b6132e64f..dfdfc005b8 100644 --- a/gtk/tools/gtk-builder-tool-validate.c +++ b/gtk/tools/gtk-builder-tool-validate.c @@ -61,7 +61,7 @@ do_validate_template (const gchar *filename, GObject *object; GtkBuilder *builder; GError *error = NULL; - gint ret; + int ret; /* Only make a fake type if it doesn't exist yet. * This lets us e.g. validate the GtkFileChooserWidget template. @@ -122,7 +122,7 @@ validate_file (const char *filename) { GtkBuilder *builder; GError *error = NULL; - gint ret; + int ret; gchar *class_name = NULL; gchar *parent_name = NULL; diff --git a/gtk/tools/gtkiconcachevalidator.c b/gtk/tools/gtkiconcachevalidator.c index 7ad1c10329..f449b6d22b 100644 --- a/gtk/tools/gtkiconcachevalidator.c +++ b/gtk/tools/gtkiconcachevalidator.c @@ -83,7 +83,7 @@ check_string (CacheInfo *info, if (info->flags & CHECK_STRINGS) { - gint i; + int i; gchar c; /* assume no string is longer than 1k */ @@ -109,7 +109,7 @@ check_string_utf8 (CacheInfo *info, if (info->flags & CHECK_STRINGS) { - gint i; + int i; gchar c; /* assume no string is longer than 1k */ @@ -132,7 +132,7 @@ check_directory_list (CacheInfo *info, guint32 offset) { guint32 directory_offset; - gint i; + int i; check ("offset, directory list", get_uint32 (info, offset, &info->n_directories)); @@ -199,7 +199,7 @@ check_display_name_list (CacheInfo *info, guint32 offset) { guint32 n_display_names, ofs; - gint i; + int i; check ("offset, display name list", get_uint32 (info, offset, &n_display_names)); @@ -306,7 +306,7 @@ check_image_list (CacheInfo *info, guint32 offset) { guint32 n_images; - gint i; + int i; check ("offset, image list", get_uint32 (info, offset, &n_images)); @@ -350,7 +350,7 @@ check_hash (CacheInfo *info, guint32 offset) { guint32 n_buckets, icon_offset; - gint i; + int i; check ("offset, hash size", get_uint32 (info, offset, &n_buckets)); diff --git a/gtk/tools/updateiconcache.c b/gtk/tools/updateiconcache.c index 507c790b41..b6b5912e47 100644 --- a/gtk/tools/updateiconcache.c +++ b/gtk/tools/updateiconcache.c @@ -87,7 +87,7 @@ static gboolean is_cache_up_to_date (const gchar *path) { gchar *cache_path; - gint retval; + int retval; cache_path = g_build_filename (path, CACHE_NAME, NULL); retval = g_stat (cache_path, &cache_dir_stat); @@ -176,7 +176,7 @@ typedef struct char **display_names; guint32 offset; - gint size; + int size; } IconData; static GHashTable *image_data_hash = NULL; @@ -234,7 +234,7 @@ load_icon_data (const char *path) char *str; char *split_point; int i; - gint *ivalues; + int *ivalues; GError *error = NULL; gchar **keys; gsize n_keys; @@ -591,7 +591,7 @@ scan_directory (const gchar *base_path, const gchar *subdir, GHashTable *files, GList *directories, - gint depth) + int depth) { GHashTable *dir_hash; GDir *dir; @@ -716,7 +716,7 @@ struct _HashNode HashNode *next; gchar *name; GList *image_list; - gint offset; + int offset; }; static guint @@ -733,7 +733,7 @@ icon_name_hash (gconstpointer key) } typedef struct { - gint size; + int size; HashNode **nodes; } HashContext; @@ -822,7 +822,7 @@ write_image_data (FILE *cache, ImageData *image_data, int offset) { guint8 *s; guint len; - gint i; + int i; GdkPixdata *pixdata = &image_data->pixdata; /* Type 0 is GdkPixdata */ @@ -970,10 +970,10 @@ write_header (FILE *cache, guint32 dir_list_offset) write_card32 (cache, dir_list_offset)); } -static gint +static int get_image_meta_data_size (Image *image) { - gint i; + int i; /* The complication with storing the size in both * IconData and Image is necessary since we attribute @@ -1032,7 +1032,7 @@ get_image_meta_data_size (Image *image) return image->icon_data_size; } -static gint +static int get_image_pixel_data_size (Image *image) { /* The complication with storing the size in both @@ -1057,10 +1057,10 @@ get_image_pixel_data_size (Image *image) return image->pixel_data_size; } -static gint +static int get_image_data_size (Image *image) { - gint len; + int len; len = 0; @@ -1625,7 +1625,7 @@ write_csource (const gchar *path) gchar *cache_path; gchar *data; gsize len; - gint i; + int i; cache_path = g_build_filename (path, CACHE_NAME, NULL); if (!g_file_get_contents (cache_path, &data, &len, NULL)) diff --git a/modules/printbackends/gtkcloudprintaccount.c b/modules/printbackends/gtkcloudprintaccount.c index ee65a18287..42f3d03900 100644 --- a/modules/printbackends/gtkcloudprintaccount.c +++ b/modules/printbackends/gtkcloudprintaccount.c @@ -282,7 +282,7 @@ gtk_cloudprint_account_got_oauth2_access_token_cb (GObject *source, RestProxyCall *call; RestProxy *rest; GVariant *output; - gint expires_in = 0; + int expires_in = 0; GError *error = NULL; output = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source), @@ -350,7 +350,7 @@ gtk_cloudprint_account_ensure_credentials_cb (GObject *source, GTask *task = user_data; GtkCloudprintAccount *account = g_task_get_task_data (task); GVariant *output; - gint expires_in = 0; + int expires_in = 0; GError *error = NULL; output = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source), diff --git a/modules/printbackends/gtkcupssecretsutils.c b/modules/printbackends/gtkcupssecretsutils.c index 4a9b447bd9..ab3a94b964 100644 --- a/modules/printbackends/gtkcupssecretsutils.c +++ b/modules/printbackends/gtkcupssecretsutils.c @@ -110,7 +110,7 @@ get_secret_cb (GObject *source_object, *value = NULL; GVariantIter *iter = NULL; guint i, required_len; - gint pw_field = -1; + int pw_field = -1; task = user_data; task_data = g_task_get_task_data (task); @@ -899,7 +899,7 @@ gtk_cups_secrets_service_watch (GBusNameAppearedCallback appeared, static void cleanup_task_data (gpointer data) { - gint i; + int i; SecretsServiceData *task_data = data; g_free (task_data->collection_path); diff --git a/modules/printbackends/gtkcupsutils.c b/modules/printbackends/gtkcupsutils.c index f5a7f8dd59..3387cce99d 100644 --- a/modules/printbackends/gtkcupsutils.c +++ b/modules/printbackends/gtkcupsutils.c @@ -105,7 +105,7 @@ gtk_cups_result_set_error (GtkCupsResult *result, GtkCupsRequest * gtk_cups_request_new_with_username (http_t *connection, GtkCupsRequestType req_type, - gint operation_id, + int operation_id, GIOChannel *data_io, const char *server, const char *resource, @@ -197,7 +197,7 @@ gtk_cups_request_new_with_username (http_t *connection, GtkCupsRequest * gtk_cups_request_new (http_t *connection, GtkCupsRequestType req_type, - gint operation_id, + int operation_id, GIOChannel *data_io, const char *server, const char *resource) @@ -650,8 +650,8 @@ gtk_cups_request_encode_option (GtkCupsRequest *request, void gtk_cups_request_set_ipp_version (GtkCupsRequest *request, - gint major, - gint minor) + int major, + int minor) { ippSetVersion (request->ipp_request, major, minor); } @@ -1537,9 +1537,9 @@ gtk_cups_connection_test_get_state (GtkCupsConnectionTest *test) { GtkCupsConnectionState result = GTK_CUPS_CONNECTION_NOT_AVAILABLE; http_addrlist_t *iter; - gint error_code; - gint flags; - gint code; + int error_code; + int flags; + int code; if (test == NULL) return GTK_CUPS_CONNECTION_NOT_AVAILABLE; diff --git a/modules/printbackends/gtkcupsutils.h b/modules/printbackends/gtkcupsutils.h index 500bb4fecf..84303f5163 100644 --- a/modules/printbackends/gtkcupsutils.h +++ b/modules/printbackends/gtkcupsutils.h @@ -85,20 +85,20 @@ struct _GtkCupsRequest gchar *server; gchar *resource; GIOChannel *data_io; - gint attempts; + int attempts; GtkCupsResult *result; - gint state; + int state; GtkCupsPollState poll_state; guint64 bytes_received; gchar *password; gchar *username; - gint own_http : 1; - gint need_password : 1; - gint need_auth_info : 1; + int own_http : 1; + int need_password : 1; + int need_auth_info : 1; gchar **auth_info_required; gchar **auth_info; GtkCupsPasswordState password_state; @@ -110,7 +110,7 @@ struct _GtkCupsConnectionTest http_addrlist_t *addrlist; http_addrlist_t *current_addr; http_addrlist_t *last_wrong_addr; - gint socket; + int socket; }; #define GTK_CUPS_REQUEST_START 0 @@ -142,14 +142,14 @@ enum GtkCupsRequest * gtk_cups_request_new_with_username (http_t *connection, GtkCupsRequestType req_type, - gint operation_id, + int operation_id, GIOChannel *data_io, const char *server, const char *resource, const char *username); GtkCupsRequest * gtk_cups_request_new (http_t *connection, GtkCupsRequestType req_type, - gint operation_id, + int operation_id, GIOChannel *data_io, const char *server, const char *resource); @@ -179,8 +179,8 @@ void gtk_cups_request_encode_option (GtkCupsRequest * const gchar *option, const gchar *value); void gtk_cups_request_set_ipp_version (GtkCupsRequest *request, - gint major, - gint minor); + int major, + int minor); gboolean gtk_cups_result_is_error (GtkCupsResult *result); ipp_t * gtk_cups_result_get_response (GtkCupsResult *result); GtkCupsErrorType gtk_cups_result_get_error_type (GtkCupsResult *result); diff --git a/modules/printbackends/gtkprintbackendcloudprint.c b/modules/printbackends/gtkprintbackendcloudprint.c index 6a5d7755af..8c6a1c29b7 100644 --- a/modules/printbackends/gtkprintbackendcloudprint.c +++ b/modules/printbackends/gtkprintbackendcloudprint.c @@ -260,8 +260,8 @@ typedef struct { gchar *path; /* Base64 encoding state */ - gint b64state; - gint b64save; + int b64state; + int b64save; } _PrintStreamData; static void @@ -551,7 +551,7 @@ get_accounts (GVariant *output) { GVariant *objects; GList *result = NULL; - gint i, j, k; + int i, j, k; g_variant_get (output, "(@a{oa{sa{sv}}})", &objects); @@ -950,7 +950,7 @@ cloudprint_printer_prepare_for_print (GtkPrinter *printer, if (gtk_print_job_get_pages (print_job) == GTK_PRINT_PAGES_RANGES) { GtkPageRange *page_ranges; - gint num_page_ranges; + int num_page_ranges; page_ranges = gtk_print_settings_get_page_ranges (settings, &num_page_ranges); gtk_print_job_set_page_ranges (print_job, page_ranges, num_page_ranges); } diff --git a/modules/printbackends/gtkprintbackendcups.c b/modules/printbackends/gtkprintbackendcups.c index d91a9ec577..bd972b966c 100644 --- a/modules/printbackends/gtkprintbackendcups.c +++ b/modules/printbackends/gtkprintbackendcups.c @@ -128,11 +128,11 @@ struct _GtkPrintBackendCups guint list_printers_poll; guint list_printers_pending : 1; - gint list_printers_attempts; + int list_printers_attempts; guint got_default_printer : 1; guint default_printer_poll; GtkCupsConnectionTest *cups_connection_test; - gint reading_ppds; + int reading_ppds; GList *requests; GHashTable *auth; @@ -392,7 +392,7 @@ cups_printer_create_cairo_surface (GtkPrinter *printer, ppd_attr_t *ppd_attr_screen_freq = NULL; ppd_attr_t *ppd_attr_res_screen_freq = NULL; gchar *res_string = NULL; - gint level = 2; + int level = 2; G_GNUC_BEGIN_IGNORE_DEPRECATIONS @@ -557,7 +557,7 @@ add_cups_options (const gchar *key, GtkPrinterCups *printer = data->printer; gboolean custom_value = FALSE; gchar *new_value = NULL; - gint i; + int i; if (!key || !value) return; @@ -1008,8 +1008,8 @@ gtk_print_backend_cups_set_password (GtkPrintBackend *backend, gchar *username = NULL; gchar *hostname = NULL; gchar *password = NULL; - gint length; - gint i; + int length; + int i; length = g_strv_length (auth_info_required); @@ -1091,8 +1091,8 @@ request_password (gpointer data) gchar **auth_info_default; gchar **auth_info_display; gboolean *auth_info_visible; - gint length = 3; - gint i; + int length = 3; + int i; if (dispatch->backend->authentication_lock) return G_SOURCE_REMOVE; @@ -1268,8 +1268,8 @@ check_auth_info (gpointer user_data) } else { - gint length; - gint i; + int length; + int i; length = g_strv_length (dispatch->request->auth_info_required); @@ -1305,7 +1305,7 @@ lookup_auth_info_cb (GObject *source_object, GtkPrintCupsDispatchWatch *dispatch; gchar **auth_info; GError *error = NULL; - gint i; + int i; task = (GTask *) res; dispatch = user_data; @@ -1396,8 +1396,8 @@ request_auth_info (gpointer user_data) const char *printer_uri; gchar *prompt = NULL; char *printer_name = NULL; - gint length; - gint i; + int length; + int i; gboolean *auth_info_visible = NULL; gchar **auth_info_default = NULL; gchar **auth_info_display = NULL; @@ -1519,7 +1519,7 @@ cups_dispatch_watch_check (GSource *source) static gboolean cups_dispatch_watch_prepare (GSource *source, - gint *timeout_) + int *timeout_) { GtkPrintCupsDispatchWatch *dispatch; gboolean result; @@ -1820,7 +1820,7 @@ cups_job_info_poll_timeout (gpointer user_data) static void cups_begin_polling_info (GtkPrintBackendCups *print_backend, GtkPrintJob *job, - gint job_id) + int job_id) { CupsJobPollData *data; @@ -1844,7 +1844,7 @@ mark_printer_inactive (GtkPrinter *printer, g_signal_emit_by_name (backend, "printer-removed", printer); } -static gint +static int find_printer (GtkPrinter *printer, const gchar *find_name) { @@ -1956,8 +1956,8 @@ typedef struct gchar *state_msg; const gchar *reason_msg; PrinterStateLevel reason_level; - gint state; - gint job_count; + int state; + int job_count; gboolean is_paused; gboolean is_accepting_jobs; const gchar *default_cover_before; @@ -1968,7 +1968,7 @@ typedef struct gboolean avahi_printer; gchar *avahi_resource_path; gchar **auth_info_required; - gint default_number_up; + int default_number_up; guchar ipp_version_major; guchar ipp_version_minor; gboolean supports_copies; @@ -2047,7 +2047,7 @@ get_server_ipp_version (guchar *ipp_version_major, } } -static gint +static int ipp_version_cmp (guchar ipp_version_major1, guchar ipp_version_minor1, guchar ipp_version_major2, @@ -2075,7 +2075,7 @@ cups_printer_handle_attribute (GtkPrintBackendCups *cups_backend, ipp_attribute_t *attr, PrinterSetupInfo *info) { - gint i, j; + int i, j; if (strcmp (ippGetName (attr), "printer-name") == 0 && ippGetValueTag (attr) == IPP_TAG_NAME) info->printer_name = ippGetString (attr, 0, NULL); @@ -2272,7 +2272,7 @@ cups_printer_handle_attribute (GtkPrintBackendCups *cups_backend, { ipp_attribute_t *iter; ipp_t *col; - gint num_of_margins = 0; + int num_of_margins = 0; for (i = 0; i < ippGetCount (attr); i++) { @@ -2590,7 +2590,7 @@ get_reason_msg_desc (guint i, static void set_info_state_message (PrinterSetupInfo *info) { - gint i; + int i; if (info->state_msg == NULL || strlen (info->state_msg) == 0) { @@ -2843,7 +2843,7 @@ typedef struct gchar *printer_uri; gchar *location; gchar *host; - gint port; + int port; gchar *printer_name; gchar *name; gchar *resource_path; @@ -3085,10 +3085,10 @@ avahi_service_resolver_cb (GObject *source_object, gchar *key; gchar *value; gsize length; - gint interface; - gint protocol; - gint aprotocol; - gint i, j; + int interface; + int protocol; + int aprotocol; + int i, j; output = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object), res, @@ -3260,8 +3260,8 @@ avahi_service_browser_signal_handler (GDBusConnection *connection, gchar *type; gchar *domain; guint flags; - gint interface; - gint protocol; + int interface; + int protocol; if (g_strcmp0 (signal_name, "ItemNew") == 0) { @@ -3347,7 +3347,7 @@ avahi_service_browser_new_cb (GObject *source_object, GtkPrintBackendCups *cups_backend; GVariant *output; GError *error = NULL; - gint i; + int i; output = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object), res, @@ -3895,7 +3895,7 @@ cups_request_ppd (GtkPrinter *printer) GetPPDData *data; int fd; const gchar *hostname; - gint port; + int port; cups_printer = GTK_PRINTER_CUPS (printer); @@ -4507,7 +4507,7 @@ static const struct { * https://mail.gnome.org/archives/desktop-devel-list/2016-March/msg00075.html */ static gchar * -get_ipp_choice_translation_string (gint index, +get_ipp_choice_translation_string (int index, guint i) { gchar *translation; @@ -5122,7 +5122,7 @@ strptr_cmp (const void *a, static gboolean string_in_table (const gchar *str, const gchar *table[], - gint table_len) + int table_len) { return bsearch (&str, table, table_len, sizeof (char *), (void *)strptr_cmp) != NULL; } @@ -5207,7 +5207,7 @@ handle_group (GtkPrinterOptionSet *set, ppd_group_t *toplevel_group, GtkPrintSettings *settings) { - gint i; + int i; const gchar *name; /* Ignore installable options */ @@ -5248,7 +5248,7 @@ get_ipp_option_translation (const gchar *ipp_option_name, gchar **gtk_option_name, gchar **translation) { - gint i; + int i; *gtk_option_name = NULL; *translation = NULL; @@ -5280,7 +5280,7 @@ get_ipp_choice_translation (const gchar *ipp_option_name, gchar *translation = NULL; gsize ipp_choice_length; gchar *endptr; - gint i; + int i; for (i = 0; ipp_choice_translations[i].ipp_option_name != NULL; i++) { @@ -5529,9 +5529,9 @@ cups_printer_get_options (GtkPrinter *printer, char **cover = NULL; char **cover_display = NULL; char **cover_display_translated = NULL; - gint num_of_covers = 0; + int num_of_covers = 0; gconstpointer value; - gint j; + int j; /* Translators, this string is used to label the pages-per-sheet option * in the print dialog @@ -5732,7 +5732,7 @@ cups_printer_get_options (GtkPrinter *printer, if (strcmp (name, "cups-job-sheets") == 0) { gchar **values; - gint num_values; + int num_values; values = g_strsplit (opts[i].value, ",", 2); num_values = g_strv_length (values); @@ -5953,7 +5953,7 @@ typedef struct { static void map_settings_to_option (GtkPrinterOption *option, const NameMapping table[], - gint n_elements, + int n_elements, GtkPrintSettings *settings, const gchar *standard_name, const gchar *cups_name, @@ -6016,7 +6016,7 @@ map_settings_to_option (GtkPrinterOption *option, static void map_option_to_settings (const gchar *value, const NameMapping table[], - gint n_elements, + int n_elements, GtkPrintSettings *settings, const gchar *standard_name, const gchar *cups_name, @@ -6436,7 +6436,7 @@ cups_printer_prepare_for_print (GtkPrinter *printer, { GtkPrintPages pages; GtkPageRange *ranges; - gint n_ranges; + int n_ranges; GtkPageSet page_set; GtkPaperSize *paper_size; const char *ppd_paper_name; @@ -6615,10 +6615,10 @@ static GtkPageSetup * create_page_setup_from_media (gchar *media, MediaSize *media_size, gboolean media_margin_default_set, - gint media_bottom_margin_default, - gint media_top_margin_default, - gint media_left_margin_default, - gint media_right_margin_default) + int media_bottom_margin_default, + int media_top_margin_default, + int media_left_margin_default, + int media_right_margin_default) { GtkPageSetup *page_setup; GtkPaperSize *paper_size; diff --git a/modules/printbackends/gtkprintbackendfile.c b/modules/printbackends/gtkprintbackendfile.c index 071ebec359..79100603bc 100644 --- a/modules/printbackends/gtkprintbackendfile.c +++ b/modules/printbackends/gtkprintbackendfile.c @@ -172,7 +172,7 @@ static OutputFormat format_from_settings (GtkPrintSettings *settings) { const gchar *value; - gint i; + int i; if (settings == NULL) return N_FORMATS; @@ -535,7 +535,7 @@ set_printer_format_from_option_set (GtkPrinter *printer, { GtkPrinterOption *format_option; const gchar *value; - gint i; + int i; format_option = gtk_printer_option_set_lookup (set, "output-file-format"); if (format_option && format_option->value) @@ -590,7 +590,7 @@ file_printer_output_file_format_changed (GtkPrinterOption *format_option, if (dot) { - gint i; + int i; /* check if the file extension matches one of the known ones */ for (i = 0; i < N_FORMATS; i++) @@ -637,10 +637,10 @@ file_printer_get_options (GtkPrinter *printer, const char *format_names[N_FORMATS] = { N_("PDF"), N_("PostScript"), N_("SVG") }; const char *supported_formats[N_FORMATS]; const char *display_format_names[N_FORMATS]; - gint n_formats = 0; + int n_formats = 0; OutputFormat format; char *uri; - gint current_format = 0; + int current_format = 0; _OutputFormatChangedData *format_changed_data; format = format_from_settings (settings); @@ -773,7 +773,7 @@ file_printer_prepare_for_print (GtkPrinter *printer, gdouble scale; GtkPrintPages pages; GtkPageRange *ranges; - gint n_ranges; + int n_ranges; OutputFormat format; pages = gtk_print_settings_get_print_pages (settings); diff --git a/modules/printbackends/gtkprintbackendlpr.c b/modules/printbackends/gtkprintbackendlpr.c index 9635c3095e..b78cc6b2e6 100644 --- a/modules/printbackends/gtkprintbackendlpr.c +++ b/modules/printbackends/gtkprintbackendlpr.c @@ -303,8 +303,8 @@ gtk_print_backend_lpr_print_stream (GtkPrintBackend *print_backend, GError *print_error = NULL; _PrintStreamData *ps; GtkPrintSettings *settings; - gint argc; - gint in_fd; + int argc; + int in_fd; gchar **argv = NULL; const char *cmd_line; @@ -448,7 +448,7 @@ lpr_printer_prepare_for_print (GtkPrinter *printer, double scale; GtkPrintPages pages; GtkPageRange *ranges; - gint n_ranges; + int n_ranges; pages = gtk_print_settings_get_print_pages (settings); gtk_print_job_set_pages (print_job, pages); diff --git a/modules/printbackends/gtkprintercups.h b/modules/printbackends/gtkprintercups.h index 02a440b4e5..af759b0235 100644 --- a/modules/printbackends/gtkprintercups.h +++ b/modules/printbackends/gtkprintercups.h @@ -51,11 +51,11 @@ struct _GtkPrinterCups gchar *original_device_uri; gchar *printer_uri; gchar *hostname; - gint port; + int port; gchar **auth_info_required; gchar *original_hostname; gchar *original_resource; - gint original_port; + int original_port; gboolean request_original_uri; /* Request PPD from original host */ ipp_pstate_t state; @@ -66,10 +66,10 @@ struct _GtkPrinterCups gchar *media_default; GList *media_supported; GList *media_size_supported; - gint media_bottom_margin_default; - gint media_top_margin_default; - gint media_left_margin_default; - gint media_right_margin_default; + int media_bottom_margin_default; + int media_top_margin_default; + int media_left_margin_default; + int media_right_margin_default; gboolean media_margin_default_set; gchar *sides_default; GList *sides_supported; @@ -79,11 +79,11 @@ struct _GtkPrinterCups gchar *default_cover_before; gchar *default_cover_after; - gint default_number_up; + int default_number_up; gboolean remote; guint get_remote_ppd_poll; - gint get_remote_ppd_attempts; + int get_remote_ppd_attempts; GtkCupsConnectionTest *remote_cups_connection_test; #ifdef HAVE_COLORD diff --git a/tests/listmodel.c b/tests/listmodel.c index 09adaa601f..8c3320842b 100644 --- a/tests/listmodel.c +++ b/tests/listmodel.c @@ -14,7 +14,7 @@ typedef struct GObject parent; gchar *label; - gint id; + int id; } MyObject; typedef struct @@ -115,10 +115,10 @@ create_widget (gpointer item, return label; } -static gint +static int compare_items (gconstpointer a, gconstpointer b, gpointer data) { - gint id_a, id_b; + int id_a, id_b; g_object_get ((gpointer)a, "id", &id_a, NULL); g_object_get ((gpointer)b, "id", &id_b, NULL); @@ -129,7 +129,7 @@ compare_items (gconstpointer a, gconstpointer b, gpointer data) static void add_some (GtkButton *button, GListStore *store) { - gint n, i; + int n, i; guint n_items; GObject *obj; gchar *label; @@ -152,7 +152,7 @@ add_some (GtkButton *button, GListStore *store) static void remove_some (GtkButton *button, GListStore *store) { - gint n, i; + int n, i; guint n_items; for (n = 0; n < 50; n++) @@ -170,7 +170,7 @@ main (int argc, char *argv[]) { GtkWidget *window, *grid, *sw, *box, *button; GListStore *store; - gint i; + int i; gtk_init (); diff --git a/tests/overlayscroll.c b/tests/overlayscroll.c index 9a447b5c63..c3b595bb74 100644 --- a/tests/overlayscroll.c +++ b/tests/overlayscroll.c @@ -22,7 +22,7 @@ static gchar * get_content (void) { GString *s; - gint i; + int i; s = g_string_new (""); for (i = 1; i <= 150; i++) @@ -34,7 +34,7 @@ get_content (void) static void mode_changed (GtkComboBox *combo, GtkScrolledWindow *sw) { - gint active = gtk_combo_box_get_active (combo); + int active = gtk_combo_box_get_active (combo); gtk_scrolled_window_set_overlay_scrolling (sw, active == 1); } diff --git a/tests/syncscroll.c b/tests/syncscroll.c index 05338c7607..d42fc9b8f5 100644 --- a/tests/syncscroll.c +++ b/tests/syncscroll.c @@ -3,7 +3,7 @@ static void fill_text_view (GtkWidget *tv, const gchar *text) { - gint i; + int i; GString *s; s = g_string_new (""); diff --git a/tests/testaccel.c b/tests/testaccel.c index 9ff403507d..a74a081e40 100644 --- a/tests/testaccel.c +++ b/tests/testaccel.c @@ -35,7 +35,7 @@ accel_edited_callback (GtkCellRendererText *cell, g_print ("%u %d %u\n", keyval, mask, hardware_keycode); gtk_list_store_set (GTK_LIST_STORE (model), &iter, - 0, (gint)mask, + 0, (int)mask, 1, keyval, 2, hardware_keycode, -1); @@ -63,7 +63,7 @@ key_test (void) GtkListStore *store; GtkTreeViewColumn *column; GtkCellRenderer *rend; - gint i; + int i; GtkWidget *box, *entry; /* create window */ @@ -116,8 +116,8 @@ key_test (void) return window; } -gint -main (gint argc, gchar **argv) +int +main (int argc, gchar **argv) { GtkWidget *dialog; diff --git a/tests/testappchooser.c b/tests/testappchooser.c index 63ec9bfdee..f398694d0e 100644 --- a/tests/testappchooser.c +++ b/tests/testappchooser.c @@ -30,7 +30,7 @@ static GtkWidget *def, *recommended, *fallback, *other, *all; static void dialog_response (GtkDialog *d, - gint response_id, + int response_id, gpointer user_data) { GAppInfo *app_info; diff --git a/tests/testassistant.c b/tests/testassistant.c index 22ee8209c2..00b1674d52 100644 --- a/tests/testassistant.c +++ b/tests/testassistant.c @@ -108,7 +108,7 @@ static gboolean progress_timeout (GtkWidget *assistant) { GtkWidget *progress; - gint current_page; + int current_page; gdouble value; current_page = gtk_assistant_get_current_page (GTK_ASSISTANT (assistant)); @@ -323,8 +323,8 @@ select_branch (GtkWidget *widget, gchar branch) selected_branch = branch; } -static gint -nonlinear_assistant_forward_page (gint current_page, gpointer data) +static int +nonlinear_assistant_forward_page (int current_page, gpointer data) { switch (current_page) { @@ -408,8 +408,8 @@ create_nonlinear_assistant (GtkWidget *widget) } } -static gint -looping_assistant_forward_page (gint current_page, gpointer data) +static int +looping_assistant_forward_page (int current_page, gpointer data) { switch (current_page) { @@ -680,7 +680,7 @@ int main (int argc, gchar *argv[]) { GtkWidget *window, *box, *button; - gint i; + int i; gboolean done = FALSE; gtk_init (); diff --git a/tests/testbaseline.c b/tests/testbaseline.c index f229a9b660..d5fe781876 100644 --- a/tests/testbaseline.c +++ b/tests/testbaseline.c @@ -28,7 +28,7 @@ static void baseline_row_value_changed (GtkSpinButton *spin_button, GtkGrid *grid) { - gint row = gtk_spin_button_get_value_as_int (spin_button); + int row = gtk_spin_button_get_value_as_int (spin_button); gtk_grid_set_baseline_row (grid, row); } @@ -53,13 +53,13 @@ static void image_size_value_changed (GtkSpinButton *spin_button, GtkImage *image) { - gint size = gtk_spin_button_get_value_as_int (spin_button); + int size = gtk_spin_button_get_value_as_int (spin_button); gtk_image_set_pixel_size (GTK_IMAGE (image), size); } static void -set_font_size (GtkWidget *widget, gint size) +set_font_size (GtkWidget *widget, int size) { const gchar *class[3] = { "small-font", "medium-font", "large-font" }; diff --git a/tests/testcalendar.c b/tests/testcalendar.c index de43eac502..2610a86688 100644 --- a/tests/testcalendar.c +++ b/tests/testcalendar.c @@ -182,7 +182,7 @@ create_calendar(void) GtkWidget *calendar = gtk_calendar_new (); GtkWidget *button; GtkWidget *frame, *label, *bbox; - gint i; + int i; struct { const char *prop_name; const char *label; diff --git a/tests/testcellarea.c b/tests/testcellarea.c index 158553c28b..6c66daa98a 100644 --- a/tests/testcellarea.c +++ b/tests/testcellarea.c @@ -466,9 +466,9 @@ cell_spacing_changed (GtkSpinButton *spin_button, GtkIconView *iconview) { GtkCellArea *area = gtk_cell_layout_get_area (GTK_CELL_LAYOUT (iconview)); - gint value; + int value; - value = (gint)gtk_spin_button_get_value (spin_button); + value = (int)gtk_spin_button_get_value (spin_button); gtk_cell_area_box_set_spacing (GTK_CELL_AREA_BOX (area), value); } @@ -477,9 +477,9 @@ static void row_spacing_changed (GtkSpinButton *spin_button, GtkIconView *iconview) { - gint value; + int value; - value = (gint)gtk_spin_button_get_value (spin_button); + value = (int)gtk_spin_button_get_value (spin_button); gtk_icon_view_set_row_spacing (iconview, value); } @@ -488,9 +488,9 @@ static void item_padding_changed (GtkSpinButton *spin_button, GtkIconView *iconview) { - gint value; + int value; - value = (gint)gtk_spin_button_get_value (spin_button); + value = (int)gtk_spin_button_get_value (spin_button); gtk_icon_view_set_item_padding (iconview, value); } diff --git a/tests/testcombo.c b/tests/testcombo.c index fc1a53bedc..fd1099c3df 100644 --- a/tests/testcombo.c +++ b/tests/testcombo.c @@ -736,7 +736,7 @@ capital_sensitive (GtkCellLayout *cell_layout, static gboolean capital_animation (gpointer data) { - static gint insert_count = 0; + static int insert_count = 0; GtkTreeModel *model = GTK_TREE_MODEL (data); GtkTreePath *path; GtkTreeIter iter, parent; @@ -879,7 +879,7 @@ set_sensitive (GtkCellLayout *cell_layout, gpointer data) { GtkTreePath *path; - gint *indices; + int *indices; gboolean sensitive; path = gtk_tree_model_get_path (tree_model, iter); @@ -910,7 +910,7 @@ static void displayed_row_changed (GtkComboBox *combo, GtkCellView *cell) { - gint row; + int row; GtkTreePath *path; row = gtk_combo_box_get_active (combo); @@ -942,7 +942,7 @@ main (int argc, char **argv) GtkTreeIter iter; GtkCellArea *area; gchar *text; - gint i; + int i; gboolean done = FALSE; gtk_init (); diff --git a/tests/testcombochange.c b/tests/testcombochange.c index a72a44ad46..ba06bf88da 100644 --- a/tests/testcombochange.c +++ b/tests/testcombochange.c @@ -115,8 +115,8 @@ static void on_reorder (void) { GArray *new_contents; - gint *shuffle_array; - gint i; + int *shuffle_array; + int i; shuffle_array = g_new (int, contents->len); @@ -125,8 +125,8 @@ on_reorder (void) for (i = 0; i + 1 < contents->len; i++) { - gint pos = g_random_int_range (i, contents->len); - gint tmp; + int pos = g_random_int_range (i, contents->len); + int tmp; tmp = shuffle_array[i]; shuffle_array[i] = shuffle_array[pos]; @@ -150,7 +150,7 @@ on_reorder (void) static int n_animations = 0; static int timer = 0; -static gint +static int animation_timer (gpointer data) { switch (g_random_int_range (0, 3)) diff --git a/tests/testellipsise.c b/tests/testellipsise.c index 07090289db..81ebd98f8e 100644 --- a/tests/testellipsise.c +++ b/tests/testellipsise.c @@ -29,7 +29,7 @@ combo_changed_cb (GtkWidget *combo, gpointer data) { GtkWidget *label = GTK_WIDGET (data); - gint active; + int active; active = gtk_combo_box_get_active (GTK_COMBO_BOX (combo)); gtk_label_set_ellipsize (GTK_LABEL (label), (PangoEllipsizeMode)active); diff --git a/tests/testentrycompletion.c b/tests/testentrycompletion.c index 68985d7383..37473a6b79 100644 --- a/tests/testentrycompletion.c +++ b/tests/testentrycompletion.c @@ -182,7 +182,7 @@ match_func (GtkEntryCompletion *completion, return ret; } -static gint timer_count = 0; +static int timer_count = 0; static const char *dynamic_completions[] = { "GNOME", @@ -210,12 +210,12 @@ static const char *dynamic_completions[] = { "zombie" }; -static gint +static int animation_timer (GtkEntryCompletion *completion) { GtkTreeIter iter; - gint n_completions = G_N_ELEMENTS (dynamic_completions); - gint n; + int n_completions = G_N_ELEMENTS (dynamic_completions); + int n; static GtkListStore *old_store = NULL; GtkListStore *store = GTK_LIST_STORE (gtk_entry_completion_get_model (completion)); diff --git a/tests/testentryicons.c b/tests/testentryicons.c index 9d8bf7fd1f..cc875a5ee9 100644 --- a/tests/testentryicons.c +++ b/tests/testentryicons.c @@ -2,7 +2,7 @@ #include static void -clear_pressed (GtkEntry *entry, gint icon, gpointer data) +clear_pressed (GtkEntry *entry, int icon, gpointer data) { if (icon == GTK_ENTRY_ICON_SECONDARY) gtk_editable_set_text (GTK_EDITABLE (entry), ""); diff --git a/tests/testerrors.c b/tests/testerrors.c index 6b4180cea2..6e92026160 100644 --- a/tests/testerrors.c +++ b/tests/testerrors.c @@ -128,8 +128,8 @@ test_error_trapping (GdkDisplay *gdk_display) XSync (d, TRUE); } -gint -main (gint argc, gchar *argv[]) +int +main (int argc, gchar *argv[]) { GdkDisplay *gdk_display; GdkDisplay *extra_display; diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c index 6e8359a92a..4d3fb13bd7 100644 --- a/tests/testfilechooser.c +++ b/tests/testfilechooser.c @@ -63,7 +63,7 @@ print_selected (GtkFileChooser *chooser) static void response_cb (GtkDialog *dialog, - gint response_id, + int response_id, gpointer data) { gboolean *done = data; diff --git a/tests/testflowbox.c b/tests/testflowbox.c index 6fef5fa2f4..727e16708b 100644 --- a/tests/testflowbox.c +++ b/tests/testflowbox.c @@ -34,13 +34,13 @@ enum { #define N_ITEMS 1000 static GtkFlowBox *the_flowbox = NULL; -static gint items_type = SIMPLE_ITEMS; +static int items_type = SIMPLE_ITEMS; static void populate_flowbox_simple (GtkFlowBox *flowbox) { GtkWidget *widget, *frame; - gint i; + int i; for (i = 0; i < N_ITEMS; i++) { @@ -62,7 +62,7 @@ static void populate_flowbox_focus (GtkFlowBox *flowbox) { GtkWidget *widget, *frame, *box; - gint i; + int i; gboolean sensitive; for (i = 0; i < 200; i++) @@ -110,7 +110,7 @@ static void populate_flowbox_buttons (GtkFlowBox *flowbox) { GtkWidget *widget; - gint i; + int i; for (i = 0; i < 50; i++) { @@ -125,7 +125,7 @@ static void populate_flowbox_wrappy (GtkFlowBox *flowbox) { GtkWidget *widget, *frame; - gint i; + int i; const gchar *strings[] = { "These are", "some wrappy label", "texts", "of various", "lengths.", @@ -156,7 +156,7 @@ static void populate_flowbox_images (GtkFlowBox *flowbox) { GtkWidget *widget, *image, *label; - gint i; + int i; for (i = 0; i < N_ITEMS; i++) { @@ -242,7 +242,7 @@ static void line_length_changed (GtkSpinButton *spin, GtkFlowBox *flowbox) { - gint length = gtk_spin_button_get_value_as_int (spin); + int length = gtk_spin_button_get_value_as_int (spin); gtk_flow_box_set_min_children_per_line (flowbox, length); } @@ -251,7 +251,7 @@ static void max_line_length_changed (GtkSpinButton *spin, GtkFlowBox *flowbox) { - gint length = gtk_spin_button_get_value_as_int (spin); + int length = gtk_spin_button_get_value_as_int (spin); gtk_flow_box_set_max_children_per_line (flowbox, length); } @@ -261,7 +261,7 @@ spacing_changed (GtkSpinButton *button, gpointer data) { GtkOrientation orientation = GPOINTER_TO_INT (data); - gint state = gtk_spin_button_get_value_as_int (button); + int state = gtk_spin_button_get_value_as_int (button); if (orientation == GTK_ORIENTATION_HORIZONTAL) gtk_flow_box_set_column_spacing (the_flowbox, state); @@ -319,7 +319,7 @@ on_selected_children_changed (GtkFlowBox *self) static gboolean filter_func (GtkFlowBoxChild *child, gpointer user_data) { - gint index; + int index; index = gtk_flow_box_child_get_index (child); @@ -338,7 +338,7 @@ filter_toggled (GtkToggleButton *button, gtk_flow_box_set_filter_func (flowbox, NULL, NULL, NULL); } -static gint +static int sort_func (GtkFlowBoxChild *a, GtkFlowBoxChild *b, gpointer data) diff --git a/tests/testfontchooserdialog.c b/tests/testfontchooserdialog.c index 318baeb5b9..7d3a88af0e 100644 --- a/tests/testfontchooserdialog.c +++ b/tests/testfontchooserdialog.c @@ -90,7 +90,7 @@ main (int argc, char *argv[]) { FcConfig *config; PangoFontMap *fontmap; - gint i; + int i; /* Create a custom font configuration by adding font files specified * on the commandline to the default config. diff --git a/tests/testgmenu.c b/tests/testgmenu.c index 579518751d..c4f9639139 100644 --- a/tests/testgmenu.c +++ b/tests/testgmenu.c @@ -350,7 +350,7 @@ create_action_treeview (GActionGroup *group) GtkTreeViewColumn *column; GtkCellRenderer *cell; gchar **group_actions; - gint i; + int i; store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); group_actions = g_action_group_list_actions (group); diff --git a/tests/testgrid.c b/tests/testgrid.c index 97c52cb609..690b7eb94c 100644 --- a/tests/testgrid.c +++ b/tests/testgrid.c @@ -258,7 +258,7 @@ scrolling (void) GtkWidget *viewport; GtkWidget *grid; GtkWidget *child; - gint i; + int i; window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Scrolling"); diff --git a/tests/testgtk.c b/tests/testgtk.c index acb14b7615..674274908e 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -61,8 +61,8 @@ file_exists (const char *filename) static GtkWidget * build_option_menu (const char *items[], - gint num_items, - gint history, + int num_items, + int history, void (*func) (GtkWidget *widget, gpointer data), gpointer data); @@ -92,13 +92,13 @@ typedef struct sTreeButtons { static GtkWidget * build_option_menu (const char *items[], - gint num_items, - gint history, + int num_items, + int history, void (*func)(GtkWidget *widget, gpointer data), gpointer data) { GtkWidget *omenu; - gint i; + int i; omenu = gtk_combo_box_text_new (); g_signal_connect (omenu, "changed", @@ -395,7 +395,7 @@ create_widget_grid (GType widget_type) { GtkWidget *grid; GtkWidget *group_widget = NULL; - gint i, j; + int i, j; grid = gtk_grid_new (); @@ -865,7 +865,7 @@ create_selectable_control (GtkWidget *widget) } static void -dialog_response (GtkWidget *dialog, gint response_id, GtkLabel *label) +dialog_response (GtkWidget *dialog, int response_id, GtkLabel *label) { const gchar *text; @@ -1421,8 +1421,8 @@ create_image (GtkWidget *widget) static int list_sort_cb (GtkListBoxRow *a, GtkListBoxRow *b, gpointer data) { - gint aa = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (a), "value")); - gint bb = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (b), "value")); + int aa = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (a), "value")); + int bb = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (b), "value")); return aa - bb; } @@ -1435,7 +1435,7 @@ list_filter_all_cb (GtkListBoxRow *row, gpointer data) static gboolean list_filter_odd_cb (GtkListBoxRow *row, gpointer data) { - gint value = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "value")); + int value = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "value")); return value % 2 == 0; } @@ -1536,7 +1536,7 @@ create_listbox (GtkWidget *widget) for (i = 0; i < 1000; i++) { - gint value = g_random_int_range (0, 10000); + int value = g_random_int_range (0, 10000); label = gtk_label_new (g_strdup_printf ("Value %u", value)); gtk_list_box_insert (GTK_LIST_BOX (list), label, -1); g_object_set_data (G_OBJECT (gtk_widget_get_parent (label)), "value", GINT_TO_POINTER (value)); @@ -1877,7 +1877,7 @@ scrolled_windows_destroy_cb (GtkWidget *widget, GtkWidget *scrollwin) } static void -scrolled_windows_remove (GtkWidget *dialog, gint response, GtkWidget *scrollwin) +scrolled_windows_remove (GtkWidget *dialog, int response, GtkWidget *scrollwin) { if (response != GTK_RESPONSE_APPLY) { @@ -2458,7 +2458,7 @@ get_spin_value (GtkWidget *widget, gpointer data) g_free (buffer); } -static gint +static int spin_button_time_output_func (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; @@ -2475,11 +2475,11 @@ spin_button_time_output_func (GtkSpinButton *spin_button) return TRUE; } -static gint +static int spin_button_month_input_func (GtkSpinButton *spin_button, gdouble *new_val) { - gint i; + int i; static const char *month[12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; @@ -2506,12 +2506,12 @@ spin_button_month_input_func (GtkSpinButton *spin_button, return TRUE; } -static gint +static int spin_button_month_output_func (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; gdouble value; - gint i; + int i; static const char *month[12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; @@ -2527,7 +2527,7 @@ spin_button_month_output_func (GtkSpinButton *spin_button) return TRUE; } -static gint +static int spin_button_hex_input_func (GtkSpinButton *spin_button, gdouble *new_val) { @@ -2544,7 +2544,7 @@ spin_button_hex_input_func (GtkSpinButton *spin_button, return TRUE; } -static gint +static int spin_button_hex_output_func (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; @@ -2556,7 +2556,7 @@ spin_button_hex_output_func (GtkSpinButton *spin_button) if (fabs (val) < 1e-5) sprintf (buf, "0x00"); else - sprintf (buf, "0x%.2X", (gint) val); + sprintf (buf, "0x%.2X", (int) val); if (strcmp (buf, gtk_editable_get_text (GTK_EDITABLE (spin_button)))) gtk_editable_set_text (GTK_EDITABLE (spin_button), buf); @@ -2854,7 +2854,7 @@ static GtkTreeModel * cursor_model (void) { GtkListStore *store; - gint i; + int i; store = gtk_list_store_new (1, G_TYPE_STRING); for (i = 0; i < G_N_ELEMENTS (cursor_names); i++) @@ -2872,8 +2872,8 @@ cursor_pressed_cb (GtkGesture *gesture, { GtkWidget *widget; const gchar *name; - gint i; - const gint n = G_N_ELEMENTS (cursor_names); + int i; + const int n = G_N_ELEMENTS (cursor_names); int button; widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture)); @@ -2922,7 +2922,7 @@ change_cursor_theme (GtkWidget *widget, { #if defined(GDK_WINDOWING_X11) || defined (GDK_WINDOWING_WAYLAND) const gchar *theme; - gint size; + int size; GdkDisplay *display; GtkWidget *entry; GtkWidget *spin; @@ -2931,7 +2931,7 @@ change_cursor_theme (GtkWidget *widget, spin = gtk_widget_get_next_sibling (entry); theme = gtk_editable_get_text (GTK_EDITABLE (entry)); - size = (gint) gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin)); + size = (int) gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin)); display = gtk_widget_get_display (widget); #ifdef GDK_WINDOWING_X11 @@ -3310,7 +3310,7 @@ create_font_selection (GtkWidget *widget) static GtkWidget *dialog_window = NULL; static void -dialog_response_cb (GtkWidget *widget, gint response, gpointer unused) +dialog_response_cb (GtkWidget *widget, int response, gpointer unused) { GtkWidget *content_area; GtkWidget *child; @@ -3421,7 +3421,7 @@ screen_display_check (GtkWidget *widget, ScreenDisplaySelection *data) else { GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (data->combo)); - gint i = 0; + int i = 0; GtkTreeIter iter; gboolean found = FALSE; while (gtk_tree_model_iter_nth_child (model, &iter, NULL, i++)) @@ -3676,7 +3676,7 @@ GdkPixbuf *book_closed; GtkWidget *sample_notebook; static void -set_page_image (GtkNotebook *notebook, gint page_num, GdkPixbuf *pixbuf) +set_page_image (GtkNotebook *notebook, int page_num, GdkPixbuf *pixbuf) { GtkWidget *page_widget; GtkWidget *pixwid; @@ -3691,10 +3691,10 @@ set_page_image (GtkNotebook *notebook, gint page_num, GdkPixbuf *pixbuf) } static void -page_switch (GtkWidget *widget, gpointer *page, gint page_num) +page_switch (GtkWidget *widget, gpointer *page, int page_num) { GtkNotebook *notebook = GTK_NOTEBOOK (widget); - gint old_page_num = gtk_notebook_get_current_page (notebook); + int old_page_num = gtk_notebook_get_current_page (notebook); if (page_num == old_page_num) return; @@ -3720,7 +3720,7 @@ tab_expand (GtkToggleButton *button, GtkWidget *child) } static void -create_pages (GtkNotebook *notebook, gint start, gint end) +create_pages (GtkNotebook *notebook, int start, int end) { GtkWidget *child = NULL; GtkWidget *button; @@ -3730,7 +3730,7 @@ create_pages (GtkNotebook *notebook, gint start, gint end) GtkWidget *label_box; GtkWidget *menu_box; GtkWidget *pixwid; - gint i; + int i; char buffer[32]; char accel_buffer[32]; @@ -3816,7 +3816,7 @@ notebook_type_changed (GtkWidget *optionmenu, gpointer data) { GtkNotebook *notebook; - gint i, c; + int i, c; enum { STANDARD, @@ -4863,8 +4863,8 @@ create_surface_states (GtkWidget *widget) static void get_ints (GtkWidget *window, - gint *a, - gint *b) + int *a, + int *b) { GtkWidget *spin1; GtkWidget *spin2; @@ -4880,7 +4880,7 @@ static void set_size_callback (GtkWidget *widget, gpointer data) { - gint w, h; + int w, h; get_ints (data, &w, &h); @@ -4899,7 +4899,7 @@ static void set_default_size_callback (GtkWidget *widget, gpointer data) { - gint w, h; + int w, h; get_ints (data, &w, &h); @@ -4919,7 +4919,7 @@ static void set_size_request_callback (GtkWidget *widget, gpointer data) { - gint w, h; + int w, h; get_ints (data, &w, &h); @@ -5158,7 +5158,7 @@ static void progressbar_toggle_orientation (GtkWidget *widget, gpointer data) { ProgressData *pdata; - gint i; + int i; pdata = (ProgressData *) data; @@ -5194,7 +5194,7 @@ progressbar_toggle_ellipsize (GtkWidget *widget, ProgressData *pdata = data; if (gtk_widget_is_drawable (widget)) { - gint i = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); + int i = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); gtk_progress_bar_set_ellipsize (GTK_PROGRESS_BAR (pdata->pbar), i); } } @@ -5502,7 +5502,7 @@ hide_native (GtkWidget *button, static void native_response (GtkNativeDialog *self, - gint response_id, + int response_id, GtkWidget *label) { static int count = 0; diff --git a/tests/testheightforwidth.c b/tests/testheightforwidth.c index 2d825b4158..063a916f5b 100644 --- a/tests/testheightforwidth.c +++ b/tests/testheightforwidth.c @@ -655,7 +655,7 @@ static GtkWidget * create_window (void) { GtkWidget *window, *vbox, *button; - gint i; + int i; window = gtk_window_new (); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); diff --git a/tests/testiconview-keynav.c b/tests/testiconview-keynav.c index 000304dc5d..f7a97223c7 100644 --- a/tests/testiconview-keynav.c +++ b/tests/testiconview-keynav.c @@ -117,7 +117,7 @@ keynav_failed (GtkWidget *view, GtkTreePath *path; GtkTreeModel *model; GtkTreeIter iter; - gint col; + int col; GtkTreePath *sel; if (view == views->view1 && direction == GTK_DIR_DOWN) diff --git a/tests/testiconview.c b/tests/testiconview.c index 4fb6723ead..a09aba44f9 100644 --- a/tests/testiconview.c +++ b/tests/testiconview.c @@ -124,15 +124,15 @@ swap_rows (GtkWidget *button, GtkIconView *icon_list) } static void -add_n_items (GtkIconView *icon_list, gint n) +add_n_items (GtkIconView *icon_list, int n) { - static gint count = NUMBER_OF_ITEMS; + static int count = NUMBER_OF_ITEMS; GtkTreeIter iter; GtkListStore *store; GdkPixbuf *pixbuf; gchar *str, *str2; - gint i; + int i; store = GTK_LIST_STORE (gtk_icon_view_get_model (icon_list)); pixbuf = gdk_pixbuf_new_from_file ("gnome-textfile.png", NULL); @@ -390,8 +390,8 @@ popup_menu_handler (GtkWidget *widget) return TRUE; } -gint -main (gint argc, gchar **argv) +int +main (int argc, gchar **argv) { GtkWidget *paned, *tv; GtkWidget *window, *icon_list, *scrolled_window; diff --git a/tests/testkineticscrolling.c b/tests/testkineticscrolling.c index ba72529584..be9d49f640 100644 --- a/tests/testkineticscrolling.c +++ b/tests/testkineticscrolling.c @@ -30,7 +30,7 @@ kinetic_scrolling (void) GtkListStore *store; GtkWidget *textview; GdkContentFormats *targets; - gint i; + int i; window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 400, 400); diff --git a/tests/testlist.c b/tests/testlist.c index b781c28980..25579739be 100644 --- a/tests/testlist.c +++ b/tests/testlist.c @@ -9,7 +9,7 @@ struct _Row { GtkListBoxRow parent_instance; GtkWidget *label; - gint sort_id; + int sort_id; }; struct _RowClass @@ -44,7 +44,7 @@ row_class_init (RowClass *class) } static GtkWidget * -row_new (const gchar* text, gint sort_id) { +row_new (const gchar* text, int sort_id) { Row *row; row = g_object_new (row_get_type (), NULL); diff --git a/tests/testlist2.c b/tests/testlist2.c index 11229c557a..e9465f63bd 100644 --- a/tests/testlist2.c +++ b/tests/testlist2.c @@ -50,7 +50,7 @@ static void add_row_below (GtkButton *button, GtkWidget *child) { GtkWidget *revealer, *row, *list; - gint index; + int index; row = gtk_widget_get_parent (child); index = gtk_list_box_row_get_index (GTK_LIST_BOX_ROW (row)); @@ -109,7 +109,7 @@ quit_cb (GtkWidget *widget, int main (int argc, char *argv[]) { GtkWidget *window, *list, *sw, *row; - gint i; + int i; gchar *text; gboolean done = FALSE; diff --git a/tests/testlist3.c b/tests/testlist3.c index f3f6b3b0dd..a800f3b9f3 100644 --- a/tests/testlist3.c +++ b/tests/testlist3.c @@ -126,7 +126,7 @@ main (int argc, char *argv[]) { GtkWidget *window, *list, *sw, *row; GtkWidget *hbox, *vbox, *combo, *button; - gint i; + int i; gchar *text; GtkCssProvider *provider; diff --git a/tests/testlist4.c b/tests/testlist4.c index ce0500d24e..e7bbf3ed5b 100644 --- a/tests/testlist4.c +++ b/tests/testlist4.c @@ -93,7 +93,7 @@ new_window (GApplication *app) GtkWidget *row_content; GtkListBoxRow *row; - gint i; + int i; gchar *text, *text2; window = gtk_application_window_new (GTK_APPLICATION (app)); diff --git a/tests/testmountoperation.c b/tests/testmountoperation.c index c4cecc3032..d6222c622d 100644 --- a/tests/testmountoperation.c +++ b/tests/testmountoperation.c @@ -38,7 +38,7 @@ got_reply (GMountOperation *op, if (ask_question) { - gint choice = g_mount_operation_get_choice (op); + int choice = g_mount_operation_get_choice (op); g_print ("User chose: %d\n", choice); } else diff --git a/tests/testnotebookdnd.c b/tests/testnotebookdnd.c index dc6c6b2b15..3858aa6383 100644 --- a/tests/testnotebookdnd.c +++ b/tests/testnotebookdnd.c @@ -58,8 +58,8 @@ const char *tabs4 [] = { static GtkNotebook* window_creation_function (GtkNotebook *source_notebook, GtkWidget *child, - gint x, - gint y, + int x, + int y, gpointer data) { GtkWidget *window, *notebook; @@ -230,7 +230,7 @@ create_notebook_with_notebooks (const char **labels, GtkPositionType pos) { GtkWidget *notebook, *title, *page; - gint count = 0; + int count = 0; notebook = gtk_notebook_new (); g_signal_connect (notebook, "create-window", @@ -286,8 +286,8 @@ quit_cb (GtkWidget *widget, g_main_context_wakeup (NULL); } -gint -main (gint argc, gchar *argv[]) +int +main (int argc, gchar *argv[]) { GtkWidget *window, *grid; gboolean done = FALSE; diff --git a/tests/testrc.c b/tests/testrc.c index 6ef1e0ee49..91d979bfc1 100644 --- a/tests/testrc.c +++ b/tests/testrc.c @@ -50,7 +50,7 @@ load_types (void) int main (int argc, char *argv[]) { - gint i; + int i; gtk_init (); load_types (); diff --git a/tests/testrevealer.c b/tests/testrevealer.c index a36080f21e..9ec28b3caa 100644 --- a/tests/testrevealer.c +++ b/tests/testrevealer.c @@ -1,7 +1,7 @@ #include -gint -main (gint argc, +int +main (int argc, gchar ** argv) { GtkWidget *window, *revealer, *box, *widget, *entry; diff --git a/tests/testscrolledge.c b/tests/testscrolledge.c index 70820d66f5..94f808f7e8 100644 --- a/tests/testscrolledge.c +++ b/tests/testscrolledge.c @@ -23,10 +23,10 @@ static guint add_rows_id = 0; static void populate_list (GtkListBox *list) { - gint i; + int i; gchar *text; GtkWidget *row, *label; - gint n; + int n; GtkWidget *child; for (child = gtk_widget_get_first_child (GTK_WIDGET (list)), n = 0; diff --git a/tests/testscrolledwindow.c b/tests/testscrolledwindow.c index ca772c12dd..6642ef3b44 100644 --- a/tests/testscrolledwindow.c +++ b/tests/testscrolledwindow.c @@ -27,7 +27,7 @@ content_width_changed (GtkSpinButton *spin_button, gdouble value; value = gtk_spin_button_get_value (spin_button); - gtk_scrolled_window_set_min_content_width (swindow, (gint)value); + gtk_scrolled_window_set_min_content_width (swindow, (int)value); } static void @@ -38,7 +38,7 @@ content_height_changed (GtkSpinButton *spin_button, gdouble value; value = gtk_spin_button_get_value (spin_button); - gtk_scrolled_window_set_min_content_height (swindow, (gint)value); + gtk_scrolled_window_set_min_content_height (swindow, (int)value); } static void diff --git a/tests/testselectionmode.c b/tests/testselectionmode.c index 7157c8ec02..325e80b2f0 100644 --- a/tests/testselectionmode.c +++ b/tests/testselectionmode.c @@ -78,7 +78,7 @@ selectable_row_new (void) } static void -add_row (GtkWidget *list, gint i) +add_row (GtkWidget *list, int i) { GtkWidget *row; GtkWidget *label; @@ -190,7 +190,7 @@ main (int argc, char *argv[]) GtkWidget *window; GtkWidget *list; GtkWidget *button; - gint i; + int i; GSimpleActionGroup *group; GSimpleAction *action; diff --git a/tests/testspinbutton.c b/tests/testspinbutton.c index ef8f2db648..0d21cf3a0b 100644 --- a/tests/testspinbutton.c +++ b/tests/testspinbutton.c @@ -18,7 +18,7 @@ #include "config.h" #include -static gint num_windows = 0; +static int num_windows = 0; static gboolean done = FALSE; diff --git a/tests/teststack.c b/tests/teststack.c index 39e77ff190..571d58fc07 100644 --- a/tests/teststack.c +++ b/tests/teststack.c @@ -53,7 +53,7 @@ on_back_button_clicked (GtkButton *button, gpointer user_data) { const gchar *seq[] = { "1", "2", "3" }; const gchar *vis; - gint i; + int i; vis = gtk_stack_get_visible_child_name (GTK_STACK (stack)); @@ -72,7 +72,7 @@ on_forward_button_clicked (GtkButton *button, gpointer user_data) { const gchar *seq[] = { "1", "2", "3" }; const gchar *vis; - gint i; + int i; vis = gtk_stack_get_visible_child_name (GTK_STACK (stack)); @@ -104,8 +104,8 @@ update_forward_button_sensitivity (GtkStack *_stack, GParamSpec *pspec, GtkWidge gtk_widget_set_sensitive (button, g_strcmp0 (vis, "3") != 0); } -gint -main (gint argc, +int +main (int argc, gchar ** argv) { GtkWidget *window, *box, *button, *hbox, *combo, *layout; diff --git a/tests/testtexthistory.c b/tests/testtexthistory.c index 8332b4d8a1..fddc86daf5 100644 --- a/tests/testtexthistory.c +++ b/tests/testtexthistory.c @@ -126,8 +126,8 @@ do_delete (gpointer funcs_data, static void do_select (gpointer funcs_data, - gint selection_insert, - gint selection_bound) + int selection_insert, + int selection_bound) { Text *text = funcs_data; diff --git a/tests/testtooltips.c b/tests/testtooltips.c index e7a91889ff..a955d56dd5 100644 --- a/tests/testtooltips.c +++ b/tests/testtooltips.c @@ -59,8 +59,8 @@ my_tooltip_class_init (MyTooltipClass *tt_class) static gboolean query_tooltip_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) @@ -73,8 +73,8 @@ query_tooltip_cb (GtkWidget *widget, static gboolean query_tooltip_text_view_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) @@ -86,14 +86,14 @@ query_tooltip_text_view_cb (GtkWidget *widget, if (keyboard_tip) { - gint offset; + int offset; g_object_get (buffer, "cursor-position", &offset, NULL); gtk_text_buffer_get_iter_at_offset (buffer, &iter, offset); } else { - gint bx, by, trailing; + int bx, by, trailing; gtk_text_view_window_to_buffer_coords (text_view, GTK_TEXT_WINDOW_TEXT, x, y, &bx, &by); @@ -110,8 +110,8 @@ query_tooltip_text_view_cb (GtkWidget *widget, static gboolean query_tooltip_tree_view_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) @@ -179,8 +179,8 @@ selection_changed_cb (GtkTreeSelection *selection, static struct Rectangle { - gint x; - gint y; + int x; + int y; gfloat r; gfloat g; gfloat b; @@ -195,13 +195,13 @@ rectangles[] = static gboolean query_tooltip_drawing_area_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) { - gint i; + int i; if (keyboard_tip) return FALSE; @@ -228,7 +228,7 @@ drawing_area_draw (GtkDrawingArea *drawing_area, int height, gpointer data) { - gint i; + int i; cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); cairo_paint (cr); @@ -249,8 +249,8 @@ drawing_area_draw (GtkDrawingArea *drawing_area, static gboolean query_tooltip_label_cb (GtkWidget *widget, - gint x, - gint y, + int x, + int y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) diff --git a/tests/testtreecolumns.c b/tests/testtreecolumns.c index 47030f8f9b..768418d315 100644 --- a/tests/testtreecolumns.c +++ b/tests/testtreecolumns.c @@ -68,7 +68,7 @@ struct _ViewColumnModel GtkListStore parent; GtkTreeView *view; GList *columns; - gint stamp; + int stamp; }; struct _ViewColumnModelClass @@ -94,7 +94,7 @@ static void view_column_model_init (ViewColumnModel *model) model->stamp = g_random_int (); } -static gint +static int view_column_model_get_n_columns (GtkTreeModel *tree_model) { return 2; @@ -102,7 +102,7 @@ view_column_model_get_n_columns (GtkTreeModel *tree_model) static GType view_column_model_get_column_type (GtkTreeModel *tree_model, - gint index) + int index) { switch (index) { @@ -123,7 +123,7 @@ view_column_model_get_iter (GtkTreeModel *tree_model, { ViewColumnModel *view_model = (ViewColumnModel *)tree_model; GList *list; - gint i; + int i; g_return_val_if_fail (gtk_tree_path_get_depth (path) > 0, FALSE); @@ -146,7 +146,7 @@ view_column_model_get_path (GtkTreeModel *tree_model, ViewColumnModel *view_model = (ViewColumnModel *)tree_model; GtkTreePath *retval; GList *list; - gint i = 0; + int i = 0; g_return_val_if_fail (iter->stamp == view_model->stamp, NULL); @@ -167,7 +167,7 @@ view_column_model_get_path (GtkTreeModel *tree_model, static void view_column_model_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value) { #ifndef G_DISABLE_CHECKS @@ -237,18 +237,18 @@ view_column_model_iter_has_child (GtkTreeModel *tree_model, return FALSE; } -static gint +static int view_column_model_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter) { return g_list_length (((ViewColumnModel *)tree_model)->columns); } -static gint +static int view_column_model_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n) + int n) { ViewColumnModel *view_model = (ViewColumnModel *)tree_model; @@ -385,7 +385,7 @@ static void update_columns (GtkTreeView *view, ViewColumnModel *view_model) { GList *old_columns = view_model->columns; - gint old_length, length; + int old_length, length; GList *a, *b; view_model->columns = gtk_tree_view_get_columns (view_model->view); @@ -396,7 +396,7 @@ update_columns (GtkTreeView *view, ViewColumnModel *view_model) if (length != old_length) { GtkTreePath *path; - gint i = 0; + int i = 0; /* where are they different */ for (a = old_columns, b = view_model->columns; a && b; a = a->next, b = b->next) @@ -423,9 +423,9 @@ update_columns (GtkTreeView *view, ViewColumnModel *view_model) } else { - gint i; - gint m = 0, n = 1; - gint *new_order; + int i; + int m = 0, n = 1; + int *new_order; GtkTreePath *path; new_order = g_new (int, length); @@ -505,7 +505,7 @@ view_column_model_new (GtkTreeView *view) static void add_clicked (GtkWidget *button, gpointer data) { - static gint i = 0; + static int i = 0; GtkTreeIter iter; GtkTreeViewColumn *column; @@ -608,7 +608,7 @@ move_to_right (GtkTreeIter *src_iter, { gchar *label; GtkTreeViewColumn *column; - gint before = -1; + int before = -1; gtk_tree_model_get (GTK_TREE_MODEL (left_tree_model), src_iter, 0, &label, 1, &column, -1); @@ -637,7 +637,7 @@ move_up_or_down (GtkTreeModel *src, { GtkTreeViewColumn *column; gchar *label; - gint before = -1; + int before = -1; gtk_tree_model_get (src, src_iter, 0, &label, 1, &column, -1); @@ -732,7 +732,7 @@ main (int argc, char *argv[]) GtkWidget *swindow; GtkTreeModel *sample_model; GdkContentFormats *targets; - gint i; + int i; gboolean done = FALSE; gtk_init (); diff --git a/tests/testtreeedit.c b/tests/testtreeedit.c index e528d50191..e3b17668ef 100644 --- a/tests/testtreeedit.c +++ b/tests/testtreeedit.c @@ -23,7 +23,7 @@ typedef struct { const gchar *string; gboolean is_editable; gboolean is_sensitive; - gint progress; + int progress; } ListEntry; enum { @@ -52,7 +52,7 @@ create_model (void) { GtkTreeStore *model; GtkTreeIter iter; - gint i; + int i; model = gtk_tree_store_new (NUM_COLUMNS, G_TYPE_STRING, @@ -184,7 +184,7 @@ enum { }; static void -create_control (GtkWidget *box, gint number, gint cntl, CallbackData *data) +create_control (GtkWidget *box, int number, int cntl, CallbackData *data) { GtkWidget *checkbutton; GCallback callback = NULL; @@ -227,8 +227,8 @@ quit_cb (GtkWidget *widget, g_main_context_wakeup (NULL); } -gint -main (gint argc, gchar **argv) +int +main (int argc, gchar **argv) { GtkWidget *window; GtkWidget *scrolled_window; diff --git a/tests/testtreeflow.c b/tests/testtreeflow.c index de9e235878..6b882bff36 100644 --- a/tests/testtreeflow.c +++ b/tests/testtreeflow.c @@ -46,7 +46,7 @@ static const char *words[] = static void initialize_model (void) { - gint i; + int i; GtkTreeIter iter; model = (GtkTreeModel *) gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING); @@ -63,7 +63,7 @@ initialize_model (void) static void futz_row (void) { - gint i; + int i; GtkTreePath *path; GtkTreeIter iter; GtkTreeIter iter2; @@ -110,7 +110,7 @@ futz_row (void) static gboolean futz (void) { - gint i; + int i; for (i = 0; i < 15; i++) futz_row (); diff --git a/tests/testtreefocus.c b/tests/testtreefocus.c index 1f6f2d1dd8..da5802c3bf 100644 --- a/tests/testtreefocus.c +++ b/tests/testtreefocus.c @@ -324,7 +324,7 @@ set_indicator_size (GtkTreeViewColumn *column, GtkTreeIter *iter, gpointer data) { - gint size; + int size; GtkTreePath *path; path = gtk_tree_model_get_path (model, iter); @@ -354,7 +354,7 @@ main (int argc, char *argv[]) GtkWidget *tree_view; GtkTreeModel *model; GtkCellRenderer *renderer; - gint col_offset; + int col_offset; GtkTreeViewColumn *column; gboolean done = FALSE; diff --git a/tests/testtreemodel.c b/tests/testtreemodel.c index 2becbd0d1b..dffa4647d6 100644 --- a/tests/testtreemodel.c +++ b/tests/testtreemodel.c @@ -25,8 +25,8 @@ #include -static gint repeats = 2; -static gint max_size = 8; +static int repeats = 2; +static int max_size = 8; static GOptionEntry entries[] = { { "repeats", 'r', 0, G_OPTION_ARG_INT, &repeats, "Average over N repetitions", "N" }, @@ -37,13 +37,13 @@ static GOptionEntry entries[] = { typedef void (ClearFunc)(GtkTreeModel *model); typedef void (InsertFunc)(GtkTreeModel *model, - gint items, - gint i); + int items, + int i); static void list_store_append (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkListStore *store = GTK_LIST_STORE (model); GtkTreeIter iter; @@ -57,8 +57,8 @@ list_store_append (GtkTreeModel *model, static void list_store_prepend (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkListStore *store = GTK_LIST_STORE (model); GtkTreeIter iter; @@ -72,13 +72,13 @@ list_store_prepend (GtkTreeModel *model, static void list_store_insert (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkListStore *store = GTK_LIST_STORE (model); GtkTreeIter iter; gchar *text; - gint n; + int n; text = g_strdup_printf ("row %d", i); n = g_random_int_range (0, i + 1); @@ -87,14 +87,14 @@ list_store_insert (GtkTreeModel *model, g_free (text); } -static gint +static int compare (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data) { gchar *str_a, *str_b; - gint result; + int result; gtk_tree_model_get (model, a, 1, &str_a, -1); gtk_tree_model_get (model, b, 1, &str_b, -1); @@ -109,8 +109,8 @@ compare (GtkTreeModel *model, static void tree_store_append (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkTreeStore *store = GTK_TREE_STORE (model); GtkTreeIter iter; @@ -124,8 +124,8 @@ tree_store_append (GtkTreeModel *model, static void tree_store_prepend (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkTreeStore *store = GTK_TREE_STORE (model); GtkTreeIter iter; @@ -139,13 +139,13 @@ tree_store_prepend (GtkTreeModel *model, static void tree_store_insert_flat (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkTreeStore *store = GTK_TREE_STORE (model); GtkTreeIter iter; gchar *text; - gint n; + int n; text = g_strdup_printf ("row %d", i); n = g_random_int_range (0, i + 1); @@ -155,8 +155,8 @@ tree_store_insert_flat (GtkTreeModel *model, } typedef struct { - gint i; - gint n; + int i; + int n; gboolean found; GtkTreeIter iter; } FindData; @@ -183,8 +183,8 @@ find_nth (GtkTreeModel *model, static void tree_store_insert_deep (GtkTreeModel *model, - gint items, - gint i) + int items, + int i) { GtkTreeStore *store = GTK_TREE_STORE (model); GtkTreeIter iter; @@ -209,7 +209,7 @@ test_run (const char *title, ClearFunc *clear, InsertFunc *insert) { - gint i, k, d, items; + int i, k, d, items; GTimer *timer; gdouble elapsed; int memused; diff --git a/tests/testtreepos.c b/tests/testtreepos.c index e2c26e90f6..80be31a0be 100644 --- a/tests/testtreepos.c +++ b/tests/testtreepos.c @@ -2,18 +2,18 @@ static gboolean clicked_icon (GtkTreeView *tv, - gint x, - gint y, + int x, + int y, GtkTreePath **path) { GtkTreeViewColumn *col; - gint cell_x, cell_y; - gint cell_pos, cell_width; + int cell_x, cell_y; + int cell_pos, cell_width; GList *cells, *l; - gint depth; - gint level_indentation; - gint expander_size; - gint indent; + int depth; + int level_indentation; + int expander_size; + int indent; if (gtk_tree_view_get_path_at_pos (tv, x, y, path, &col, &cell_x, &cell_y)) { @@ -60,7 +60,7 @@ release_event (GtkGestureClick *gesture, GtkTreeView *tv) { GtkTreePath *path; - gint tx, ty; + int tx, ty; gtk_tree_view_convert_widget_to_tree_coords (tv, x, y, &tx, &ty); diff --git a/tests/testtreesort.c b/tests/testtreesort.c index a85240d06e..8b923c11dc 100644 --- a/tests/testtreesort.c +++ b/tests/testtreesort.c @@ -27,7 +27,7 @@ struct _ListSort const gchar *word_2; const gchar *word_3; const gchar *word_4; - gint number_1; + int number_1; }; static ListSort data[] = @@ -105,7 +105,7 @@ main (int argc, char *argv[]) GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeIter iter; - gint i; + int i; GtkWidget *entry, *button; GtkWidget *window2, *vbox2, *scrolled_window2, *tree_view2; @@ -155,7 +155,7 @@ main (int argc, char *argv[]) /* 12 iters now, 12 later... */ for (i = 0; data[i].word_1 != NULL; i++) { - gint k; + int k; GtkTreeIter child_iter; @@ -374,7 +374,7 @@ main (int argc, char *argv[]) for (i = 0; data[i].word_1 != NULL; i++) { - gint k; + int k; gtk_tree_store_prepend (GTK_TREE_STORE (model), &iter, NULL); gtk_tree_store_set (GTK_TREE_STORE (model), &iter, diff --git a/tests/testtreeview.c b/tests/testtreeview.c index f6854a74d7..2efb476b22 100644 --- a/tests/testtreeview.c +++ b/tests/testtreeview.c @@ -66,7 +66,7 @@ struct _GtkTreeModelTypes { GObject parent; - gint stamp; + int stamp; }; struct _GtkTreeModelTypesClass @@ -74,9 +74,9 @@ struct _GtkTreeModelTypesClass GObjectClass parent_class; guint (* get_flags) (GtkTreeModel *tree_model); - gint (* get_n_columns) (GtkTreeModel *tree_model); + int (* get_n_columns) (GtkTreeModel *tree_model); GType (* get_column_type) (GtkTreeModel *tree_model, - gint index); + int index); gboolean (* get_iter) (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path); @@ -84,7 +84,7 @@ struct _GtkTreeModelTypesClass GtkTreeIter *iter); void (* get_value) (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value); gboolean (* iter_next) (GtkTreeModel *tree_model, GtkTreeIter *iter); @@ -93,12 +93,12 @@ struct _GtkTreeModelTypesClass GtkTreeIter *parent); gboolean (* iter_has_child) (GtkTreeModel *tree_model, GtkTreeIter *iter); - gint (* iter_n_children) (GtkTreeModel *tree_model, + int (* iter_n_children) (GtkTreeModel *tree_model, GtkTreeIter *iter); gboolean (* iter_nth_child) (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n); + int n); gboolean (* iter_parent) (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *child); @@ -502,7 +502,7 @@ create_list_model (void) { GtkListStore *store; GtkTreeIter iter; - gint i; + int i; GType *t; t = get_model_types (); @@ -543,7 +543,7 @@ typesystem_recurse (GType type, { GType* children; guint n_children = 0; - gint i; + int i; GtkTreeIter iter; gchar *str; @@ -575,7 +575,7 @@ static GtkTreeModel* create_tree_model (void) { GtkTreeStore *store; - gint i; + int i; GType *t; /* Make the tree more interesting */ @@ -608,7 +608,7 @@ static void model_selected (GtkComboBox *combo_box, gpointer data) { GtkTreeView *tree_view = GTK_TREE_VIEW (data); - gint hist; + int hist; hist = gtk_combo_box_get_active (combo_box); @@ -622,7 +622,7 @@ static void columns_selected (GtkComboBox *combo_box, gpointer data) { GtkTreeView *tree_view = GTK_TREE_VIEW (data); - gint hist; + int hist; hist = gtk_combo_box_get_active (combo_box); @@ -663,7 +663,7 @@ main (int argc, GtkWidget *combo_box; GtkTreeModel *model; GdkContentFormats *targets; - gint i; + int i; gboolean done = FALSE; gtk_init (); @@ -769,14 +769,14 @@ main (int argc, static void gtk_tree_model_types_init (GtkTreeModelTypes *model_types); static void gtk_tree_model_types_tree_model_init (GtkTreeModelIface *iface); -static gint gtk_real_model_types_get_n_columns (GtkTreeModel *tree_model); +static int gtk_real_model_types_get_n_columns (GtkTreeModel *tree_model); static GType gtk_real_model_types_get_column_type (GtkTreeModel *tree_model, - gint index); + int index); static GtkTreePath *gtk_real_model_types_get_path (GtkTreeModel *tree_model, GtkTreeIter *iter); static void gtk_real_model_types_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value); static gboolean gtk_real_model_types_iter_next (GtkTreeModel *tree_model, GtkTreeIter *iter); @@ -785,12 +785,12 @@ static gboolean gtk_real_model_types_iter_children (GtkTreeModel *t GtkTreeIter *parent); static gboolean gtk_real_model_types_iter_has_child (GtkTreeModel *tree_model, GtkTreeIter *iter); -static gint gtk_real_model_types_iter_n_children (GtkTreeModel *tree_model, +static int gtk_real_model_types_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter); static gboolean gtk_real_model_types_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n); + int n); static gboolean gtk_real_model_types_iter_parent (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *child); @@ -870,7 +870,7 @@ static GType column_types[] = { G_TYPE_STRING /* type name */ }; -static gint +static int gtk_real_model_types_get_n_columns (GtkTreeModel *tree_model) { return G_N_ELEMENTS (column_types); @@ -878,7 +878,7 @@ gtk_real_model_types_get_n_columns (GtkTreeModel *tree_model) static GType gtk_real_model_types_get_column_type (GtkTreeModel *tree_model, - gint index) + int index) { g_return_val_if_fail (index < G_N_ELEMENTS (column_types), G_TYPE_INVALID); @@ -919,7 +919,7 @@ gtk_real_model_types_get_path (GtkTreeModel *tree_model, while (parent != G_TYPE_INVALID) { GType* children = g_type_children (parent, NULL); - gint i = 0; + int i = 0; if (!children || children[0] == G_TYPE_INVALID) { @@ -947,7 +947,7 @@ gtk_real_model_types_get_path (GtkTreeModel *tree_model, static void gtk_real_model_types_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, + int column, GValue *value) { GType type; @@ -1008,7 +1008,7 @@ gtk_real_model_types_iter_next (GtkTreeModel *tree_model, else { GType* children = g_type_children (parent, NULL); - gint i = 0; + int i = 0; g_assert (children != NULL); @@ -1079,7 +1079,7 @@ gtk_real_model_types_iter_has_child (GtkTreeModel *tree_model, } } -static gint +static int gtk_real_model_types_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter) { @@ -1107,7 +1107,7 @@ static gboolean gtk_real_model_types_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, - gint n) + int n) { if (parent == NULL) { @@ -1183,10 +1183,10 @@ gtk_real_model_types_iter_parent (GtkTreeModel *tree_model, static void treestore_torture_recurse (GtkTreeStore *store, GtkTreeIter *root, - gint depth) + int depth) { GtkTreeModel *model; - gint i; + int i; GtkTreeIter iter; model = GTK_TREE_MODEL (store); @@ -1284,7 +1284,7 @@ run_automated_tests (void) /* Make sure list store mutations don't crash anything */ GtkListStore *store; GtkTreeModel *model; - gint i; + int i; GtkTreeIter iter; store = gtk_list_store_new (1, G_TYPE_INT); diff --git a/tests/testverticalcells.c b/tests/testverticalcells.c index ed89ece29a..2ef1929977 100644 --- a/tests/testverticalcells.c +++ b/tests/testverticalcells.c @@ -30,7 +30,7 @@ struct _TreeEntry { const gchar *description; const gchar *fine_print; const gchar *fine_print_color; - gint progress; + int progress; TreeEntry *entries; }; @@ -249,7 +249,7 @@ populate_model (GtkTreeStore *model, TreeEntry *entries) { GtkTreeIter iter; - gint i; + int i; for (i = 0; entries[i].info != NULL; i++) { @@ -272,7 +272,7 @@ static GtkTreeModel * create_model (void) { GtkTreeStore *model; - gint i; + int i; model = gtk_tree_store_new (NUM_COLUMNS, G_TYPE_STRING, @@ -299,8 +299,8 @@ quit_cb (GtkWidget *widget, g_main_context_wakeup (NULL); } -gint -main (gint argc, gchar **argv) +int +main (int argc, gchar **argv) { GtkWidget *window; GtkWidget *scrolled_window; diff --git a/tests/testvolumebutton.c b/tests/testvolumebutton.c index b86577a696..7fb886dcf4 100644 --- a/tests/testvolumebutton.c +++ b/tests/testvolumebutton.c @@ -27,7 +27,7 @@ value_changed (GtkWidget *button, static void response_cb (GtkDialog *dialog, - gint arg1, + int arg1, gpointer user_data) { gtk_window_destroy (GTK_WINDOW (dialog)); diff --git a/tests/testwindowsize.c b/tests/testwindowsize.c index ae6b2fcaa5..3b7e795a47 100644 --- a/tests/testwindowsize.c +++ b/tests/testwindowsize.c @@ -23,7 +23,7 @@ show_dialog (void) { GtkWidget *dialog; GtkWidget *label; - gint width_chars, max_width_chars, default_width, default_height; + int width_chars, max_width_chars, default_width, default_height; gboolean resizable; width_chars = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (width_chars_spin)); diff --git a/tests/treestoretest.c b/tests/treestoretest.c index afe871414e..34a833538b 100644 --- a/tests/treestoretest.c +++ b/tests/treestoretest.c @@ -21,7 +21,7 @@ #include GtkTreeStore *base_model; -static gint node_count = 0; +static int node_count = 0; static void selection_changed (GtkTreeSelection *selection, @@ -36,7 +36,7 @@ selection_changed (GtkTreeSelection *selection, static void node_set (GtkTreeIter *iter) { - gint n; + int n; gchar *str; str = g_strdup_printf ("Row (%d)", node_count++); @@ -290,7 +290,7 @@ quit_cb (GtkWidget *widget, } static void -make_window (gint view_type) +make_window (int view_type) { GtkWidget *window; GtkWidget *vbox; diff --git a/tests/video-timer.c b/tests/video-timer.c index 512ab7a66f..cc59a9525a 100644 --- a/tests/video-timer.c +++ b/tests/video-timer.c @@ -152,7 +152,7 @@ static void adjust_clock_for_phase (gint64 frame_clock_time, gint64 presentation_time) { - static gint count = 0; + static int count = 0; static gint64 previous_frame_clock_time; static gint64 previous_presentation_time; gint64 phase = presentation_time - frame_clock_time; diff --git a/testsuite/a11y/accessibility-dump.c b/testsuite/a11y/accessibility-dump.c index f77a9bc152..5beed2cf33 100644 --- a/testsuite/a11y/accessibility-dump.c +++ b/testsuite/a11y/accessibility-dump.c @@ -240,7 +240,7 @@ dump_attribute_set (GString *string, } } -static gint +static int compare_attr (gconstpointer a, gconstpointer b) { const AtkAttribute *aattr = a; @@ -251,7 +251,7 @@ compare_attr (gconstpointer a, gconstpointer b) static void dump_text_attributes (GString *string, - gint depth, + int depth, const gchar *name, AtkAttributeSet *attributes) { @@ -335,7 +335,7 @@ dump_atk_text (AtkText *atk_text, GString *string) { gchar *text; - gint i, start, end; + int i, start, end; g_string_append_printf (string, "%*s\n", depth, ""); @@ -363,7 +363,7 @@ dump_atk_image (AtkImage *atk_image, guint depth, GString *string) { - gint width, height; + int width, height; g_string_append_printf (string, "%*s\n", depth, ""); @@ -378,7 +378,7 @@ dump_atk_action (AtkAction *atk_action, guint depth, GString *string) { - gint i; + int i; g_string_append_printf (string, "%*s\n", depth, ""); @@ -399,7 +399,7 @@ dump_atk_selection (AtkSelection *atk_selection, GString *string) { guint n_selections, n_counted_selections; - gint i; + int i; g_string_append_printf (string, "%*s\n", depth, ""); @@ -474,7 +474,7 @@ dump_atk_hyperlink (AtkHyperlink *link, guint depth, GString *string) { - gint i; + int i; g_string_append_printf (string, "%*s\n", depth, ""); g_string_append_printf (string, "%*sstart index: %d\n", depth, "", atk_hyperlink_get_start_index (link)); @@ -512,7 +512,7 @@ dump_atk_hypertext (AtkHypertext *hypertext, guint depth, GString *string) { - gint i; + int i; AtkHyperlink *link; g_string_append_printf (string, "%*s\n", depth, ""); @@ -529,7 +529,7 @@ dump_atk_streamable_content (AtkStreamableContent *content, guint depth, GString *string) { - gint i; + int i; g_string_append_printf (string, "%*s\n", depth, ""); @@ -544,9 +544,9 @@ dump_atk_table (AtkTable *table, guint depth, GString *string) { - gint *selected; - gint n_selected; - gint i, j; + int *selected; + int n_selected; + int i, j; AtkObject *obj; const gchar *desc; @@ -634,10 +634,10 @@ dump_atk_table_cell (AtkTableCell *table_cell, guint depth, GString *string) { - gint i; + int i; AtkObject *obj; GPtrArray *cells; - gint row = -1, column = -1; + int row = -1, column = -1; g_string_append_printf (string, "%*s\n", depth, ""); diff --git a/testsuite/a11y/children.c b/testsuite/a11y/children.c index 1349b61218..cb370f9001 100644 --- a/testsuite/a11y/children.c +++ b/testsuite/a11y/children.c @@ -49,9 +49,9 @@ test_scrolled_window_child_count (void) } typedef struct { - gint count; - gint index; - gint n_children; + int count; + int index; + int n_children; gpointer parent; } SignalData; @@ -68,7 +68,7 @@ children_changed (AtkObject *accessible, static void remove_child (STATE *state, - gint i) + int i) { GtkWidget *child; @@ -109,7 +109,7 @@ parent_notify (AtkObject *obj, GParamSpec *pspec, SignalData *data) } static gboolean -do_create_child (STATE *state, gint i) +do_create_child (STATE *state, int i) { if (GTK_IS_ENTRY (state->widget)) { @@ -143,8 +143,8 @@ test_add_remove (GtkWidget *widget) SignalData remove_data; SignalData parent_data[3] = { { 0, }, }; STATE state; - gint i, j; - gint step_children; + int i, j; + int step_children; state.widget = widget; accessible = gtk_widget_get_accessible (widget); diff --git a/testsuite/a11y/state/state-record.c b/testsuite/a11y/state/state-record.c index 3a11c8bee2..98c055c723 100644 --- a/testsuite/a11y/state/state-record.c +++ b/testsuite/a11y/state/state-record.c @@ -36,7 +36,7 @@ record_state_change (AtkObject *accessible, if (states) { - gint i; + int i; for (i = 0; states[i]; i++) { @@ -66,8 +66,8 @@ static void do_action (GtkBuilder *builder, const gchar *action, GString *string) { gchar **parts; - gint len; - gint i; + int len; + int i; parts = g_strsplit (action, " ", 0); len = g_strv_length (parts); @@ -142,7 +142,7 @@ record_events (const gchar *ui_file, GError *error; gchar *contents; gchar **actions; - gint i, len; + int i, len; builder = gtk_builder_new (); error = NULL; diff --git a/testsuite/a11y/text.c b/testsuite/a11y/text.c index fc5ac70cc3..c78a24061d 100644 --- a/testsuite/a11y/text.c +++ b/testsuite/a11y/text.c @@ -74,7 +74,7 @@ test_basic (GtkWidget *widget) AtkText *atk_text; const gchar *text = "Text goes here"; gchar *ret; - gint count; + int count; gunichar c; atk_text = ATK_TEXT (gtk_widget_get_accessible (widget)); @@ -103,13 +103,13 @@ test_basic (GtkWidget *widget) } typedef struct { - gint count; - gint position; - gint length; + int count; + int position; + int length; } SignalData; static void -text_deleted (AtkText *atk_text, gint position, gint length, SignalData *data) +text_deleted (AtkText *atk_text, int position, int length, SignalData *data) { data->count++; data->position = position; @@ -117,7 +117,7 @@ text_deleted (AtkText *atk_text, gint position, gint length, SignalData *data) } static void -text_inserted (AtkText *atk_text, gint position, gint length, SignalData *data) +text_inserted (AtkText *atk_text, int position, int length, SignalData *data) { data->count++; data->position = position; @@ -195,11 +195,11 @@ test_text_changed (GtkWidget *widget) } typedef struct { - gint gravity; - gint offset; + int gravity; + int offset; AtkTextBoundary boundary; - gint start; - gint end; + int start; + int end; const gchar *word; } Word; @@ -221,7 +221,7 @@ boundary (AtkTextBoundary b) } static const gchar * -gravity (gint g) +gravity (int g) { if (g < 0) return "before"; else if (g > 0) return "after"; @@ -271,11 +271,11 @@ static void show_text_attributes (PangoLayout *l) { const PangoLogAttr *attr; - gint n_attrs; + int n_attrs; const gchar *s; gchar e; const gchar *p; - gint i; + int i; const gchar *text; GSList *lines, *li; glong so, eo; @@ -830,9 +830,9 @@ test_words (GtkWidget *widget) { 1, 20, ATK_TEXT_BOUNDARY_LINE_END, 20, 20, "" }, { 0, -1, } }; - gint start, end; + int start, end; gchar *word; - gint i; + int i; atk_text = ATK_TEXT (gtk_widget_get_accessible (widget)); @@ -847,7 +847,7 @@ test_words (GtkWidget *widget) #ifdef DUMP_RESULTS for (i = -1; i <= 1; i++) { - gint j, k; + int j, k; for (j = ATK_TEXT_BOUNDARY_CHAR; j <= ATK_TEXT_BOUNDARY_LINE_END; j++) for (k = 0; k <= strlen (text); k++) { @@ -918,8 +918,8 @@ test_words (GtkWidget *widget) static void select_region (GtkWidget *widget, - gint start, - gint end) + int start, + int end) { if (GTK_IS_EDITABLE (widget)) gtk_editable_select_region (GTK_EDITABLE (widget), start, end); @@ -940,13 +940,13 @@ select_region (GtkWidget *widget, } typedef struct { - gint count; - gint position; - gint bound; + int count; + int position; + int bound; } SelectionData; static void -caret_moved_cb (AtkText *text, gint position, SelectionData *data) +caret_moved_cb (AtkText *text, int position, SelectionData *data) { data->count++; data->position = position; @@ -965,9 +965,9 @@ test_selection (GtkWidget *widget) { AtkText *atk_text; const gchar *text = "Bla bla bla"; - gint n; + int n; gchar *ret; - gint start, end; + int start, end; SelectionData data1; SelectionData data2; diff --git a/testsuite/a11y/tree-performance.c b/testsuite/a11y/tree-performance.c index b28f7a3d0d..e86bb9f97b 100644 --- a/testsuite/a11y/tree-performance.c +++ b/testsuite/a11y/tree-performance.c @@ -89,8 +89,8 @@ static void walk_accessible_tree (AtkObject *accessible, gpointer data) { - gint *count = data; - gint i; + int *count = data; + int i; (*count)++; @@ -130,7 +130,7 @@ populate_list (GtkBuilder *builder) GtkTreeView *tv; GtkListStore *store; GtkTreeIter iter; - gint i; + int i; tv = (GtkTreeView *)gtk_builder_get_object (builder, "treeview1"); store = (GtkListStore *)gtk_tree_view_get_model (tv); @@ -175,8 +175,8 @@ test_a11y_performance_list (void) gdouble elapsed; GtkWidget *window; GError *error = NULL; - gint count_before; - gint count_after; + int count_before; + int count_after; builder = gtk_builder_new (); gtk_builder_add_from_string (builder, list_ui, -1, &error); @@ -271,7 +271,7 @@ populate_tree (GtkBuilder *builder) GtkTreeView *tv; GtkTreeStore *store; GtkTreeIter iter; - gint i; + int i; tv = (GtkTreeView *)gtk_builder_get_object (builder, "treeview1"); store = (GtkTreeStore *)gtk_tree_view_get_model (tv); @@ -322,8 +322,8 @@ test_a11y_performance_tree (void) gdouble elapsed; GtkWidget *window; GError *error = NULL; - gint count_before; - gint count_after; + int count_before; + int count_after; builder = gtk_builder_new (); gtk_builder_add_from_string (builder, tree_ui, -1, &error); diff --git a/testsuite/a11y/tree-relationships.c b/testsuite/a11y/tree-relationships.c index f24d70e643..82d15fb3cd 100644 --- a/testsuite/a11y/tree-relationships.c +++ b/testsuite/a11y/tree-relationships.c @@ -192,7 +192,7 @@ populate_tree (GtkBuilder *builder) } typedef struct { - gint count; + int count; AtkObject *descendant; } SignalData; diff --git a/testsuite/a11y/value.c b/testsuite/a11y/value.c index df94c5b0d0..bedf4d3e47 100644 --- a/testsuite/a11y/value.c +++ b/testsuite/a11y/value.c @@ -24,7 +24,7 @@ static void set_value (GtkWidget *widget, - gint value) + int value) { if (GTK_IS_LEVEL_BAR (widget)) gtk_level_bar_set_value (GTK_LEVEL_BAR (widget), value); @@ -42,7 +42,7 @@ set_value (GtkWidget *widget, typedef struct { - gint count; + int count; gchar *last_name; } NotifyData; diff --git a/testsuite/gdk/encoding.c b/testsuite/gdk/encoding.c index 0666e26218..9a4be26be2 100644 --- a/testsuite/gdk/encoding.c +++ b/testsuite/gdk/encoding.c @@ -14,11 +14,11 @@ test_to_text_list (void) if (GDK_IS_X11_DISPLAY (display)) { const char *encoding; - gint format; + int format; const guchar *text; - gint length; + int length; gchar **list; - gint n; + int n; encoding = g_intern_string ("UTF8_STRING"); format = 8; diff --git a/testsuite/gdk/keysyms.c b/testsuite/gdk/keysyms.c index dc94faec23..b7bd8d1670 100644 --- a/testsuite/gdk/keysyms.c +++ b/testsuite/gdk/keysyms.c @@ -18,7 +18,7 @@ test_keysyms_basic (void) { GDK_KEY_MonBrightnessUp, "MonBrightnessUp", NULL }, { 0, NULL } }; - gint i; + int i; for (i = 0; tests[i].keyval != 0; i++) { diff --git a/testsuite/gdk/memorytexture.c b/testsuite/gdk/memorytexture.c index 5f61b8c079..381d61aac7 100644 --- a/testsuite/gdk/memorytexture.c +++ b/testsuite/gdk/memorytexture.c @@ -51,8 +51,8 @@ compare_textures (GdkTexture *expected, gboolean ignore_alpha) { guchar *expected_data, *test_data; - gint width, height; - gint x, y; + int width, height; + int x, y; g_assert_cmpint (gdk_texture_get_width (expected), ==, gdk_texture_get_width (test)); g_assert_cmpint (gdk_texture_get_height (expected), ==, gdk_texture_get_height (test)); diff --git a/testsuite/gtk/adjustment.c b/testsuite/gtk/adjustment.c index 598408a58e..dc6c41a742 100644 --- a/testsuite/gtk/adjustment.c +++ b/testsuite/gtk/adjustment.c @@ -50,8 +50,8 @@ test_basic (void) g_object_unref (a); } -static gint changed_count; -static gint value_changed_count; +static int changed_count; +static int value_changed_count; static void changed_cb (GtkAdjustment *a) diff --git a/testsuite/gtk/builder.c b/testsuite/gtk/builder.c index 18b29e2078..b6da2dfbef 100644 --- a/testsuite/gtk/builder.c +++ b/testsuite/gtk/builder.c @@ -1880,7 +1880,7 @@ test_add_objects (void) { GtkBuilder *builder; GError *error; - gint ret; + int ret; GObject *obj; const gchar *objects[2] = {"mainbox", NULL}; const gchar *objects2[3] = {"mainbox", "window2", NULL}; diff --git a/testsuite/gtk/entry.c b/testsuite/gtk/entry.c index 814e3c0809..1f03c4f3d3 100644 --- a/testsuite/gtk/entry.c +++ b/testsuite/gtk/entry.c @@ -17,17 +17,17 @@ #include -static gint serial = 0; +static int serial = 0; typedef struct { - gint serial; - gint count; - gint start; - gint end; + int serial; + int count; + int start; + int end; gchar *text; gchar *new_text; - gint position; - gint length; + int position; + int length; } EntryData; static void @@ -49,8 +49,8 @@ notify (GtkEditable *editable, GParamSpec *pspec, EntryData *data) static void insert_text (GtkEditable *editable, const gchar *new_text, - gint new_text_length, - gint *position, + int new_text_length, + int *position, EntryData *data) { data->serial = serial++; @@ -71,8 +71,8 @@ insert_text (GtkEditable *editable, static void delete_text (GtkEditable *editable, - gint start_pos, - gint end_pos, + int start_pos, + int end_pos, EntryData *data) { data->serial = serial++; @@ -111,7 +111,7 @@ static void test_insert (void) { GtkWidget *entry; - gint pos; + int pos; EntryData data1; EntryData data2; EntryData data3; @@ -213,7 +213,7 @@ static void test_delete (void) { GtkWidget *entry; - gint pos; + int pos; EntryData data1; EntryData data2; EntryData data3; diff --git a/testsuite/gtk/filtermodel.c b/testsuite/gtk/filtermodel.c index 5b03a93cf2..9e9916744c 100644 --- a/testsuite/gtk/filtermodel.c +++ b/testsuite/gtk/filtermodel.c @@ -4644,7 +4644,7 @@ specific_append_after_collapse_visible_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { - gint number; + int number; gboolean hide_negative_numbers; gtk_tree_model_get (model, iter, 1, &number, -1); @@ -4746,7 +4746,7 @@ specific_append_after_collapse (void) } -static gint +static int specific_sort_filter_remove_node_compare_func (GtkTreeModel *model, GtkTreeIter *iter1, GtkTreeIter *iter2, diff --git a/testsuite/gtk/gestures.c b/testsuite/gtk/gestures.c index b9ab90b3e8..6e0234e658 100644 --- a/testsuite/gtk/gestures.c +++ b/testsuite/gtk/gestures.c @@ -5,8 +5,8 @@ typedef struct { GtkWidget *widget; - gint x; - gint y; + int x; + int y; guint state; guint pressed : 1; } PointState; @@ -247,7 +247,7 @@ typedef struct { } GestureData; static void -press_cb (GtkGesture *g, gint n_press, gdouble x, gdouble y, gpointer data) +press_cb (GtkGesture *g, int n_press, gdouble x, gdouble y, gpointer data) { GtkEventController *c = GTK_EVENT_CONTROLLER (g); GdkEventSequence *sequence; diff --git a/testsuite/gtk/grid.c b/testsuite/gtk/grid.c index cfb2a3d82c..42cfc90f87 100644 --- a/testsuite/gtk/grid.c +++ b/testsuite/gtk/grid.c @@ -25,7 +25,7 @@ test_attach (void) { GtkGrid *g; GtkWidget *child, *sibling, *z, *A, *B; - gint left, top, width, height; + int left, top, width, height; g = (GtkGrid *)gtk_grid_new (); diff --git a/testsuite/gtk/gtktreemodelrefcount.c b/testsuite/gtk/gtktreemodelrefcount.c index de84b27994..58d7f05738 100644 --- a/testsuite/gtk/gtktreemodelrefcount.c +++ b/testsuite/gtk/gtktreemodelrefcount.c @@ -232,7 +232,7 @@ gtk_tree_model_ref_count_dump (GtkTreeModelRefCount *ref_model) static gboolean check_iter (GtkTreeModelRefCount *ref_model, GtkTreeIter *iter, - gint expected_ref_count, + int expected_ref_count, gboolean may_assert) { NodeInfo *info; @@ -267,7 +267,7 @@ check_iter (GtkTreeModelRefCount *ref_model, gboolean gtk_tree_model_ref_count_check_level (GtkTreeModelRefCount *ref_model, GtkTreeIter *parent, - gint expected_ref_count, + int expected_ref_count, gboolean recurse, gboolean may_assert) { @@ -299,7 +299,7 @@ gtk_tree_model_ref_count_check_level (GtkTreeModelRefCount *ref_model, gboolean gtk_tree_model_ref_count_check_node (GtkTreeModelRefCount *ref_model, GtkTreeIter *iter, - gint expected_ref_count, + int expected_ref_count, gboolean may_assert) { return check_iter (ref_model, iter, expected_ref_count, may_assert); diff --git a/testsuite/gtk/gtktreemodelrefcount.h b/testsuite/gtk/gtktreemodelrefcount.h index a4b4011a24..019f166478 100644 --- a/testsuite/gtk/gtktreemodelrefcount.h +++ b/testsuite/gtk/gtktreemodelrefcount.h @@ -54,12 +54,12 @@ GtkTreeModel *gtk_tree_model_ref_count_new (void); void gtk_tree_model_ref_count_dump (GtkTreeModelRefCount *ref_model); gboolean gtk_tree_model_ref_count_check_level (GtkTreeModelRefCount *ref_model, GtkTreeIter *parent, - gint expected_ref_count, + int expected_ref_count, gboolean recurse, gboolean may_assert); gboolean gtk_tree_model_ref_count_check_node (GtkTreeModelRefCount *ref_model, GtkTreeIter *iter, - gint expected_ref_count, + int expected_ref_count, gboolean may_assert); /* A couple of helpers for the tests. Since this model will never be used @@ -88,14 +88,14 @@ assert_level_unreferenced (GtkTreeModelRefCount *ref_model, static inline void assert_entire_model_referenced (GtkTreeModelRefCount *ref_model, - gint ref_count) + int ref_count) { gtk_tree_model_ref_count_check_level (ref_model, NULL, ref_count, TRUE, TRUE); } static inline void assert_not_entire_model_referenced (GtkTreeModelRefCount *ref_model, - gint ref_count) + int ref_count) { g_assert_cmpint (gtk_tree_model_ref_count_check_level (ref_model, NULL, ref_count, @@ -105,7 +105,7 @@ assert_not_entire_model_referenced (GtkTreeModelRefCount *ref_model, static inline void assert_root_level_referenced (GtkTreeModelRefCount *ref_model, - gint ref_count) + int ref_count) { gtk_tree_model_ref_count_check_level (ref_model, NULL, ref_count, FALSE, TRUE); @@ -113,7 +113,7 @@ assert_root_level_referenced (GtkTreeModelRefCount *ref_model, static inline void assert_level_referenced (GtkTreeModelRefCount *ref_model, - gint ref_count, + int ref_count, GtkTreeIter *iter) { gtk_tree_model_ref_count_check_level (ref_model, iter, ref_count, @@ -123,7 +123,7 @@ assert_level_referenced (GtkTreeModelRefCount *ref_model, static inline void assert_node_ref_count (GtkTreeModelRefCount *ref_model, GtkTreeIter *iter, - gint ref_count) + int ref_count) { gtk_tree_model_ref_count_check_node (ref_model, iter, ref_count, TRUE); } diff --git a/testsuite/gtk/icontheme.c b/testsuite/gtk/icontheme.c index a343c75735..b6387ce9d9 100644 --- a/testsuite/gtk/icontheme.c +++ b/testsuite/gtk/icontheme.c @@ -50,12 +50,12 @@ lookup_flags_to_string (GtkIconLookupFlags flags) static void assert_icon_lookup_size (const char *icon_name, - gint size, + int size, GtkTextDirection direction, GtkIconLookupFlags flags, gboolean fallbacks, const char *filename, - gint pixbuf_size) + int pixbuf_size) { GtkIconPaintable *info; GFile *file; @@ -111,7 +111,7 @@ assert_icon_lookup_size (const char *icon_name, static void assert_icon_lookup (const char *icon_name, - gint size, + int size, GtkTextDirection direction, GtkIconLookupFlags flags, gboolean fallbacks, @@ -122,7 +122,7 @@ assert_icon_lookup (const char *icon_name, static void assert_icon_lookup_fails (const char *icon_name, - gint size, + int size, GtkTextDirection direction, GtkIconLookupFlags flags) { @@ -170,7 +170,7 @@ log_writer (GLogLevelFlags log_level, static void assert_lookup_order (const char *icon_name, - gint size, + int size, GtkTextDirection direction, GtkIconLookupFlags flags, gboolean fallbacks, @@ -734,7 +734,7 @@ test_inherit (void) static void test_nonsquare_symbolic (void) { - gint width, height, size; + int width, height, size; GtkIconTheme *icon_theme; GtkIconPaintable *info; GFile *file; diff --git a/testsuite/gtk/listbox.c b/testsuite/gtk/listbox.c index 88b24108eb..43c2443651 100644 --- a/testsuite/gtk/listbox.c +++ b/testsuite/gtk/listbox.c @@ -1,13 +1,13 @@ #include -static gint +static int sort_list (GtkListBoxRow *row1, GtkListBoxRow *row2, gpointer data) { GtkWidget *label1, *label2; - gint n1, n2; - gint *count = data; + int n1, n2; + int *count = data; (*count)++; @@ -51,9 +51,9 @@ test_sort (void) GtkListBox *list; GtkListBoxRow *row; GtkWidget *label; - gint i, r; + int i, r; gchar *s; - gint count; + int count; list = GTK_LIST_BOX (gtk_list_box_new ()); g_object_ref_sink (list); @@ -94,7 +94,7 @@ on_row_selected (GtkListBox *list_box, GtkListBoxRow *row, gpointer data) { - gint *i = data; + int *i = data; (*i)++; @@ -107,10 +107,10 @@ test_selection (void) GtkListBox *list; GtkListBoxRow *row, *row2; GtkWidget *label; - gint i; + int i; gchar *s; - gint count; - gint index; + int count; + int index; list = GTK_LIST_BOX (gtk_list_box_new ()); g_object_ref_sink (list); @@ -184,7 +184,7 @@ test_selection (void) static void on_selected_rows_changed (GtkListBox *box, gpointer data) { - gint *i = data; + int *i = data; (*i)++; } @@ -196,9 +196,9 @@ test_multi_selection (void) GList *l; GtkListBoxRow *row, *row2; GtkWidget *label; - gint i; + int i; gchar *s; - gint count; + int count; list = GTK_LIST_BOX (gtk_list_box_new ()); g_object_ref_sink (list); @@ -272,9 +272,9 @@ static gboolean filter_func (GtkListBoxRow *row, gpointer data) { - gint *count = data; + int *count = data; GtkWidget *child; - gint i; + int i; (*count)++; @@ -287,7 +287,7 @@ filter_func (GtkListBoxRow *row, static void check_filtered (GtkListBox *list) { - gint count; + int count; GtkWidget *row; count = 0; @@ -309,10 +309,10 @@ test_filter (void) { GtkListBox *list; GtkListBoxRow *row; - gint i; + int i; gchar *s; GtkWidget *label; - gint count; + int count; list = GTK_LIST_BOX (gtk_list_box_new ()); g_object_ref_sink (list); @@ -354,8 +354,8 @@ header_func (GtkListBoxRow *row, gpointer data) { GtkWidget *child; - gint i; - gint *count = data; + int i; + int *count = data; GtkWidget *header; gchar *s; @@ -379,7 +379,7 @@ header_func (GtkListBoxRow *row, static void check_headers (GtkListBox *list) { - gint count; + int count; GtkWidget *row; count = 0; @@ -401,10 +401,10 @@ test_header (void) { GtkListBox *list; GtkListBoxRow *row; - gint i; + int i; gchar *s; GtkWidget *label; - gint count; + int count; list = GTK_LIST_BOX (gtk_list_box_new ()); g_object_ref_sink (list); diff --git a/testsuite/gtk/liststore.c b/testsuite/gtk/liststore.c index 4455a13dff..0bf77f6890 100644 --- a/testsuite/gtk/liststore.c +++ b/testsuite/gtk/liststore.c @@ -99,8 +99,8 @@ list_store_teardown (ListStore *fixture, static void check_model (ListStore *fixture, - gint *new_order, - gint skip) + int *new_order, + int skip) { int i; GtkTreePath *path; diff --git a/testsuite/gtk/notify.c b/testsuite/gtk/notify.c index ddd806948d..ed2076455f 100644 --- a/testsuite/gtk/notify.c +++ b/testsuite/gtk/notify.c @@ -41,7 +41,7 @@ assert_notifies (GObject *object, typedef struct { const gchar *name; - gint count; + int count; } NotifyData; static void @@ -64,12 +64,12 @@ check_property (GObject *instance, GParamSpec *pspec) if (G_TYPE_IS_ENUM (pspec->value_type)) { GEnumClass *class; - gint i; + int i; NotifyData data; gulong id; - gint first; - gint value; - gint current_count; + int first; + int value; + int current_count; class = g_type_class_ref (pspec->value_type); @@ -103,11 +103,11 @@ check_property (GObject *instance, GParamSpec *pspec) else if (G_TYPE_IS_FLAGS (pspec->value_type)) { GFlagsClass *class; - gint i; + int i; NotifyData data; gulong id; guint value; - gint current_count; + int current_count; class = g_type_class_ref (pspec->value_type); @@ -165,11 +165,11 @@ check_property (GObject *instance, GParamSpec *pspec) else if (pspec->value_type == G_TYPE_INT) { GParamSpecInt *p = G_PARAM_SPEC_INT (pspec); - gint i; + int i; NotifyData data; gulong id; - gint value; - gint current_count; + int value; + int current_count; data.name = pspec->name; data.count = 0; @@ -202,7 +202,7 @@ check_property (GObject *instance, GParamSpec *pspec) NotifyData data; gulong id; guint value; - gint current_count; + int current_count; guint minimum, maximum; if (G_IS_PARAM_SPEC_UINT (pspec)) @@ -274,7 +274,7 @@ check_property (GObject *instance, GParamSpec *pspec) gulong id; gdouble value; gdouble new_value; - gint current_count; + int current_count; gdouble delta; data.name = pspec->name; @@ -315,7 +315,7 @@ check_property (GObject *instance, GParamSpec *pspec) gulong id; gfloat value; gfloat new_value; - gint current_count; + int current_count; data.name = pspec->name; data.count = 0; @@ -678,7 +678,7 @@ main (int argc, char **argv) { const GType *otypes; guint i; - gint result; + int result; gtk_test_init (&argc, &argv); gtk_test_register_all_types(); diff --git a/testsuite/gtk/objects-finalize.c b/testsuite/gtk/objects-finalize.c index e46f404424..17bebfd9c8 100644 --- a/testsuite/gtk/objects-finalize.c +++ b/testsuite/gtk/objects-finalize.c @@ -129,7 +129,7 @@ main (int argc, char **argv) { const GType *all_types; guint n_types = 0, i; - gint result; + int result; const char *display, *x_r_d; /* These must be set before gtk_test_init */ diff --git a/testsuite/gtk/rbtree.c b/testsuite/gtk/rbtree.c index 0975c47d51..b40ae6eb4c 100644 --- a/testsuite/gtk/rbtree.c +++ b/testsuite/gtk/rbtree.c @@ -61,11 +61,11 @@ count_total (GtkTreeRBTree *tree, return res; } -static gint +static int _count_nodes (GtkTreeRBTree *tree, GtkTreeRBNode *node) { - gint res; + int res; if (gtk_tree_rbtree_is_nil (node)) return 0; @@ -84,7 +84,7 @@ static void gtk_tree_rbtree_test_height (GtkTreeRBTree *tree, GtkTreeRBNode *node) { - gint computed_offset = 0; + int computed_offset = 0; /* This whole test is sort of a useless truism. */ @@ -113,7 +113,7 @@ gtk_tree_rbtree_test_height (GtkTreeRBTree *tree, static void gtk_tree_rbtree_test_dirty (GtkTreeRBTree *tree, GtkTreeRBNode *node, - gint expected_dirtyness) + int expected_dirtyness) { g_assert (node); @@ -230,9 +230,9 @@ gtk_tree_rbtree_test (GtkTreeRBTree *tree) static void gtk_rbtree_print_node (GtkTreeRBTree *tree, GtkTreeRBNode *node, - gint depth) + int depth) { - gint i; + int i; for (i = 0; i < depth; i++) g_print ("\t"); @@ -429,13 +429,13 @@ test_remove_root (void) gtk_tree_rbtree_free (tree); } -static gint * +static int * fisher_yates_shuffle (guint n_items) { - gint *list; + int *list; guint i, j; - list = g_new (gint, n_items); + list = g_new (int, n_items); for (i = 0; i < n_items; i++) { @@ -448,7 +448,7 @@ fisher_yates_shuffle (guint n_items) } static GtkTreeRBTree * -create_unsorted_tree (gint *order, +create_unsorted_tree (int *order, guint n) { GtkTreeRBTree *tree; @@ -480,7 +480,7 @@ test_reorder (void) guint n = g_test_perf () ? 1000000 : 100; GtkTreeRBTree *tree; GtkTreeRBNode *node; - gint *reorder; + int *reorder; guint i; double elapsed; diff --git a/testsuite/gtk/recentmanager.c b/testsuite/gtk/recentmanager.c index 8173b3f00b..9594c9fe1a 100644 --- a/testsuite/gtk/recentmanager.c +++ b/testsuite/gtk/recentmanager.c @@ -101,7 +101,7 @@ recent_manager_add (void) typedef struct { GtkRecentManager *manager; GMainLoop *main_loop; - gint counter; + int counter; } AddManyClosure; static void @@ -284,7 +284,7 @@ recent_manager_purge (void) { GtkRecentManager *manager; GtkRecentData *recent_data; - gint n; + int n; GError *error; manager = gtk_recent_manager_get_default (); diff --git a/testsuite/gtk/spinbutton.c b/testsuite/gtk/spinbutton.c index ace411e944..e8e35d9227 100644 --- a/testsuite/gtk/spinbutton.c +++ b/testsuite/gtk/spinbutton.c @@ -1,6 +1,6 @@ #include -static gint value_changed_count; +static int value_changed_count; static void value_changed_cb (GtkSpinButton *spin) @@ -37,7 +37,7 @@ test_value_changed (void) g_assert_cmpint (value_changed_count, ==, 5); } -static gint adjustment_changed_count; +static int adjustment_changed_count; static void adjustment_changed_cb (GObject *object, GParamSpec *pspec) diff --git a/testsuite/gtk/textbuffer.c b/testsuite/gtk/textbuffer.c index 1f2b95ff37..7498f2b789 100644 --- a/testsuite/gtk/textbuffer.c +++ b/testsuite/gtk/textbuffer.c @@ -90,13 +90,13 @@ check_get_set_text (GtkTextBuffer *buffer, g_error ("%d chars, expected 0", n); } -static gint +static int count_toggles_at_iter (GtkTextIter *iter, GtkTextTag *of_tag) { GSList *tags; GSList *tmp; - gint count = 0; + int count = 0; /* get toggle-ons and toggle-offs */ tags = gtk_text_iter_get_toggled_tags (iter, TRUE); @@ -119,14 +119,14 @@ count_toggles_at_iter (GtkTextIter *iter, return count; } -static gint +static int count_toggles_in_range_by_char (GtkTextBuffer *buffer, GtkTextTag *of_tag, const GtkTextIter *start, const GtkTextIter *end) { GtkTextIter iter; - gint count = 0; + int count = 0; iter = *start; do @@ -144,7 +144,7 @@ count_toggles_in_range_by_char (GtkTextBuffer *buffer, return count; } -static gint +static int count_toggles_in_buffer (GtkTextBuffer *buffer, GtkTextTag *of_tag) { @@ -164,9 +164,9 @@ check_specific_tag_in_range (GtkTextBuffer *buffer, GtkTextIter iter; GtkTextTag *tag; gboolean state; - gint count; - gint buffer_count; - gint last_offset; + int count; + int buffer_count; + int last_offset; if (gtk_text_iter_compare (start, end) > 0) { @@ -189,7 +189,7 @@ check_specific_tag_in_range (GtkTextBuffer *buffer, { do { - gint this_offset; + int this_offset; ++count; @@ -233,7 +233,7 @@ check_specific_tag_in_range (GtkTextBuffer *buffer, { do { - gint this_offset; + int this_offset; ++count; @@ -289,13 +289,13 @@ run_tests (GtkTextBuffer *buffer) GtkTextIter start; GtkTextIter end; GtkTextIter mark; - gint i, j; - gint num_chars; + int i, j; + int num_chars; GtkTextMark *bar_mark; GtkTextTag *tag; GHashTable *tag_states; - gint count; - gint buffer_count; + int count; + int buffer_count; gtk_text_buffer_get_bounds (buffer, &start, &end); @@ -809,7 +809,7 @@ test_line_separation (const char* str, GtkTextBuffer* buffer; gboolean on_next_line; gboolean on_end_iter; - gint new_pos; + int new_pos; buffer = gtk_text_buffer_new (NULL); @@ -1464,7 +1464,7 @@ test_get_iter (void) { GtkTextBuffer *buffer; GtkTextIter iter; - gint offset; + int offset; buffer = gtk_text_buffer_new (NULL); diff --git a/testsuite/gtk/textiter.c b/testsuite/gtk/textiter.c index 6f6e14f803..c13e277ca3 100644 --- a/testsuite/gtk/textiter.c +++ b/testsuite/gtk/textiter.c @@ -286,7 +286,7 @@ test_forward_to_tag_toggle (void) GtkTextTag *bold_tag; GtkTextTag *editable_tag; GtkTextIter iter; - gint offset; + int offset; buffer = gtk_text_buffer_new (NULL); @@ -332,8 +332,8 @@ test_forward_to_tag_toggle (void) static void check_forward_line_end (const gchar *buffer_text, - gint initial_offset, - gint result_offset, + int initial_offset, + int result_offset, gboolean ret) { GtkTextBuffer *buffer; @@ -364,7 +364,7 @@ test_forward_to_line_end (void) static void check_word_boundaries (const gchar *buffer_text, - gint offset, + int offset, gboolean starts_word, gboolean ends_word, gboolean inside_word) @@ -386,8 +386,8 @@ check_word_boundaries (const gchar *buffer_text, static void check_forward_word_end (const gchar *buffer_text, - gint initial_offset, - gint result_offset, + int initial_offset, + int result_offset, gboolean ret) { GtkTextBuffer *buffer; @@ -406,8 +406,8 @@ check_forward_word_end (const gchar *buffer_text, static void check_backward_word_start (const gchar *buffer_text, - gint initial_offset, - gint result_offset, + int initial_offset, + int result_offset, gboolean ret) { GtkTextBuffer *buffer; @@ -453,8 +453,8 @@ test_word_boundaries (void) static void check_forward_visible_word_end (GtkTextBuffer *buffer, - gint initial_offset, - gint result_offset, + int initial_offset, + int result_offset, gboolean ret) { GtkTextIter iter; @@ -467,8 +467,8 @@ check_forward_visible_word_end (GtkTextBuffer *buffer, static void check_backward_visible_word_start (GtkTextBuffer *buffer, - gint initial_offset, - gint result_offset, + int initial_offset, + int result_offset, gboolean ret) { GtkTextIter iter; @@ -536,7 +536,7 @@ test_visible_word_boundaries (void) static void check_is_cursor_position (const gchar *buffer_text, - gint offset, + int offset, gboolean ret) { GtkTextBuffer *buffer; @@ -554,8 +554,8 @@ check_is_cursor_position (const gchar *buffer_text, static void check_cursor_position (const gchar *buffer_text, gboolean forward, - gint initial_offset, - gint result_offset, + int initial_offset, + int result_offset, gboolean ret) { GtkTextBuffer *buffer; @@ -604,8 +604,8 @@ test_cursor_positions (void) static void check_visible_cursor_position (GtkTextBuffer *buffer, gboolean forward, - gint initial_offset, - gint result_offset, + int initial_offset, + int result_offset, gboolean ret) { GtkTextIter iter; @@ -658,7 +658,7 @@ test_visible_cursor_positions (void) static void check_sentence_boundaries (const gchar *buffer_text, - gint offset, + int offset, gboolean starts_sentence, gboolean ends_sentence, gboolean inside_sentence) @@ -680,8 +680,8 @@ check_sentence_boundaries (const gchar *buffer_text, static void check_forward_sentence_end (const gchar *buffer_text, - gint initial_offset, - gint result_offset, + int initial_offset, + int result_offset, gboolean ret) { GtkTextBuffer *buffer; @@ -700,8 +700,8 @@ check_forward_sentence_end (const gchar *buffer_text, static void check_backward_sentence_start (const gchar *buffer_text, - gint initial_offset, - gint result_offset, + int initial_offset, + int result_offset, gboolean ret) { GtkTextBuffer *buffer; @@ -749,7 +749,7 @@ test_backward_line (void) GtkTextBuffer *buffer; GtkTextIter iter, start, end; gboolean ret; - gint offset; + int offset; buffer = gtk_text_buffer_new (NULL); gtk_text_buffer_get_start_iter (buffer, &iter); diff --git a/testsuite/gtk/treemodel.c b/testsuite/gtk/treemodel.c index 54db6e94eb..a9ebd0d06d 100644 --- a/testsuite/gtk/treemodel.c +++ b/testsuite/gtk/treemodel.c @@ -240,7 +240,7 @@ static void signal_monitor_rows_reordered (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, - gint *new_order, + int *new_order, gpointer data) { signal_monitor_generic_handler (data, ROWS_REORDERED, diff --git a/testsuite/gtk/treepath.c b/testsuite/gtk/treepath.c index c014de2c5f..da77bf0a43 100644 --- a/testsuite/gtk/treepath.c +++ b/testsuite/gtk/treepath.c @@ -23,8 +23,8 @@ static void test_append (void) { GtkTreePath *p; - gint i; - gint *indices; + int i; + int *indices; p = gtk_tree_path_new (); for (i = 0; i < 100; i++) @@ -44,8 +44,8 @@ static void test_prepend (void) { GtkTreePath *p; - gint i; - gint *indices; + int i; + int *indices; p = gtk_tree_path_new (); for (i = 0; i < 100; i++) @@ -66,9 +66,9 @@ test_to_string (void) { const gchar *str = "0:1:2:3:4:5:6:7:8:9:10"; GtkTreePath *p; - gint *indices; + int *indices; gchar *s; - gint i; + int i; p = gtk_tree_path_new_from_string (str); indices = gtk_tree_path_get_indices (p); @@ -85,8 +85,8 @@ static void test_from_indices (void) { GtkTreePath *p; - gint *indices; - gint i; + int *indices; + int i; p = gtk_tree_path_new_from_indices (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1); g_assert_cmpint (gtk_tree_path_get_depth (p), ==, 10); @@ -111,9 +111,9 @@ test_navigation (void) { GtkTreePath *p; GtkTreePath *q; - gint *pi; - gint *qi; - gint i; + int *pi; + int *qi; + int i; gboolean res; p = gtk_tree_path_new_from_indices (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1); diff --git a/testsuite/gtk/treestore.c b/testsuite/gtk/treestore.c index a58ab780f9..af1d651695 100644 --- a/testsuite/gtk/treestore.c +++ b/testsuite/gtk/treestore.c @@ -102,8 +102,8 @@ tree_store_teardown (TreeStore *fixture, static void check_model (TreeStore *fixture, - gint *new_order, - gint skip) + int *new_order, + int skip) { int i; GtkTreePath *path; @@ -1062,7 +1062,7 @@ static void specific_bug_698396 (void) { GtkTreeStore *tree_store; - gint new_order[1] = { 0 }; + int new_order[1] = { 0 }; /*http://bugzilla.gnome.org/show_bug.cgi?id=698396 */ diff --git a/testsuite/gtk/typename.c b/testsuite/gtk/typename.c index f468ac6542..ddbdf44746 100644 --- a/testsuite/gtk/typename.c +++ b/testsuite/gtk/typename.c @@ -24,7 +24,7 @@ type_name_mangle (const gchar *name, gboolean split_first_cap) { GString *symbol_name = g_string_new (""); - gint i; + int i; for (i = 0; name[i] != '\0'; i++) { diff --git a/testsuite/gtk/window.c b/testsuite/gtk/window.c index c67dfb745b..8ffc0645bf 100644 --- a/testsuite/gtk/window.c +++ b/testsuite/gtk/window.c @@ -26,7 +26,7 @@ on_draw (GtkDrawingArea *da, int height, gpointer data) { - gint i, j; + int i, j; for (i = 0; 20 * i < width; i++) { @@ -64,7 +64,7 @@ test_default_size (void) { GtkWidget *window; GtkWidget *da; - gint w, h; + int w, h; gboolean done; window = gtk_window_new (); @@ -152,7 +152,7 @@ test_resize (void) { GtkWidget *window; GtkWidget *da; - gint w, h; + int w, h; gboolean done; window = gtk_window_new (); @@ -214,7 +214,7 @@ static void test_resize_popup (void) { GtkWidget *window; - gint w, h; + int w, h; gboolean done; /* testcase for the dnd window */ @@ -244,7 +244,7 @@ static void test_show_hide (void) { GtkWidget *window; - gint w, h, w1, h1; + int w, h, w1, h1; gboolean done; /*http://bugzilla.gnome.org/show_bug.cgi?id=696882 */ @@ -293,7 +293,7 @@ test_show_hide (void) int main (int argc, char *argv[]) { - gint i; + int i; gtk_test_init (&argc, &argv); diff --git a/testsuite/reftests/reftest-snapshot.c b/testsuite/reftests/reftest-snapshot.c index ff1cf2577e..de08c0b026 100644 --- a/testsuite/reftests/reftest-snapshot.c +++ b/testsuite/reftests/reftest-snapshot.c @@ -197,7 +197,7 @@ quit_when_idle (gpointer loop) return G_SOURCE_REMOVE; } -static gint inhibit_count; +static int inhibit_count; static GMainLoop *loop; G_MODULE_EXPORT void diff --git a/testsuite/reftests/textview-border-windows.c b/testsuite/reftests/textview-border-windows.c index 7a6646393a..7db051530f 100644 --- a/testsuite/reftests/textview-border-windows.c +++ b/testsuite/reftests/textview-border-windows.c @@ -20,7 +20,7 @@ static void set_border_window_size (GtkTextView *text_view, GtkTextWindowType win, - gint size) + int size) { GtkWidget *label; From d375dce9f52fd9830069a6fd9287abde93d3f24b Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 24 Jul 2020 20:40:36 +0200 Subject: [PATCH 2/4] Replace "gchar" with "char" --- .../constraint-editor-application.c | 2 +- demos/gtk-demo/application.c | 14 +- demos/gtk-demo/application_demo.c | 8 +- demos/gtk-demo/assistant.c | 4 +- demos/gtk-demo/css_blendmodes.c | 8 +- demos/gtk-demo/demoimage.c | 2 +- demos/gtk-demo/editable_cells.c | 10 +- demos/gtk-demo/filtermodel.c | 2 +- demos/gtk-demo/flowbox.c | 4 +- demos/gtk-demo/font_features.c | 2 +- demos/gtk-demo/iconview.c | 12 +- demos/gtk-demo/iconview_edit.c | 8 +- demos/gtk-demo/links.c | 2 +- demos/gtk-demo/main.c | 40 +-- demos/gtk-demo/markup.c | 6 +- demos/gtk-demo/paint.c | 4 +- demos/gtk-demo/panes.c | 6 +- demos/gtk-demo/printing.c | 6 +- demos/gtk-demo/revealer.c | 2 +- demos/gtk-demo/shortcuts.c | 6 +- demos/gtk-demo/sidebar.c | 4 +- demos/gtk-demo/spinbutton.c | 18 +- demos/gtk-demo/tree_store.c | 4 +- demos/icon-browser/iconbrowserapp.c | 4 +- demos/icon-browser/iconbrowserwin.c | 20 +- demos/node-editor/node-editor-application.c | 2 +- demos/node-editor/node-editor-window.c | 2 +- demos/print-editor/print-editor.c | 4 +- demos/widget-factory/widget-factory.c | 56 +-- docs/CODING-STYLE.md | 8 +- docs/reference/gtk/getting_started.md | 6 +- docs/reference/gtk/section-tree-widget.md | 2 +- docs/tools/widgets.c | 2 +- docs/tools/widgets.h | 2 +- examples/action-namespace.c | 2 +- examples/application1/exampleapp.c | 2 +- examples/application10/exampleappwin.c | 12 +- examples/application2/exampleapp.c | 2 +- examples/application3/exampleapp.c | 2 +- examples/application3/exampleappwin.c | 4 +- examples/application4/exampleapp.c | 4 +- examples/application4/exampleappwin.c | 4 +- examples/application5/exampleapp.c | 4 +- examples/application5/exampleappwin.c | 4 +- examples/application6/exampleapp.c | 4 +- examples/application6/exampleappwin.c | 4 +- examples/application7/exampleapp.c | 4 +- examples/application7/exampleappwin.c | 6 +- examples/application8/exampleapp.c | 4 +- examples/application8/exampleappwin.c | 10 +- examples/application9/exampleapp.c | 4 +- examples/application9/exampleappwin.c | 12 +- examples/bp/bloatpad.c | 38 +- examples/plugman.c | 20 +- examples/search-bar.c | 2 +- examples/sunny.c | 4 +- gdk/broadway/broadway-server.c | 4 +- gdk/broadway/gdkdisplay-broadway.c | 8 +- gdk/broadway/gdkprivate-broadway.h | 4 +- gdk/broadway/gdksurface-broadway.c | 4 +- gdk/gdk-private.h | 2 +- gdk/gdk.c | 12 +- gdk/gdkapplaunchcontext.c | 10 +- gdk/gdkclipboard.c | 2 +- gdk/gdkcontentdeserializer.c | 4 +- gdk/gdkcontentserializer.c | 4 +- gdk/gdkcursor.c | 2 +- gdk/gdkcursor.h | 2 +- gdk/gdkdevice.c | 10 +- gdk/gdkdevice.h | 6 +- gdk/gdkdeviceprivate.h | 6 +- gdk/gdkdisplay.c | 8 +- gdk/gdkdisplay.h | 8 +- gdk/gdkdisplaymanager.c | 12 +- gdk/gdkdisplaymanager.h | 4 +- gdk/gdkdisplayprivate.h | 6 +- gdk/gdkdrag.c | 4 +- gdk/gdkevents.c | 2 +- gdk/gdkglcontext.c | 4 +- gdk/gdkglcontextprivate.h | 2 +- gdk/gdkkeynames.c | 8 +- gdk/gdkkeys.c | 4 +- gdk/gdkkeys.h | 2 +- gdk/gdkprofiler.c | 2 +- gdk/gdkrgba.c | 14 +- gdk/gdkrgba.h | 4 +- gdk/gdksurface.c | 4 +- gdk/gdkvulkancontext.c | 2 +- gdk/macos/gdkmacoscursor.c | 2 +- gdk/macos/gdkmacosdisplay-private.h | 4 +- gdk/macos/gdkmacosdisplay-settings.c | 2 +- gdk/macos/gdkmacosdisplay.c | 8 +- gdk/macos/gdkmacosmonitor.c | 6 +- gdk/macos/gdkmacossurface-private.h | 2 +- gdk/macos/gdkmacossurface.c | 2 +- gdk/wayland/gdkapplaunchcontext-wayland.c | 2 +- gdk/wayland/gdkcursor-wayland.c | 6 +- gdk/wayland/gdkdevice-wayland.c | 14 +- gdk/wayland/gdkdisplay-wayland.c | 32 +- gdk/wayland/gdkdisplay-wayland.h | 8 +- gdk/wayland/gdkprivate-wayland.h | 2 +- gdk/wayland/gdksurface-wayland.c | 22 +- gdk/wayland/gdkwaylanddevice.h | 4 +- gdk/wayland/gdkwaylanddisplay.h | 6 +- gdk/win32/bdfcursor.c | 24 +- gdk/win32/gdkclipdrop-win32.c | 56 +-- gdk/win32/gdkclipdrop-win32.h | 10 +- gdk/win32/gdkcursor-win32.c | 44 +-- gdk/win32/gdkdevicemanager-win32.c | 2 +- gdk/win32/gdkdisplay-win32.c | 12 +- gdk/win32/gdkdisplay-win32.h | 2 +- gdk/win32/gdkdrag-win32.c | 2 +- gdk/win32/gdkdrop-win32.c | 12 +- gdk/win32/gdkevents-win32.c | 2 +- gdk/win32/gdkmain-win32.c | 100 +++--- gdk/win32/gdkmonitor-win32.c | 18 +- gdk/win32/gdkmonitor-win32.h | 2 +- gdk/win32/gdkprivate-win32.h | 60 ++-- gdk/win32/gdkproperty-win32.c | 8 +- gdk/win32/gdksurface-win32.c | 14 +- gdk/win32/gdkwin32display.h | 2 +- gdk/win32/xcursors.h | 2 +- gdk/x11/gdkapplaunchcontext-x11.c | 6 +- gdk/x11/gdkclipboard-x11.c | 2 +- gdk/x11/gdkclipboard-x11.h | 2 +- gdk/x11/gdkcursor-x11.c | 10 +- gdk/x11/gdkdevicemanager-xi2.c | 12 +- gdk/x11/gdkdisplay-x11.c | 32 +- gdk/x11/gdkdisplay-x11.h | 2 +- gdk/x11/gdkdrag-x11.c | 4 +- gdk/x11/gdkdrop-x11.c | 4 +- gdk/x11/gdkkeys-x11.c | 2 +- gdk/x11/gdkprivate-x11.h | 6 +- gdk/x11/gdkproperty-x11.c | 8 +- gdk/x11/gdkscreen-x11.c | 6 +- gdk/x11/gdkselection-x11.c | 36 +- gdk/x11/gdksurface-x11.c | 22 +- gdk/x11/gdktextlistconverter-x11.c | 4 +- gdk/x11/gdkvisual-x11.c | 2 +- gdk/x11/gdkx11display.h | 8 +- gdk/x11/gdkx11property.h | 4 +- gdk/x11/gdkx11selection.h | 4 +- gdk/x11/gdkx11surface.h | 4 +- gdk/x11/gdkxftdefaults.c | 14 +- gsk/gskrendernode.c | 2 +- gtk/a11y/gtkaccessibilityutil.c | 4 +- gtk/a11y/gtkbooleancellaccessible.c | 6 +- gtk/a11y/gtkbuttonaccessible.c | 18 +- gtk/a11y/gtkcellaccessible.c | 8 +- gtk/a11y/gtkcolorswatchaccessible.c | 8 +- gtk/a11y/gtkcomboboxaccessible.c | 16 +- gtk/a11y/gtkentryaccessible.c | 52 +-- gtk/a11y/gtkexpanderaccessible.c | 16 +- gtk/a11y/gtkframeaccessible.c | 4 +- gtk/a11y/gtkiconviewaccessible.c | 44 +-- gtk/a11y/gtkimageaccessible.c | 34 +- gtk/a11y/gtkimagecellaccessible.c | 6 +- gtk/a11y/gtklabelaccessible.c | 38 +- gtk/a11y/gtklevelbaraccessible.c | 2 +- gtk/a11y/gtklinkbuttonaccessible.c | 6 +- gtk/a11y/gtklockbuttonaccessible.c | 2 +- gtk/a11y/gtkmenubuttonaccessible.c | 4 +- gtk/a11y/gtknotebookpageaccessible.c | 2 +- gtk/a11y/gtkpanedaccessible.c | 2 +- gtk/a11y/gtkpasswordentryaccessible.c | 14 +- gtk/a11y/gtkpictureaccessible.c | 6 +- gtk/a11y/gtkprogressbaraccessible.c | 2 +- gtk/a11y/gtkrangeaccessible.c | 2 +- gtk/a11y/gtkscaleaccessible.c | 2 +- gtk/a11y/gtkscalebuttonaccessible.c | 8 +- gtk/a11y/gtksearchentryaccessible.c | 24 +- gtk/a11y/gtkspinbuttonaccessible.c | 2 +- gtk/a11y/gtkstatusbaraccessible.c | 6 +- gtk/a11y/gtkswitchaccessible.c | 6 +- gtk/a11y/gtktextaccessible.c | 44 +-- gtk/a11y/gtktextcellaccessible.c | 44 +-- gtk/a11y/gtktextviewaccessible.c | 68 ++-- gtk/a11y/gtktreeviewaccessible.c | 2 +- gtk/a11y/gtkwindowaccessible.c | 4 +- gtk/css/gtkcsstokenizer.c | 4 +- gtk/gen-paper-names.c | 12 +- gtk/gsettings-mapping.c | 8 +- gtk/gtkaboutdialog.c | 200 +++++------ gtk/gtkaboutdialog.h | 58 ++-- gtk/gtkaccelgroup.c | 44 +-- gtk/gtkaccelgroup.h | 12 +- gtk/gtkaccellabel.c | 2 +- gtk/gtkaccellabel.h | 2 +- gtk/gtkactionable.c | 10 +- gtk/gtkactionable.h | 12 +- gtk/gtkactionbar.c | 2 +- gtk/gtkactionhelper.c | 14 +- gtk/gtkactionhelperprivate.h | 4 +- gtk/gtkactionmuxer.c | 78 ++--- gtk/gtkactionmuxerprivate.h | 2 +- gtk/gtkactionobservable.c | 4 +- gtk/gtkactionobservableprivate.h | 8 +- gtk/gtkactionobserver.c | 12 +- gtk/gtkactionobserverprivate.h | 24 +- gtk/gtkappchooser.c | 4 +- gtk/gtkappchooser.h | 2 +- gtk/gtkappchooserbutton.c | 32 +- gtk/gtkappchooserbutton.h | 12 +- gtk/gtkappchooserdialog.c | 26 +- gtk/gtkappchooserdialog.h | 6 +- gtk/gtkappchooserwidget.c | 28 +- gtk/gtkappchooserwidget.h | 6 +- gtk/gtkapplication-dbus.c | 28 +- gtk/gtkapplication-quartz-menu.c | 8 +- gtk/gtkapplication-quartz.c | 10 +- gtk/gtkapplication-wayland.c | 6 +- gtk/gtkapplication-x11.c | 2 +- gtk/gtkapplication.c | 50 +-- gtk/gtkapplication.h | 20 +- gtk/gtkapplicationaccels.c | 24 +- gtk/gtkapplicationaccelsprivate.h | 14 +- gtk/gtkapplicationimpl.c | 2 +- gtk/gtkapplicationprivate.h | 20 +- gtk/gtkapplicationwindow.c | 16 +- gtk/gtkassistant.c | 16 +- gtk/gtkassistant.h | 4 +- gtk/gtkbookmarklist.c | 2 +- gtk/gtkbookmarksmanager.c | 22 +- gtk/gtkbookmarksmanagerprivate.h | 6 +- gtk/gtkbox.c | 2 +- gtk/gtkbuildable.c | 20 +- gtk/gtkbuildable.h | 46 +-- gtk/gtkbuilder-menus.c | 42 +-- gtk/gtkbuilder.c | 118 +++---- gtk/gtkbuilder.h | 32 +- gtk/gtkbuilderparser.c | 176 +++++----- gtk/gtkbuilderprecompile.c | 24 +- gtk/gtkbuilderprivate.h | 78 ++--- gtk/gtkbuilderscope.c | 16 +- gtk/gtkbuilderscope.h | 6 +- gtk/gtkbutton.c | 16 +- gtk/gtkbutton.h | 10 +- gtk/gtkcalendar.c | 6 +- gtk/gtkcellarea.c | 58 ++-- gtk/gtkcellarea.h | 24 +- gtk/gtkcelllayout.c | 58 ++-- gtk/gtkcelllayout.h | 10 +- gtk/gtkcellrenderer.c | 6 +- gtk/gtkcellrenderer.h | 10 +- gtk/gtkcellrendereraccel.c | 24 +- gtk/gtkcellrenderercombo.c | 12 +- gtk/gtkcellrendererprogress.c | 18 +- gtk/gtkcellrendererspin.c | 10 +- gtk/gtkcellrenderertext.c | 18 +- gtk/gtkcellrenderertext.h | 4 +- gtk/gtkcellrenderertoggle.c | 4 +- gtk/gtkcellview.c | 14 +- gtk/gtkcellview.h | 4 +- gtk/gtkcenterbox.c | 2 +- gtk/gtkcheckbutton.c | 4 +- gtk/gtkcheckbutton.h | 4 +- gtk/gtkcolorbutton.c | 8 +- gtk/gtkcolorbutton.h | 4 +- gtk/gtkcolorchooserdialog.c | 2 +- gtk/gtkcolorchooserdialog.h | 2 +- gtk/gtkcolorchooserwidget.c | 16 +- gtk/gtkcoloreditor.c | 4 +- gtk/gtkcolorswatch.c | 4 +- gtk/gtkcolorswatchprivate.h | 2 +- gtk/gtkcolumnview.c | 2 +- gtk/gtkcombobox.c | 48 +-- gtk/gtkcombobox.h | 8 +- gtk/gtkcomboboxtext.c | 52 +-- gtk/gtkcomboboxtext.h | 20 +- gtk/gtkcomposetable.c | 66 ++-- gtk/gtkcomposetable.h | 4 +- gtk/gtkcsscolorvalue.c | 4 +- gtk/gtkcsscolorvalueprivate.h | 2 +- gtk/gtkcssimageradial.c | 2 +- gtk/gtkcssprovider.c | 50 +-- gtk/gtkcssprovider.h | 6 +- gtk/gtkcssproviderprivate.h | 4 +- gtk/gtkcsstypes.c | 2 +- gtk/gtkcustompaperunixdialog.c | 18 +- gtk/gtkcustompaperunixdialog.h | 2 +- gtk/gtkdialog.c | 46 +-- gtk/gtkdialog.h | 8 +- gtk/gtkeditable.h | 2 +- gtk/gtkentry.c | 26 +- gtk/gtkentry.h | 16 +- gtk/gtkentrybuffer.c | 24 +- gtk/gtkentrybuffer.h | 16 +- gtk/gtkentrycompletion.c | 42 +-- gtk/gtkentrycompletion.h | 6 +- gtk/gtkentryprivate.h | 6 +- gtk/gtkexpander.c | 12 +- gtk/gtkexpander.h | 8 +- gtk/gtkexpression.c | 2 +- gtk/gtkfilechooser.c | 4 +- gtk/gtkfilechooserbutton.c | 38 +- gtk/gtkfilechooserbutton.h | 6 +- gtk/gtkfilechooserdialog.c | 10 +- gtk/gtkfilechooserdialog.h | 4 +- gtk/gtkfilechooserentry.c | 18 +- gtk/gtkfilechooserentry.h | 2 +- gtk/gtkfilechoosernative.c | 8 +- gtk/gtkfilechoosernative.h | 6 +- gtk/gtkfilechoosernativeportal.c | 12 +- gtk/gtkfilechoosernativequartz.c | 14 +- gtk/gtkfilechoosernativewin32.c | 2 +- gtk/gtkfilechooserprivate.h | 4 +- gtk/gtkfilechooserutils.c | 16 +- gtk/gtkfilechooserutils.h | 2 +- gtk/gtkfilechooserwidget.c | 94 ++--- gtk/gtkfilefilter.c | 4 +- gtk/gtkfilesystemmodel.c | 6 +- gtk/gtkfilesystemmodel.h | 2 +- gtk/gtkfixed.c | 2 +- gtk/gtkflowbox.c | 4 +- gtk/gtkfontbutton.c | 38 +- gtk/gtkfontbutton.h | 6 +- gtk/gtkfontchooser.c | 12 +- gtk/gtkfontchooser.h | 10 +- gtk/gtkfontchooserdialog.c | 8 +- gtk/gtkfontchooserdialog.h | 2 +- gtk/gtkfontchooserprivate.h | 2 +- gtk/gtkfontchooserutils.c | 2 +- gtk/gtkfontchooserwidget.c | 22 +- gtk/gtkframe.c | 10 +- gtk/gtkframe.h | 6 +- gtk/gtkgladecatalog.c | 4 +- gtk/gtkgrid.c | 2 +- gtk/gtkheaderbar.c | 10 +- gtk/gtkheaderbar.h | 4 +- gtk/gtkiconcache.c | 16 +- gtk/gtkiconcacheprivate.h | 6 +- gtk/gtkiconcachevalidatorprivate.h | 2 +- gtk/gtkiconhelper.c | 4 +- gtk/gtkiconhelperprivate.h | 4 +- gtk/gtkicontheme.c | 122 +++---- gtk/gtkicontheme.h | 6 +- gtk/gtkiconview.c | 18 +- gtk/gtkimage.c | 20 +- gtk/gtkimage.h | 12 +- gtk/gtkimagedefinition.c | 2 +- gtk/gtkimagedefinitionprivate.h | 2 +- gtk/gtkimcontext.c | 22 +- gtk/gtkimcontext.h | 14 +- gtk/gtkimcontextime.c | 20 +- gtk/gtkimcontextime.h | 2 +- gtk/gtkimcontextquartz.c | 12 +- gtk/gtkimcontextsimple.c | 34 +- gtk/gtkimcontextsimple.h | 2 +- gtk/gtkimcontextwayland.c | 14 +- gtk/gtkimmodule.c | 12 +- gtk/gtkimmoduleprivate.h | 2 +- gtk/gtkimmulticontext.c | 20 +- gtk/gtkinfobar.c | 34 +- gtk/gtkinfobar.h | 6 +- gtk/gtkistringprivate.h | 4 +- gtk/gtklabel.c | 98 +++--- gtk/gtklabel.h | 20 +- gtk/gtklabelprivate.h | 2 +- gtk/gtklevelbar.c | 32 +- gtk/gtklevelbar.h | 6 +- gtk/gtklinkbutton.c | 14 +- gtk/gtklinkbutton.h | 10 +- gtk/gtklistbox.c | 8 +- gtk/gtkliststore.c | 38 +- gtk/gtklockbutton.c | 8 +- gtk/gtkmain.c | 6 +- gtk/gtkmain.h | 2 +- gtk/gtkmarshalers.list | 4 +- gtk/gtkmediastream.c | 4 +- gtk/gtkmediastream.h | 4 +- gtk/gtkmenusectionbox.c | 12 +- gtk/gtkmenutracker.c | 16 +- gtk/gtkmenutrackeritem.c | 64 ++-- gtk/gtkmenutrackeritemprivate.h | 18 +- gtk/gtkmenutrackerprivate.h | 4 +- gtk/gtkmessagedialog.c | 26 +- gtk/gtkmessagedialog.h | 10 +- gtk/gtkmodelbutton.c | 10 +- gtk/gtkmodules.c | 26 +- gtk/gtkmodulesprivate.h | 2 +- gtk/gtkmountoperation-stub.c | 4 +- gtk/gtkmountoperation-x11.c | 68 ++-- gtk/gtkmountoperation.c | 36 +- gtk/gtkmountoperationprivate.h | 4 +- gtk/gtkmultifilter.c | 2 +- gtk/gtkmultisorter.c | 2 +- gtk/gtknotebook.c | 18 +- gtk/gtknotebook.h | 14 +- gtk/gtkoverlay.c | 2 +- gtk/gtkpadcontroller.h | 4 +- gtk/gtkpagesetup.c | 10 +- gtk/gtkpagesetup.h | 8 +- gtk/gtkpagesetupunixdialog.c | 20 +- gtk/gtkpagesetupunixdialog.h | 2 +- gtk/gtkpaned.c | 2 +- gtk/gtkpango.c | 26 +- gtk/gtkpango.h | 8 +- gtk/gtkpapersize.c | 60 ++-- gtk/gtkpapersize.h | 24 +- gtk/gtkpathbar.c | 6 +- gtk/gtkpicture.h | 8 +- gtk/gtkplacessidebar.c | 160 ++++----- gtk/gtkplacessidebarprivate.h | 2 +- gtk/gtkplacesview.c | 86 ++--- gtk/gtkplacesviewprivate.h | 4 +- gtk/gtkplacesviewrow.c | 6 +- gtk/gtkpopover.c | 2 +- gtk/gtkpopovermenu.c | 2 +- gtk/gtkpopovermenuprivate.h | 2 +- gtk/gtkprintbackend.c | 26 +- gtk/gtkprintbackendprivate.h | 20 +- gtk/gtkprinter.c | 30 +- gtk/gtkprinter.h | 12 +- gtk/gtkprinteroptionwidget.c | 54 +-- gtk/gtkprinteroptionwidget.h | 2 +- gtk/gtkprintjob.c | 10 +- gtk/gtkprintjob.h | 6 +- gtk/gtkprintoperation-private.h | 12 +- gtk/gtkprintoperation-unix.c | 46 +-- gtk/gtkprintoperation-win32.c | 10 +- gtk/gtkprintoperation.c | 16 +- gtk/gtkprintoperation.h | 8 +- gtk/gtkprintsettings.c | 130 +++---- gtk/gtkprintsettings.h | 72 ++-- gtk/gtkprintunixdialog.c | 46 +-- gtk/gtkprintunixdialog.h | 2 +- gtk/gtkprivate.c | 16 +- gtk/gtkprivate.h | 12 +- gtk/gtkprogressbar.c | 8 +- gtk/gtkprogressbar.h | 4 +- gtk/gtkquartz.c | 38 +- gtk/gtkquartz.h | 10 +- gtk/gtkquery.c | 18 +- gtk/gtkquery.h | 6 +- gtk/gtkradiobutton.c | 8 +- gtk/gtkradiobutton.h | 8 +- gtk/gtkrecentmanager.c | 140 ++++---- gtk/gtkrecentmanager.h | 54 +-- gtk/gtkrevealer.c | 2 +- gtk/gtkscale.c | 38 +- gtk/gtkscale.h | 2 +- gtk/gtkscalebutton.c | 14 +- gtk/gtkscalebutton.h | 4 +- gtk/gtkscrolledwindow.c | 2 +- gtk/gtksearchbar.c | 2 +- gtk/gtksearchengine.c | 8 +- gtk/gtksearchengine.h | 4 +- gtk/gtksearchenginemodel.c | 2 +- gtk/gtksearchenginetracker3.c | 10 +- gtk/gtksettings.c | 52 +-- gtk/gtksettings.h | 4 +- gtk/gtksettingsprivate.h | 4 +- gtk/gtkshortcut.c | 2 +- gtk/gtkshortcut.h | 2 +- gtk/gtkshortcutaction.c | 6 +- gtk/gtkshortcutcontroller.c | 2 +- gtk/gtkshortcutlabel.c | 52 +-- gtk/gtkshortcutlabel.h | 10 +- gtk/gtkshortcutsgroup.c | 4 +- gtk/gtkshortcutssection.c | 14 +- gtk/gtkshortcutsshortcut.c | 14 +- gtk/gtkshortcutswindow.c | 48 +-- gtk/gtksidebarrow.c | 6 +- gtk/gtksizegroup.c | 18 +- gtk/gtkspinbutton.c | 22 +- gtk/gtkstack.c | 14 +- gtk/gtkstack.h | 14 +- gtk/gtkstacksidebar.c | 2 +- gtk/gtkstackswitcher.c | 8 +- gtk/gtkstatusbar.c | 18 +- gtk/gtkstatusbar.h | 4 +- gtk/gtkstringlist.c | 20 +- gtk/gtkstylecontext.c | 12 +- gtk/gtkstylecontext.h | 8 +- gtk/gtkswitch.c | 4 +- gtk/gtktextattributes.h | 2 +- gtk/gtktextbtree.c | 24 +- gtk/gtktextbtree.h | 14 +- gtk/gtktextbuffer.c | 66 ++-- gtk/gtktextbuffer.h | 40 +-- gtk/gtktextiter.c | 126 +++---- gtk/gtktextiter.h | 12 +- gtk/gtktextlayout.c | 12 +- gtk/gtktextlayoutprivate.h | 4 +- gtk/gtktextmark.c | 4 +- gtk/gtktextmark.h | 4 +- gtk/gtktextmarkprivate.h | 2 +- gtk/gtktextprivate.h | 2 +- gtk/gtktextsegment.c | 6 +- gtk/gtktextsegment.h | 6 +- gtk/gtktexttag.c | 6 +- gtk/gtktexttag.h | 2 +- gtk/gtktexttagtable.c | 6 +- gtk/gtktexttagtable.h | 2 +- gtk/gtktexttypes.c | 6 +- gtk/gtktexttypes.h | 6 +- gtk/gtktextutil.c | 12 +- gtk/gtktextutil.h | 2 +- gtk/gtktextview.c | 30 +- gtk/gtktextview.h | 2 +- gtk/gtktogglebutton.c | 4 +- gtk/gtktogglebutton.h | 4 +- gtk/gtktooltip.c | 6 +- gtk/gtktooltip.h | 6 +- gtk/gtktreedatalist.c | 8 +- gtk/gtktreednd.c | 4 +- gtk/gtktreemodel.c | 22 +- gtk/gtktreemodel.h | 8 +- gtk/gtktreemodelfilter.c | 2 +- gtk/gtktreemodelsort.c | 2 +- gtk/gtktreepopover.c | 2 +- gtk/gtktreerbtree.c | 4 +- gtk/gtktreestore.c | 22 +- gtk/gtktreeview.c | 42 +-- gtk/gtktreeview.h | 6 +- gtk/gtktreeviewcolumn.c | 26 +- gtk/gtktreeviewcolumn.h | 8 +- gtk/gtkviewport.c | 2 +- gtk/gtkvolumebutton.c | 6 +- gtk/gtkwidget.c | 106 +++--- gtk/gtkwidget.h | 28 +- gtk/gtkwidgetprivate.h | 2 +- gtk/gtkwin32.c | 24 +- gtk/gtkwindow.c | 46 +-- gtk/gtkwindow.h | 14 +- gtk/gtkwindowhandle.c | 4 +- gtk/inspector/action-editor.c | 12 +- gtk/inspector/action-editor.h | 2 +- gtk/inspector/actions.c | 8 +- gtk/inspector/css-editor.c | 4 +- gtk/inspector/css-node-tree.c | 14 +- gtk/inspector/general.c | 22 +- gtk/inspector/init.c | 2 +- gtk/inspector/menu.c | 8 +- gtk/inspector/misc-info.c | 10 +- gtk/inspector/object-tree.c | 10 +- gtk/inspector/prop-editor.c | 58 ++-- gtk/inspector/prop-editor.h | 2 +- gtk/inspector/prop-list.c | 14 +- gtk/inspector/prop-list.h | 4 +- gtk/inspector/resource-list.c | 22 +- gtk/inspector/size-groups.c | 2 +- gtk/inspector/statistics.c | 16 +- gtk/inspector/strv-editor.c | 8 +- gtk/inspector/strv-editor.h | 4 +- gtk/inspector/tree-data.c | 6 +- gtk/inspector/type-info.c | 4 +- gtk/inspector/visual.c | 42 +-- gtk/inspector/window.c | 4 +- gtk/paper_names.c | 8 +- gtk/tools/encodesymbolic.c | 6 +- gtk/tools/gdkpixbufutils.c | 4 +- gtk/tools/gtk-builder-tool-enumerate.c | 6 +- gtk/tools/gtk-builder-tool-preview.c | 4 +- gtk/tools/gtk-builder-tool-simplify.c | 38 +- gtk/tools/gtk-builder-tool-validate.c | 22 +- gtk/tools/gtk-launch.c | 12 +- gtk/tools/gtk-query-settings.c | 4 +- gtk/tools/gtkiconcachevalidator.c | 4 +- gtk/tools/updateiconcache.c | 94 ++--- modules/printbackends/gtkcloudprintaccount.c | 26 +- modules/printbackends/gtkcloudprintaccount.h | 12 +- modules/printbackends/gtkcupssecretsutils.c | 36 +- modules/printbackends/gtkcupssecretsutils.h | 10 +- modules/printbackends/gtkcupsutils.c | 12 +- modules/printbackends/gtkcupsutils.h | 16 +- .../printbackends/gtkprintbackendcloudprint.c | 30 +- modules/printbackends/gtkprintbackendcups.c | 326 +++++++++--------- modules/printbackends/gtkprintbackendfile.c | 36 +- modules/printbackends/gtkprintbackendlpr.c | 6 +- modules/printbackends/gtkprintercloudprint.c | 4 +- modules/printbackends/gtkprintercloudprint.h | 2 +- modules/printbackends/gtkprintercups.c | 16 +- modules/printbackends/gtkprintercups.h | 32 +- tests/listmodel.c | 6 +- tests/overlayscroll.c | 4 +- tests/syncscroll.c | 2 +- tests/testaccel.c | 2 +- tests/testappchooser.c | 6 +- tests/testappchooserbutton.c | 4 +- tests/testassistant.c | 12 +- tests/testbaseline.c | 2 +- tests/testcalendar.c | 2 +- tests/testcellarea.c | 6 +- tests/testcolumnview.c | 2 +- tests/testcombo.c | 2 +- tests/testdialog.c | 4 +- tests/testdnd2.c | 2 +- tests/testentrycompletion.c | 6 +- tests/testerrors.c | 2 +- tests/testfilechooserbutton.c | 8 +- tests/testflowbox.c | 12 +- tests/testfontchooserdialog.c | 2 +- tests/testgmenu.c | 28 +- tests/testgrid.c | 10 +- tests/testgtk.c | 60 ++-- tests/testheaderbar.c | 8 +- tests/testheightforwidth.c | 6 +- tests/testiconview.c | 14 +- tests/testkineticscrolling.c | 2 +- tests/testlevelbar.c | 2 +- tests/testlist.c | 2 +- tests/testlist2.c | 6 +- tests/testlist3.c | 4 +- tests/testlist4.c | 14 +- tests/testlistview.c | 2 +- tests/testlogout.c | 4 +- tests/testnotebookdnd.c | 6 +- tests/testoverlay.c | 6 +- tests/testoverlaystyleclass.c | 2 +- tests/testperf.c | 2 +- tests/testrc.c | 6 +- tests/testrevealer.c | 2 +- tests/testscale.c | 6 +- tests/testscrolledge.c | 2 +- tests/testselectionmode.c | 2 +- tests/testsensitive.c | 2 +- tests/teststack.c | 14 +- tests/testtexthistory.c | 2 +- tests/testtooltips.c | 4 +- tests/testtreecolumns.c | 12 +- tests/testtreecolumnsizing.c | 4 +- tests/testtreednd.c | 2 +- tests/testtreeedit.c | 14 +- tests/testtreefocus.c | 12 +- tests/testtreemodel.c | 16 +- tests/testtreepos.c | 2 +- tests/testtreesort.c | 8 +- tests/testtreeview.c | 10 +- tests/testverticalcells.c | 12 +- tests/testwindowsize.c | 2 +- tests/treestoretest.c | 4 +- testsuite/a11y/accessibility-dump.c | 14 +- testsuite/a11y/children.c | 4 +- testsuite/a11y/state/state-record.c | 28 +- testsuite/a11y/testfocus.c | 4 +- testsuite/a11y/text.c | 52 +-- testsuite/a11y/tree-performance.c | 4 +- testsuite/a11y/tree-relationships.c | 8 +- testsuite/a11y/util.c | 4 +- testsuite/a11y/value.c | 8 +- testsuite/css/api.c | 2 +- testsuite/gdk/encoding.c | 2 +- testsuite/gdk/keysyms.c | 4 +- testsuite/gdk/rgba.c | 8 +- testsuite/gtk/builder.c | 134 +++---- testsuite/gtk/builderparser.c | 20 +- testsuite/gtk/defaultvalue.c | 2 +- testsuite/gtk/displayclose.c | 2 +- testsuite/gtk/entry.c | 6 +- testsuite/gtk/filtermodel.c | 14 +- testsuite/gtk/gestures.c | 20 +- testsuite/gtk/gtktreemodelrefcount.c | 2 +- testsuite/gtk/icontheme.c | 8 +- testsuite/gtk/listbox.c | 12 +- testsuite/gtk/notify.c | 8 +- testsuite/gtk/object.c | 2 +- testsuite/gtk/objects-finalize.c | 2 +- testsuite/gtk/recentmanager.c | 4 +- testsuite/gtk/templates.c | 4 +- testsuite/gtk/textbuffer.c | 12 +- testsuite/gtk/textiter.c | 38 +- testsuite/gtk/treemodel.c | 6 +- testsuite/gtk/treemodel.h | 2 +- testsuite/gtk/treepath.c | 4 +- testsuite/gtk/typename.c | 8 +- testsuite/performance/test-performance.c | 2 +- 667 files changed, 4963 insertions(+), 4963 deletions(-) diff --git a/demos/constraint-editor/constraint-editor-application.c b/demos/constraint-editor/constraint-editor-application.c index ca65cb695d..0eef96ac38 100644 --- a/demos/constraint-editor/constraint-editor-application.c +++ b/demos/constraint-editor/constraint-editor-application.c @@ -82,7 +82,7 @@ static void constraint_editor_application_open (GApplication *app, GFile **files, int n_files, - const gchar *hint) + const char *hint) { ConstraintEditorWindow *win; int i; diff --git a/demos/gtk-demo/application.c b/demos/gtk-demo/application.c index 2b5e8e094a..801b728a40 100644 --- a/demos/gtk-demo/application.c +++ b/demos/gtk-demo/application.c @@ -34,7 +34,7 @@ static void create_window (GApplication *app, const char *contents); static void show_action_dialog (GSimpleAction *action) { - const gchar *name; + const char *name; GtkWidget *dialog; name = g_action_get_name (G_ACTION (action)); @@ -58,9 +58,9 @@ show_action_infobar (GSimpleAction *action, gpointer data) { DemoApplicationWindow *window = data; - gchar *text; - const gchar *name; - const gchar *value; + char *text; + const char *name; + const char *value; name = g_action_get_name (G_ACTION (action)); value = g_variant_get_string (parameter, NULL); @@ -185,7 +185,7 @@ activate_about (GSimpleAction *action, { GtkWidget *window = user_data; - const gchar *authors[] = { + const char *authors[] = { "Peter Mattis", "Spencer Kimball", "Josh MacDonald", @@ -193,7 +193,7 @@ activate_about (GSimpleAction *action, NULL }; - const gchar *documentors[] = { + const char *documentors[] = { "Owen Taylor", "Tony Gale", "Matthias Clasen ", @@ -244,7 +244,7 @@ static void update_statusbar (GtkTextBuffer *buffer, DemoApplicationWindow *window) { - gchar *msg; + char *msg; int row, col; int count; GtkTextIter iter; diff --git a/demos/gtk-demo/application_demo.c b/demos/gtk-demo/application_demo.c index 087ea3ff8f..987ef0dab3 100644 --- a/demos/gtk-demo/application_demo.c +++ b/demos/gtk-demo/application_demo.c @@ -16,8 +16,8 @@ static GtkWidget *placeholder; static void on_name_appeared (GDBusConnection *connection, - const gchar *name, - const gchar *name_owner, + const char *name, + const char *name_owner, gpointer user_data) { name_seen = TRUE; @@ -25,7 +25,7 @@ on_name_appeared (GDBusConnection *connection, static void on_name_vanished (GDBusConnection *connection, - const gchar *name, + const char *name, gpointer user_data) { if (!name_seen) @@ -55,7 +55,7 @@ do_application_demo (GtkWidget *toplevel) if (placeholder == NULL) { - const gchar *command; + const char *command; GError *error = NULL; if (g_file_test ("./gtk4-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE)) diff --git a/demos/gtk-demo/assistant.c b/demos/gtk-demo/assistant.c index b90e42ab55..d3f3780a6b 100644 --- a/demos/gtk-demo/assistant.c +++ b/demos/gtk-demo/assistant.c @@ -48,7 +48,7 @@ static void on_assistant_prepare (GtkWidget *widget, GtkWidget *page, gpointer data) { int current_page, n_pages; - gchar *title; + char *title; current_page = gtk_assistant_get_current_page (GTK_ASSISTANT (widget)); n_pages = gtk_assistant_get_n_pages (GTK_ASSISTANT (widget)); @@ -71,7 +71,7 @@ on_entry_changed (GtkWidget *widget, gpointer data) GtkAssistant *assistant = GTK_ASSISTANT (data); GtkWidget *current_page; int page_number; - const gchar *text; + const char *text; page_number = gtk_assistant_get_current_page (assistant); current_page = gtk_assistant_get_nth_page (assistant, page_number); diff --git a/demos/gtk-demo/css_blendmodes.c b/demos/gtk-demo/css_blendmodes.c index 5efd3cf32b..0543750d9c 100644 --- a/demos/gtk-demo/css_blendmodes.c +++ b/demos/gtk-demo/css_blendmodes.c @@ -38,14 +38,14 @@ struct { #pragma GCC diagnostic ignored "-Wformat-nonliteral" static void update_css_for_blend_mode (GtkCssProvider *provider, - const gchar *blend_mode) + const char *blend_mode) { GBytes *bytes; - gchar *css; + char *css; bytes = g_resources_lookup_data ("/css_blendmodes/css_blendmodes.css", 0, NULL); - css = g_strdup_printf ((gchar*) g_bytes_get_data (bytes, NULL), + css = g_strdup_printf ((char *) g_bytes_get_data (bytes, NULL), blend_mode, blend_mode, blend_mode); @@ -62,7 +62,7 @@ row_activated (GtkListBox *listbox, GtkListBoxRow *row, GtkCssProvider *provider) { - const gchar *blend_mode; + const char *blend_mode; blend_mode = blend_modes[gtk_list_box_row_get_index (row)].id; diff --git a/demos/gtk-demo/demoimage.c b/demos/gtk-demo/demoimage.c index 37c0acd684..40acbd2dce 100644 --- a/demos/gtk-demo/demoimage.c +++ b/demos/gtk-demo/demoimage.c @@ -17,7 +17,7 @@ G_DEFINE_TYPE(DemoImage, demo_image, GTK_TYPE_WIDGET) static GdkPaintable * get_image_paintable (GtkImage *image) { - const gchar *icon_name; + const char *icon_name; GtkIconTheme *icon_theme; GtkIconPaintable *icon; diff --git a/demos/gtk-demo/editable_cells.c b/demos/gtk-demo/editable_cells.c index 0cc307b160..cd1fc9be3c 100644 --- a/demos/gtk-demo/editable_cells.c +++ b/demos/gtk-demo/editable_cells.c @@ -17,7 +17,7 @@ typedef struct { int number; - gchar *product; + char *product; int yummy; } Item; @@ -224,7 +224,7 @@ separator_row (GtkTreeModel *model, static void editing_started (GtkCellRenderer *cell, GtkCellEditable *editable, - const gchar *path, + const char *path, gpointer data) { gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (editable), @@ -233,8 +233,8 @@ editing_started (GtkCellRenderer *cell, static void cell_edited (GtkCellRendererText *cell, - const gchar *path_string, - const gchar *new_text, + const char *path_string, + const char *new_text, gpointer data) { GtkTreeModel *model = (GtkTreeModel *)data; @@ -262,7 +262,7 @@ cell_edited (GtkCellRendererText *cell, case COLUMN_ITEM_PRODUCT: { int i; - gchar *old_text; + char *old_text; gtk_tree_model_get (model, &iter, column, &old_text, -1); g_free (old_text); diff --git a/demos/gtk-demo/filtermodel.c b/demos/gtk-demo/filtermodel.c index b1492c71ca..85180372ee 100644 --- a/demos/gtk-demo/filtermodel.c +++ b/demos/gtk-demo/filtermodel.c @@ -23,7 +23,7 @@ format_number (GtkTreeViewColumn *col, gpointer data) { int num; - gchar *text; + char *text; gtk_tree_model_get (model, iter, GPOINTER_TO_INT (data), &num, -1); text = g_strdup_printf ("%d", num); diff --git a/demos/gtk-demo/flowbox.c b/demos/gtk-demo/flowbox.c index 2673e35d08..df7d6f3905 100644 --- a/demos/gtk-demo/flowbox.c +++ b/demos/gtk-demo/flowbox.c @@ -29,7 +29,7 @@ draw_color (GtkDrawingArea *drawingarea, } static GtkWidget * -color_swatch_new (const gchar *color) +color_swatch_new (const char *color) { GtkWidget *button, *area; @@ -48,7 +48,7 @@ do_flowbox (GtkWidget *do_widget) { static GtkWidget *window = NULL; GtkWidget *scrolled, *flowbox; - const gchar *colors[] = { + const char *colors[] = { "AliceBlue", "AntiqueWhite", "AntiqueWhite1", diff --git a/demos/gtk-demo/font_features.c b/demos/gtk-demo/font_features.c index 09ca986764..0e7a3cf333 100644 --- a/demos/gtk-demo/font_features.c +++ b/demos/gtk-demo/font_features.c @@ -729,7 +729,7 @@ entry_activated (GtkEntry *entry, GtkAdjustment *adjustment) { gdouble value; - gchar *err = NULL; + char *err = NULL; value = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err); if (err != NULL) diff --git a/demos/gtk-demo/iconview.c b/demos/gtk-demo/iconview.c index cd462de844..030e9a896a 100644 --- a/demos/gtk-demo/iconview.c +++ b/demos/gtk-demo/iconview.c @@ -25,7 +25,7 @@ enum static GdkPixbuf *file_pixbuf, *folder_pixbuf; -gchar *parent; +char *parent; GtkWidget *up_button; /* Loads the images for the demo and returns whether the operation succeeded */ @@ -47,7 +47,7 @@ static void fill_store (GtkListStore *store) { GDir *dir; - const gchar *name; + const char *name; GtkTreeIter iter; /* First clear the store */ @@ -62,7 +62,7 @@ fill_store (GtkListStore *store) name = g_dir_read_name (dir); while (name != NULL) { - gchar *path, *display_name; + char *path, *display_name; gboolean is_dir; /* We ignore hidden files that start with a '.' */ @@ -97,7 +97,7 @@ sort_func (GtkTreeModel *model, gpointer user_data) { gboolean is_dir_a, is_dir_b; - gchar *name_a, *name_b; + char *name_a, *name_b; int ret; /* We need this function because we want to sort @@ -158,7 +158,7 @@ item_activated (GtkIconView *icon_view, gpointer user_data) { GtkListStore *store; - gchar *path; + char *path; GtkTreeIter iter; gboolean is_dir; @@ -192,7 +192,7 @@ up_clicked (GtkButton *item, gpointer user_data) { GtkListStore *store; - gchar *dir_name; + char *dir_name; store = GTK_LIST_STORE (user_data); diff --git a/demos/gtk-demo/iconview_edit.c b/demos/gtk-demo/iconview_edit.c index 6225230a64..69e6184055 100644 --- a/demos/gtk-demo/iconview_edit.c +++ b/demos/gtk-demo/iconview_edit.c @@ -19,7 +19,7 @@ static void fill_store (GtkListStore *store) { GtkTreeIter iter; - const gchar *text[] = { "Red", "Green", "Blue", "Yellow" }; + const char *text[] = { "Red", "Green", "Blue", "Yellow" }; int i; /* First clear the store */ @@ -49,7 +49,7 @@ set_cell_color (GtkCellLayout *cell_layout, GtkTreeIter *iter, gpointer data) { - gchar *text; + char *text; GdkRGBA color; guint32 pixel = 0; GdkPixbuf *pixbuf; @@ -77,8 +77,8 @@ set_cell_color (GtkCellLayout *cell_layout, static void edited (GtkCellRendererText *cell, - gchar *path_string, - gchar *text, + char *path_string, + char *text, gpointer data) { GtkTreeModel *model; diff --git a/demos/gtk-demo/links.c b/demos/gtk-demo/links.c index b8afd56638..8655b8a23a 100644 --- a/demos/gtk-demo/links.c +++ b/demos/gtk-demo/links.c @@ -17,7 +17,7 @@ response_cb (GtkWidget *dialog, static gboolean activate_link (GtkWidget *label, - const gchar *uri, + const char *uri, gpointer data) { if (g_strcmp0 (uri, "keynav") == 0) diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c index aea46e21ea..e8aa1ab93a 100644 --- a/demos/gtk-demo/main.c +++ b/demos/gtk-demo/main.c @@ -13,7 +13,7 @@ static GtkWidget *info_view; static GtkWidget *source_view; -static gchar *current_file = NULL; +static char *current_file = NULL; static GtkWidget *notebook; static GtkSingleSelection *selection; @@ -141,7 +141,7 @@ activate_about (GSimpleAction *action, gpointer user_data) { GtkApplication *app = user_data; - const gchar *authors[] = { + const char *authors[] = { "The GTK Team", NULL }; @@ -254,7 +254,7 @@ static const char *types[] = "void", " int ", " char ", - "gchar ", + "char ", "gfloat", "float", "double", @@ -384,14 +384,14 @@ static const char *control[] = NULL }; void -parse_chars (gchar *text, - gchar **end_ptr, +parse_chars (char *text, + char **end_ptr, int *state, const char **tag, gboolean start) { int i; - gchar *next_token; + char *next_token; /* Handle comments first */ if (*state == STATE_IN_COMMENT) @@ -525,8 +525,8 @@ fontify (GtkTextBuffer *source_buffer) { GtkTextIter start_iter, next_iter, tmp_iter; int state; - gchar *text; - gchar *start_ptr, *end_ptr; + char *text; + char *start_ptr, *end_ptr; const char *tag; gtk_text_buffer_create_tag (source_buffer, "source", @@ -694,10 +694,10 @@ static struct { }; static void -add_data_tab (const gchar *demoname) +add_data_tab (const char *demoname) { - gchar *resource_dir, *resource_name; - gchar **resources; + char *resource_dir, *resource_name; + char **resources; GtkWidget *widget, *label; guint i, j; @@ -748,8 +748,8 @@ remove_data_tabs (void) } void -load_file (const gchar *demoname, - const gchar *filename) +load_file (const char *demoname, + const char *filename) { GtkTextBuffer *info_buffer, *source_buffer; GtkTextIter start, end; @@ -757,7 +757,7 @@ load_file (const gchar *demoname, GError *err = NULL; int state = 0; gboolean in_para = 0; - gchar **lines; + char **lines; GBytes *bytes; int i; @@ -799,9 +799,9 @@ load_file (const gchar *demoname, gtk_text_buffer_get_iter_at_offset (info_buffer, &start, 0); for (i = 0; lines[i] != NULL; i++) { - gchar *p; - gchar *q; - gchar *r; + char *p; + char *q; + char *r; /* Make sure \r is stripped at the end for the poor windows people */ lines[i] = g_strchomp (lines[i]); @@ -1194,7 +1194,7 @@ command_line (GApplication *app, GApplicationCommandLine *cmdline) { GVariantDict *options; - const gchar *name = NULL; + const char *name = NULL; gboolean autoquit = FALSE; gboolean list = FALSE; DemoData *d, *c; @@ -1297,8 +1297,8 @@ main (int argc, char **argv) { "inspector", activate_inspector, NULL, NULL, NULL }, }; struct { - const gchar *action_and_target; - const gchar *accelerators[2]; + const char *action_and_target; + const char *accelerators[2]; } accels[] = { { "app.about", { "F1", NULL } }, { "app.quit", { "q", NULL } }, diff --git a/demos/gtk-demo/markup.c b/demos/gtk-demo/markup.c index 671fb5c92d..6648d508f3 100644 --- a/demos/gtk-demo/markup.c +++ b/demos/gtk-demo/markup.c @@ -21,7 +21,7 @@ source_toggled (GtkToggleButton *button) { GtkTextBuffer *buffer; GtkTextIter start, end; - gchar *markup; + char *markup; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view2)); gtk_text_buffer_get_bounds (buffer, &start, &end); @@ -50,7 +50,7 @@ do_markup (GtkWidget *do_widget) GtkTextBuffer *buffer; GtkTextIter iter; GBytes *bytes; - const gchar *markup; + const char *markup; GtkWidget *header; GtkWidget *show_source; @@ -102,7 +102,7 @@ do_markup (GtkWidget *do_widget) gtk_stack_add_named (GTK_STACK (stack), sw, "source"); bytes = g_resources_lookup_data ("/markup/markup.txt", 0, NULL); - markup = (const gchar *)g_bytes_get_data (bytes, NULL); + markup = (const char *)g_bytes_get_data (bytes, NULL); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); gtk_text_buffer_get_start_iter (buffer, &iter); diff --git a/demos/gtk-demo/paint.c b/demos/gtk-demo/paint.c index 8717330276..d3e6c59cf1 100644 --- a/demos/gtk-demo/paint.c +++ b/demos/gtk-demo/paint.c @@ -38,7 +38,7 @@ static GtkPadActionEntry pad_actions[] = { { GTK_PAD_ACTION_STRIP, -1, -1, N_("Brush size"), "pad.brush_size" }, }; -static const gchar *pad_colors[] = { +static const char *pad_colors[] = { "black", "pink", "green", @@ -154,7 +154,7 @@ on_pad_button_activate (GSimpleAction *action, GVariant *parameter, DrawingArea *area) { - const gchar *color = g_object_get_data (G_OBJECT (action), "color"); + const char *color = g_object_get_data (G_OBJECT (action), "color"); GdkRGBA rgba; gdk_rgba_parse (&rgba, color); diff --git a/demos/gtk-demo/panes.c b/demos/gtk-demo/panes.c index e756a181e3..134d3bea97 100644 --- a/demos/gtk-demo/panes.c +++ b/demos/gtk-demo/panes.c @@ -47,9 +47,9 @@ toggle_shrink (GtkWidget *widget, static GtkWidget * create_pane_options (GtkPaned *paned, - const gchar *frame_label, - const gchar *label1, - const gchar *label2) + const char *frame_label, + const char *label1, + const char *label2) { GtkWidget *child1, *child2; GtkWidget *frame; diff --git a/demos/gtk-demo/printing.c b/demos/gtk-demo/printing.c index 96232db40f..5dd0ed493b 100644 --- a/demos/gtk-demo/printing.c +++ b/demos/gtk-demo/printing.c @@ -14,11 +14,11 @@ typedef struct { - gchar *resourcename; + char *resourcename; gdouble font_size; int lines_per_page; - gchar **lines; + char **lines; int num_lines; int num_pages; } PrintData; @@ -65,7 +65,7 @@ draw_page (GtkPrintOperation *operation, gdouble width; int line, i; PangoFontDescription *desc; - gchar *page_str; + char *page_str; cr = gtk_print_context_get_cairo_context (context); width = gtk_print_context_get_width (context); diff --git a/demos/gtk-demo/revealer.c b/demos/gtk-demo/revealer.c index c3ed6b4cdd..e4e94a8536 100644 --- a/demos/gtk-demo/revealer.c +++ b/demos/gtk-demo/revealer.c @@ -25,7 +25,7 @@ static gboolean reveal_one (gpointer data) { GtkWidget *window = data; - gchar *name; + char *name; GtkRevealer *revealer; name = g_strdup_printf ("revealer%d", count); diff --git a/demos/gtk-demo/shortcuts.c b/demos/gtk-demo/shortcuts.c index 941ef77481..7dcfe8fd42 100644 --- a/demos/gtk-demo/shortcuts.c +++ b/demos/gtk-demo/shortcuts.c @@ -8,12 +8,12 @@ static void show_shortcuts (GtkWidget *window, - const gchar *id, - const gchar *view) + const char *id, + const char *view) { GtkBuilder *builder; GtkWidget *overlay; - gchar *path; + char *path; path = g_strdup_printf ("/shortcuts/%s.ui", id); builder = gtk_builder_new_from_resource (path); diff --git a/demos/gtk-demo/sidebar.c b/demos/gtk-demo/sidebar.c index 714978a1a2..c7ca861b55 100644 --- a/demos/gtk-demo/sidebar.c +++ b/demos/gtk-demo/sidebar.c @@ -18,7 +18,7 @@ do_sidebar (GtkWidget *do_widget) GtkWidget *box; GtkWidget *widget; GtkWidget *header; - const gchar* pages[] = { + const char * pages[] = { "Welcome to GTK", "GtkStackSidebar Widget", "Automatic navigation", @@ -30,7 +30,7 @@ do_sidebar (GtkWidget *do_widget) "Page 9", NULL }; - const gchar *c = NULL; + const char *c = NULL; guint i; if (!window) diff --git a/demos/gtk-demo/spinbutton.c b/demos/gtk-demo/spinbutton.c index e00dfb87de..da41f04407 100644 --- a/demos/gtk-demo/spinbutton.c +++ b/demos/gtk-demo/spinbutton.c @@ -15,8 +15,8 @@ int spinbutton_hex_spin_input (GtkSpinButton *spin_button, gdouble *new_val) { - const gchar *buf; - gchar *err; + const char *buf; + char *err; gdouble res; buf = gtk_editable_get_text (GTK_EDITABLE (spin_button)); @@ -32,7 +32,7 @@ int spinbutton_hex_spin_output (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; - gchar *buf; + char *buf; gdouble val; adjustment = gtk_spin_button_get_adjustment (spin_button); @@ -52,13 +52,13 @@ int spinbutton_time_spin_input (GtkSpinButton *spin_button, gdouble *new_val) { - const gchar *text; - gchar **str; + const char *text; + char **str; gboolean found = FALSE; int hours; int minutes; - gchar *endh; - gchar *endm; + char *endh; + char *endm; text = gtk_editable_get_text (GTK_EDITABLE (spin_button)); str = g_strsplit (text, ":", 2); @@ -91,7 +91,7 @@ int spinbutton_time_spin_output (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; - gchar *buf; + char *buf; gdouble hours; gdouble minutes; @@ -126,7 +126,7 @@ spinbutton_month_spin_input (GtkSpinButton *spin_button, gdouble *new_val) { int i; - gchar *tmp1, *tmp2; + char *tmp1, *tmp2; gboolean found = FALSE; for (i = 1; i <= 12; i++) diff --git a/demos/gtk-demo/tree_store.c b/demos/gtk-demo/tree_store.c index a15dbab32a..4514aceec9 100644 --- a/demos/gtk-demo/tree_store.c +++ b/demos/gtk-demo/tree_store.c @@ -14,7 +14,7 @@ typedef struct _TreeItem TreeItem; struct _TreeItem { - const gchar *label; + const char *label; gboolean alex; gboolean havoc; gboolean tim; @@ -222,7 +222,7 @@ create_model (void) static void item_toggled (GtkCellRendererToggle *cell, - gchar *path_str, + char *path_str, gpointer data) { GtkTreeModel *model = (GtkTreeModel *)data; diff --git a/demos/icon-browser/iconbrowserapp.c b/demos/icon-browser/iconbrowserapp.c index f5b7c76844..31466c73dc 100644 --- a/demos/icon-browser/iconbrowserapp.c +++ b/demos/icon-browser/iconbrowserapp.c @@ -43,7 +43,7 @@ about_activated (GSimpleAction *action, gpointer user_data) { GtkApplication *app = user_data; - const gchar *authors[] = { + const char *authors[] = { "The GTK Team", NULL }; @@ -103,7 +103,7 @@ static GActionEntry app_entries[] = static void icon_browser_app_startup (GApplication *app) { - const gchar *quit_accels[2] = { "Q", NULL }; + const char *quit_accels[2] = { "Q", NULL }; G_APPLICATION_CLASS (icon_browser_app_parent_class)->startup (app); diff --git a/demos/icon-browser/iconbrowserwin.c b/demos/icon-browser/iconbrowserwin.c index b276fdd142..700d8381f9 100644 --- a/demos/icon-browser/iconbrowserwin.c +++ b/demos/icon-browser/iconbrowserwin.c @@ -44,13 +44,13 @@ icon_browser_window_get_icon_theme (IconBrowserWindow *win) static void add_icon (IconBrowserWindow *win, - const gchar *name, - const gchar *description, - const gchar *context) + const char *name, + const char *description, + const char *context) { GtkIconTheme *icon_theme = icon_browser_window_get_icon_theme (win); - gchar *regular_name; - gchar *symbolic_name; + char *regular_name; + char *symbolic_name; IbIcon *icon; regular_name = g_strdup (name); @@ -77,9 +77,9 @@ add_icon (IconBrowserWindow *win, static void add_context (IconBrowserWindow *win, - const gchar *id, - const gchar *name, - const gchar *description) + const char *id, + const char *name, + const char *description) { IbContext *context; @@ -161,7 +161,7 @@ copy_to_clipboard (GtkButton *button, } static void -set_image (GtkWidget *image, const gchar *name, int size) +set_image (GtkWidget *image, const char *name, int size) { gtk_image_set_from_icon_name (GTK_IMAGE (image), name); gtk_image_set_pixel_size (GTK_IMAGE (image), size); @@ -219,7 +219,7 @@ item_activated (GtkGridView *view, static GdkPaintable * get_image_paintable (GtkImage *image) { - const gchar *icon_name; + const char *icon_name; GtkIconTheme *icon_theme; GtkIconPaintable *icon; int size; diff --git a/demos/node-editor/node-editor-application.c b/demos/node-editor/node-editor-application.c index 6fefa60b7a..ca5ef04e41 100644 --- a/demos/node-editor/node-editor-application.c +++ b/demos/node-editor/node-editor-application.c @@ -200,7 +200,7 @@ static void node_editor_application_open (GApplication *app, GFile **files, int n_files, - const gchar *hint) + const char *hint) { NodeEditorWindow *win; int i; diff --git a/demos/node-editor/node-editor-window.c b/demos/node-editor/node-editor-window.c index 7b20364496..1e88395385 100644 --- a/demos/node-editor/node-editor-window.c +++ b/demos/node-editor/node-editor-window.c @@ -80,7 +80,7 @@ text_view_error_free (TextViewError *e) g_free (e->message); } -static gchar * +static char * get_current_text (GtkTextBuffer *buffer) { GtkTextIter start, end; diff --git a/demos/print-editor/print-editor.c b/demos/print-editor/print-editor.c index 69a5819ae3..4bd88b0c4a 100644 --- a/demos/print-editor/print-editor.c +++ b/demos/print-editor/print-editor.c @@ -33,7 +33,7 @@ update_title (GtkWindow *window) static void update_statusbar (void) { - gchar *msg; + char *msg; int row, col; GtkTextIter iter; const char *print_str; @@ -675,7 +675,7 @@ static GActionEntry app_entries[] = { { "print", activate_print, NULL, NULL, NULL } }; -static const gchar ui_info[] = +static const char ui_info[] = "" " " " " diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c index f48a906e1b..90915f6b70 100644 --- a/demos/widget-factory/widget-factory.c +++ b/demos/widget-factory/widget-factory.c @@ -250,12 +250,12 @@ activate_about (GSimpleAction *action, gpointer user_data) { GtkApplication *app = user_data; - const gchar *authors[] = { + const char *authors[] = { "Andrea Cimitan", "Cosimo Cecchi", NULL }; - gchar *version; + char *version; GString *s; s = g_string_new (""); @@ -423,7 +423,7 @@ spin_value_changed (GtkAdjustment *adjustment, GtkWidget *label) { GtkWidget *w; int v; - gchar *text; + char *text; v = (int)gtk_adjustment_get_value (adjustment); @@ -542,7 +542,7 @@ on_scale_button_value_changed (GtkScaleButton *button, { GtkAdjustment *adjustment; gdouble val; - gchar *str; + char *str; adjustment = gtk_scale_button_get_adjustment (button); val = gtk_scale_button_get_value (button); @@ -703,7 +703,7 @@ action_dialog_button_clicked (GtkButton *button, GtkWidget *page) static void page_changed_cb (GtkWidget *stack, GParamSpec *pspec, gpointer data) { - const gchar *name; + const char *name; GtkWidget *window; GtkWidget *page; @@ -853,10 +853,10 @@ update_title_header (GtkListBoxRow *row, gpointer data) { GtkWidget *header; - gchar *title; + char *title; header = gtk_list_box_row_get_header (row); - title = (gchar *)g_object_get_data (G_OBJECT (row), "title"); + title = (char *)g_object_get_data (G_OBJECT (row), "title"); if (!header && title) { title = g_strdup_printf ("%s", title); @@ -881,8 +881,8 @@ overshot (GtkScrolledWindow *sw, GtkPositionType pos, GtkWidget *widget) { GtkWidget *box, *row, *label, *swatch; GdkRGBA rgba; - const gchar *color; - gchar *text; + const char *color; + char *text; GtkWidget *silver; GtkWidget *gold; @@ -983,7 +983,7 @@ set_color (GtkListBox *box, GtkListBoxRow *row, GtkColorChooser *chooser) static void populate_colors (GtkWidget *widget, GtkWidget *chooser) { - struct { const gchar *name; const gchar *color; const gchar *title; } colors[] = { + struct { const char *name; const char *color; const char *title; } colors[] = { { "2.5", "#C8828C", "Red" }, { "5", "#C98286", NULL }, { "7.5", "#C9827F", NULL }, @@ -1081,7 +1081,7 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser) typedef struct { GtkWidget *flowbox; - gchar *filename; + char *filename; } BackgroundData; static void @@ -1127,11 +1127,11 @@ background_loaded_cb (GObject *source, static void populate_flowbox (GtkWidget *flowbox) { - const gchar *location; + const char *location; GDir *dir; GError *error = NULL; - const gchar *name; - gchar *filename; + const char *name; + char *filename; GFile *file; GInputStream *stream; BackgroundData *bd; @@ -1288,7 +1288,7 @@ my_text_view_class_init (MyTextViewClass *class) } static void -my_text_view_set_background (MyTextView *tv, const gchar *filename, gboolean is_resource) +my_text_view_set_background (MyTextView *tv, const char *filename, gboolean is_resource) { GError *error = NULL; GFile *file; @@ -1336,7 +1336,7 @@ close_selection_dialog (GtkWidget *dialog, int response, GtkWidget *tv) GtkWidget *box; GtkWidget *child; GList *children; - const gchar *filename; + const char *filename; gboolean is_resource; gtk_widget_hide (dialog); @@ -1352,7 +1352,7 @@ close_selection_dialog (GtkWidget *dialog, int response, GtkWidget *tv) return; child = children->data; - filename = (const gchar *)g_object_get_data (G_OBJECT (child), "filename"); + filename = (const char *)g_object_get_data (G_OBJECT (child), "filename"); is_resource = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (child), "is-resource")); g_list_free (children); @@ -1377,8 +1377,8 @@ static void handle_insert (GtkWidget *button, GtkWidget *textview) { GtkTextBuffer *buffer; - const gchar *id; - const gchar *text; + const char *id; + const char *text; id = gtk_buildable_get_name (GTK_BUILDABLE (button)); @@ -1402,7 +1402,7 @@ handle_cutcopypaste (GtkWidget *button, GtkWidget *textview) { GtkTextBuffer *buffer; GdkClipboard *clipboard; - const gchar *id; + const char *id; clipboard = gtk_widget_get_clipboard (textview); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview)); @@ -1421,7 +1421,7 @@ handle_cutcopypaste (GtkWidget *button, GtkWidget *textview) static void clipboard_formats_notify (GdkClipboard *clipboard, GdkEvent *event, GtkWidget *button) { - const gchar *id; + const char *id; gboolean has_text; id = gtk_buildable_get_name (GTK_BUILDABLE (button)); @@ -1434,7 +1434,7 @@ clipboard_formats_notify (GdkClipboard *clipboard, GdkEvent *event, GtkWidget *b static void textbuffer_notify_selection (GObject *object, GParamSpec *pspec, GtkWidget *button) { - const gchar *id; + const char *id; gboolean has_selection; id = gtk_buildable_get_name (GTK_BUILDABLE (button)); @@ -1469,7 +1469,7 @@ page_combo_separator_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { - gchar *text; + char *text; gboolean res; gtk_tree_model_get (model, iter, 0, &text, -1); @@ -1594,7 +1594,7 @@ text_view_add_to_context_menu (GtkTextView *text_view) static void open_popover_text_changed (GtkEntry *entry, GParamSpec *pspec, GtkWidget *button) { - const gchar *text; + const char *text; text = gtk_editable_get_text (GTK_EDITABLE (entry)); gtk_widget_set_sensitive (button, strlen (text) > 0); @@ -1864,8 +1864,8 @@ activate (GApplication *app) { "print", activate_print, NULL, NULL, NULL }, }; struct { - const gchar *action_and_target; - const gchar *accelerators[2]; + const char *action_and_target; + const char *accelerators[2]; } accels[] = { { "app.about", { "F1", NULL } }, { "app.quit", { "q", NULL } }, @@ -1878,8 +1878,8 @@ activate (GApplication *app) { "win.lock", { "l", NULL } }, }; struct { - const gchar *action_and_target; - const gchar *accelerators[2]; + const char *action_and_target; + const char *accelerators[2]; } late_accels[] = { { "app.cut", { "x", NULL } }, { "app.copy", { "c", NULL } }, diff --git a/docs/CODING-STYLE.md b/docs/CODING-STYLE.md index 3fc2e0c101..e0f3ca13ca 100644 --- a/docs/CODING-STYLE.md +++ b/docs/CODING-STYLE.md @@ -474,10 +474,10 @@ The maximum width of each column is given by the longest element in the column: ```c - void gtk_type_set_property (GtkType *type, - const gchar *value, - GError **error); - const gchar *gtk_type_get_property (GtkType *type); + void gtk_type_set_property (GtkType *type, + const char *value, + GError **error); + const char *gtk_type_get_property (GtkType *type); ``` It is also possible to align the columns to the next tab: diff --git a/docs/reference/gtk/getting_started.md b/docs/reference/gtk/getting_started.md index 6252defd18..d3b62b437c 100644 --- a/docs/reference/gtk/getting_started.md +++ b/docs/reference/gtk/getting_started.md @@ -798,7 +798,7 @@ static void example_app_open (GApplication *app, GFile **files, int n_files, - const gchar *hint) + const char *hint) { GList *windows; ExampleAppWindow *win; @@ -1138,7 +1138,7 @@ example_app_startup (GApplication *app) { GtkBuilder *builder; GMenuModel *app_menu; - const gchar *quit_accels[2] = { "<Ctrl>Q", NULL }; + const char *quit_accels[2] = { "<Ctrl>Q", NULL }; G_APPLICATION_CLASS (example_app_parent_class)->startup (app); @@ -1476,7 +1476,7 @@ static void search_text_changed (GtkEntry *entry, ExampleAppWindow *win) { - const gchar *text; + const char *text; GtkWidget *tab; GtkWidget *view; GtkTextBuffer *buffer; diff --git a/docs/reference/gtk/section-tree-widget.md b/docs/reference/gtk/section-tree-widget.md index b51cd3fb7a..fd6978a626 100644 --- a/docs/reference/gtk/section-tree-widget.md +++ b/docs/reference/gtk/section-tree-widget.md @@ -189,7 +189,7 @@ tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data) { GtkTreeIter iter; GtkTreeModel *model; - gchar *author; + char *author; if (gtk_tree_selection_get_selected (selection, &model, &iter)) { diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c index 1a42dd2cbe..93aeb2ab52 100644 --- a/docs/tools/widgets.c +++ b/docs/tools/widgets.c @@ -797,7 +797,7 @@ static WidgetInfo * create_about_dialog (void) { GtkWidget *widget; - const gchar *authors[] = { + const char *authors[] = { "Peter Mattis", "Spencer Kimball", "Josh MacDonald", diff --git a/docs/tools/widgets.h b/docs/tools/widgets.h index c9ac2b4c86..2e337038d6 100644 --- a/docs/tools/widgets.h +++ b/docs/tools/widgets.h @@ -15,7 +15,7 @@ typedef enum typedef struct WidgetInfo { GtkWidget *window; - gchar *name; + char *name; gboolean no_focus; gboolean include_decorations; WidgetSize size; diff --git a/examples/action-namespace.c b/examples/action-namespace.c index aa4074e9d9..ee001912ad 100644 --- a/examples/action-namespace.c +++ b/examples/action-namespace.c @@ -32,7 +32,7 @@ static GActionEntry win_entries[] = { { "close", action_activated }, }; -const gchar *menu_ui = +const char *menu_ui = "" " " "
" diff --git a/examples/application1/exampleapp.c b/examples/application1/exampleapp.c index a730c1f555..9e99e8560a 100644 --- a/examples/application1/exampleapp.c +++ b/examples/application1/exampleapp.c @@ -28,7 +28,7 @@ static void example_app_open (GApplication *app, GFile **files, int n_files, - const gchar *hint) + const char *hint) { GList *windows; ExampleAppWindow *win; diff --git a/examples/application10/exampleappwin.c b/examples/application10/exampleappwin.c index d5f4d43e31..2de74cf0e7 100644 --- a/examples/application10/exampleappwin.c +++ b/examples/application10/exampleappwin.c @@ -25,7 +25,7 @@ static void search_text_changed (GtkEntry *entry, ExampleAppWindow *win) { - const gchar *text; + const char *text; GtkWidget *tab; GtkWidget *view; GtkTextBuffer *buffer; @@ -55,7 +55,7 @@ static void find_word (GtkButton *button, ExampleAppWindow *win) { - const gchar *word; + const char *word; word = gtk_button_get_label (button); gtk_editable_set_text (GTK_EDITABLE (win->searchentry), word); @@ -69,7 +69,7 @@ update_words (ExampleAppWindow *win) GtkWidget *tab, *view, *row; GtkTextBuffer *buffer; GtkTextIter start, end; - gchar *word, *key; + char *word, *key; GtkWidget *child; tab = gtk_stack_get_visible_child (GTK_STACK (win->stack)); @@ -121,7 +121,7 @@ update_lines (ExampleAppWindow *win) GtkWidget *tab, *view; GtkTextBuffer *buffer; int count; - gchar *lines; + char *lines; tab = gtk_stack_get_visible_child (GTK_STACK (win->stack)); @@ -248,9 +248,9 @@ void example_app_window_open (ExampleAppWindow *win, GFile *file) { - gchar *basename; + char *basename; GtkWidget *scrolled, *view; - gchar *contents; + char *contents; gsize length; GtkTextBuffer *buffer; GtkTextTag *tag; diff --git a/examples/application2/exampleapp.c b/examples/application2/exampleapp.c index a730c1f555..9e99e8560a 100644 --- a/examples/application2/exampleapp.c +++ b/examples/application2/exampleapp.c @@ -28,7 +28,7 @@ static void example_app_open (GApplication *app, GFile **files, int n_files, - const gchar *hint) + const char *hint) { GList *windows; ExampleAppWindow *win; diff --git a/examples/application3/exampleapp.c b/examples/application3/exampleapp.c index a730c1f555..9e99e8560a 100644 --- a/examples/application3/exampleapp.c +++ b/examples/application3/exampleapp.c @@ -28,7 +28,7 @@ static void example_app_open (GApplication *app, GFile **files, int n_files, - const gchar *hint) + const char *hint) { GList *windows; ExampleAppWindow *win; diff --git a/examples/application3/exampleappwin.c b/examples/application3/exampleappwin.c index 3925fa4689..5cc4275598 100644 --- a/examples/application3/exampleappwin.c +++ b/examples/application3/exampleappwin.c @@ -36,9 +36,9 @@ void example_app_window_open (ExampleAppWindow *win, GFile *file) { - gchar *basename; + char *basename; GtkWidget *scrolled, *view; - gchar *contents; + char *contents; gsize length; basename = g_file_get_basename (file); diff --git a/examples/application4/exampleapp.c b/examples/application4/exampleapp.c index 1376001f2c..89bad6103c 100644 --- a/examples/application4/exampleapp.c +++ b/examples/application4/exampleapp.c @@ -39,7 +39,7 @@ static GActionEntry app_entries[] = static void example_app_startup (GApplication *app) { - const gchar *quit_accels[2] = { "Q", NULL }; + const char *quit_accels[2] = { "Q", NULL }; G_APPLICATION_CLASS (example_app_parent_class)->startup (app); @@ -64,7 +64,7 @@ static void example_app_open (GApplication *app, GFile **files, int n_files, - const gchar *hint) + const char *hint) { GList *windows; ExampleAppWindow *win; diff --git a/examples/application4/exampleappwin.c b/examples/application4/exampleappwin.c index 97f8209cd3..ed03ab14e2 100644 --- a/examples/application4/exampleappwin.c +++ b/examples/application4/exampleappwin.c @@ -46,9 +46,9 @@ void example_app_window_open (ExampleAppWindow *win, GFile *file) { - gchar *basename; + char *basename; GtkWidget *scrolled, *view; - gchar *contents; + char *contents; gsize length; basename = g_file_get_basename (file); diff --git a/examples/application5/exampleapp.c b/examples/application5/exampleapp.c index 1376001f2c..89bad6103c 100644 --- a/examples/application5/exampleapp.c +++ b/examples/application5/exampleapp.c @@ -39,7 +39,7 @@ static GActionEntry app_entries[] = static void example_app_startup (GApplication *app) { - const gchar *quit_accels[2] = { "Q", NULL }; + const char *quit_accels[2] = { "Q", NULL }; G_APPLICATION_CLASS (example_app_parent_class)->startup (app); @@ -64,7 +64,7 @@ static void example_app_open (GApplication *app, GFile **files, int n_files, - const gchar *hint) + const char *hint) { GList *windows; ExampleAppWindow *win; diff --git a/examples/application5/exampleappwin.c b/examples/application5/exampleappwin.c index 2fac229a10..3f1fc33972 100644 --- a/examples/application5/exampleappwin.c +++ b/examples/application5/exampleappwin.c @@ -66,9 +66,9 @@ void example_app_window_open (ExampleAppWindow *win, GFile *file) { - gchar *basename; + char *basename; GtkWidget *scrolled, *view; - gchar *contents; + char *contents; gsize length; GtkTextBuffer *buffer; GtkTextTag *tag; diff --git a/examples/application6/exampleapp.c b/examples/application6/exampleapp.c index 89389fb52d..62607e40ae 100644 --- a/examples/application6/exampleapp.c +++ b/examples/application6/exampleapp.c @@ -46,7 +46,7 @@ static GActionEntry app_entries[] = static void example_app_startup (GApplication *app) { - const gchar *quit_accels[2] = { "Q", NULL }; + const char *quit_accels[2] = { "Q", NULL }; G_APPLICATION_CLASS (example_app_parent_class)->startup (app); @@ -71,7 +71,7 @@ static void example_app_open (GApplication *app, GFile **files, int n_files, - const gchar *hint) + const char *hint) { GList *windows; ExampleAppWindow *win; diff --git a/examples/application6/exampleappwin.c b/examples/application6/exampleappwin.c index 5eacf3d04c..794646e477 100644 --- a/examples/application6/exampleappwin.c +++ b/examples/application6/exampleappwin.c @@ -67,9 +67,9 @@ void example_app_window_open (ExampleAppWindow *win, GFile *file) { - gchar *basename; + char *basename; GtkWidget *scrolled, *view; - gchar *contents; + char *contents; gsize length; GtkTextBuffer *buffer; GtkTextTag *tag; diff --git a/examples/application7/exampleapp.c b/examples/application7/exampleapp.c index 89389fb52d..62607e40ae 100644 --- a/examples/application7/exampleapp.c +++ b/examples/application7/exampleapp.c @@ -46,7 +46,7 @@ static GActionEntry app_entries[] = static void example_app_startup (GApplication *app) { - const gchar *quit_accels[2] = { "Q", NULL }; + const char *quit_accels[2] = { "Q", NULL }; G_APPLICATION_CLASS (example_app_parent_class)->startup (app); @@ -71,7 +71,7 @@ static void example_app_open (GApplication *app, GFile **files, int n_files, - const gchar *hint) + const char *hint) { GList *windows; ExampleAppWindow *win; diff --git a/examples/application7/exampleappwin.c b/examples/application7/exampleappwin.c index 67db00d573..dad967a940 100644 --- a/examples/application7/exampleappwin.c +++ b/examples/application7/exampleappwin.c @@ -20,7 +20,7 @@ static void search_text_changed (GtkEntry *entry, ExampleAppWindow *win) { - const gchar *text; + const char *text; GtkWidget *tab; GtkWidget *view; GtkTextBuffer *buffer; @@ -120,9 +120,9 @@ void example_app_window_open (ExampleAppWindow *win, GFile *file) { - gchar *basename; + char *basename; GtkWidget *scrolled, *view; - gchar *contents; + char *contents; gsize length; GtkTextBuffer *buffer; GtkTextTag *tag; diff --git a/examples/application8/exampleapp.c b/examples/application8/exampleapp.c index 89389fb52d..62607e40ae 100644 --- a/examples/application8/exampleapp.c +++ b/examples/application8/exampleapp.c @@ -46,7 +46,7 @@ static GActionEntry app_entries[] = static void example_app_startup (GApplication *app) { - const gchar *quit_accels[2] = { "Q", NULL }; + const char *quit_accels[2] = { "Q", NULL }; G_APPLICATION_CLASS (example_app_parent_class)->startup (app); @@ -71,7 +71,7 @@ static void example_app_open (GApplication *app, GFile **files, int n_files, - const gchar *hint) + const char *hint) { GList *windows; ExampleAppWindow *win; diff --git a/examples/application8/exampleappwin.c b/examples/application8/exampleappwin.c index 9a5eb2818c..a598de13e0 100644 --- a/examples/application8/exampleappwin.c +++ b/examples/application8/exampleappwin.c @@ -23,7 +23,7 @@ static void search_text_changed (GtkEntry *entry, ExampleAppWindow *win) { - const gchar *text; + const char *text; GtkWidget *tab; GtkWidget *view; GtkTextBuffer *buffer; @@ -53,7 +53,7 @@ static void find_word (GtkButton *button, ExampleAppWindow *win) { - const gchar *word; + const char *word; word = gtk_button_get_label (button); gtk_editable_set_text (GTK_EDITABLE (win->searchentry), word); @@ -67,7 +67,7 @@ update_words (ExampleAppWindow *win) GtkWidget *tab, *view, *row; GtkTextBuffer *buffer; GtkTextIter start, end; - gchar *word, *key; + char *word, *key; GtkWidget *child; tab = gtk_stack_get_visible_child (GTK_STACK (win->stack)); @@ -212,9 +212,9 @@ void example_app_window_open (ExampleAppWindow *win, GFile *file) { - gchar *basename; + char *basename; GtkWidget *scrolled, *view; - gchar *contents; + char *contents; gsize length; GtkTextBuffer *buffer; GtkTextTag *tag; diff --git a/examples/application9/exampleapp.c b/examples/application9/exampleapp.c index 89389fb52d..62607e40ae 100644 --- a/examples/application9/exampleapp.c +++ b/examples/application9/exampleapp.c @@ -46,7 +46,7 @@ static GActionEntry app_entries[] = static void example_app_startup (GApplication *app) { - const gchar *quit_accels[2] = { "Q", NULL }; + const char *quit_accels[2] = { "Q", NULL }; G_APPLICATION_CLASS (example_app_parent_class)->startup (app); @@ -71,7 +71,7 @@ static void example_app_open (GApplication *app, GFile **files, int n_files, - const gchar *hint) + const char *hint) { GList *windows; ExampleAppWindow *win; diff --git a/examples/application9/exampleappwin.c b/examples/application9/exampleappwin.c index 30c281ae93..a775f5b08a 100644 --- a/examples/application9/exampleappwin.c +++ b/examples/application9/exampleappwin.c @@ -25,7 +25,7 @@ static void search_text_changed (GtkEntry *entry, ExampleAppWindow *win) { - const gchar *text; + const char *text; GtkWidget *tab; GtkWidget *view; GtkTextBuffer *buffer; @@ -55,7 +55,7 @@ static void find_word (GtkButton *button, ExampleAppWindow *win) { - const gchar *word; + const char *word; word = gtk_button_get_label (button); gtk_editable_set_text (GTK_EDITABLE (win->searchentry), word); @@ -69,7 +69,7 @@ update_words (ExampleAppWindow *win) GtkWidget *tab, *view, *row; GtkTextBuffer *buffer; GtkTextIter start, end; - gchar *word, *key; + char *word, *key; GtkWidget *child; tab = gtk_stack_get_visible_child (GTK_STACK (win->stack)); @@ -121,7 +121,7 @@ update_lines (ExampleAppWindow *win) GtkWidget *tab, *view; GtkTextBuffer *buffer; int count; - gchar *lines; + char *lines; tab = gtk_stack_get_visible_child (GTK_STACK (win->stack)); @@ -246,9 +246,9 @@ void example_app_window_open (ExampleAppWindow *win, GFile *file) { - gchar *basename; + char *basename; GtkWidget *scrolled, *view; - gchar *contents; + char *contents; gsize length; GtkTextBuffer *buffer; GtkTextTag *tag; diff --git a/examples/bp/bloatpad.c b/examples/bp/bloatpad.c index 18fc9ae1ef..b29b639241 100644 --- a/examples/bp/bloatpad.c +++ b/examples/bp/bloatpad.c @@ -77,7 +77,7 @@ change_justify_state (GSimpleAction *action, gpointer user_data) { GtkTextView *text = g_object_get_data (user_data, "bloatpad-text"); - const gchar *str; + const char *str; str = g_variant_get_string (state, NULL); @@ -265,7 +265,7 @@ new_window (GApplication *app, if (file != NULL) { - gchar *contents; + char *contents; gsize length; if (g_file_load_contents (file, NULL, &contents, &length, NULL, NULL)) @@ -294,7 +294,7 @@ static void bloat_pad_open (GApplication *application, GFile **files, int n_files, - const gchar *hint) + const char *hint) { int i; @@ -345,9 +345,9 @@ combo_changed (GtkComboBox *combo, gpointer user_data) { GtkEntry *entry = g_object_get_data (user_data, "entry"); - const gchar *action; - gchar **accels; - gchar *str; + const char *action; + char **accels; + char *str; action = gtk_combo_box_get_active_id (combo); @@ -368,9 +368,9 @@ response (GtkDialog *dialog, { GtkEntry *entry = g_object_get_data (user_data, "entry"); GtkComboBox *combo = g_object_get_data (user_data, "combo"); - const gchar *action; - const gchar *str; - gchar **accels; + const char *action; + const char *str; + char **accels; if (response_id == GTK_RESPONSE_CLOSE) { @@ -386,7 +386,7 @@ response (GtkDialog *dialog, str = gtk_editable_get_text (GTK_EDITABLE (entry)); accels = g_strsplit (str, ",", 0); - gtk_application_set_accels_for_action (gtk_window_get_application (user_data), action, (const gchar **) accels); + gtk_application_set_accels_for_action (gtk_window_get_application (user_data), action, (const char **) accels); g_strfreev (accels); } @@ -398,7 +398,7 @@ edit_accels (GSimpleAction *action, GtkApplication *app = user_data; GtkWidget *combo; GtkWidget *entry; - gchar **actions; + char **actions; GtkWidget *dialog; int i; @@ -426,7 +426,7 @@ update_time (gpointer user_data) { BloatPad *bloatpad = user_data; GDateTime *now; - gchar *time; + char *time; while (g_menu_model_get_n_items (G_MENU_MODEL (bloatpad->time))) g_menu_remove (bloatpad->time, 0); @@ -481,14 +481,14 @@ static GActionEntry app_entries[] = { static void dump_accels (GtkApplication *app) { - gchar **actions; + char **actions; int i; actions = gtk_application_list_action_descriptions (app); for (i = 0; actions[i]; i++) { - gchar **accels; - gchar *str; + char **accels; + char *str; accels = gtk_application_get_accels_for_action (app, actions[i]); @@ -514,8 +514,8 @@ bloat_pad_startup (GApplication *application) GFile *file; int i; struct { - const gchar *action_and_target; - const gchar *accelerators[2]; + const char *action_and_target; + const char *accelerators[2]; } accels[] = { { "app.new", { "n", NULL } }, { "app.quit", { "q", NULL } }, @@ -592,7 +592,7 @@ bloat_pad_startup (GApplication *application) g_object_unref (item); g_object_unref (icon); - const gchar *new_accels[] = { "n", "t", NULL }; + const char *new_accels[] = { "n", "t", NULL }; gtk_application_set_accels_for_action (GTK_APPLICATION (application), "app.new", new_accels); dump_accels (GTK_APPLICATION (application)); @@ -657,7 +657,7 @@ main (int argc, char **argv) { BloatPad *bloat_pad; int status; - const gchar *accels[] = { "F11", NULL }; + const char *accels[] = { "F11", NULL }; bloat_pad = bloat_pad_new (); diff --git a/examples/plugman.c b/examples/plugman.c index d6add253f7..d6962c6ce5 100644 --- a/examples/plugman.c +++ b/examples/plugman.c @@ -99,7 +99,7 @@ new_window (GApplication *app, if (file != NULL) { - gchar *contents; + char *contents; gsize length; if (g_file_load_contents (file, NULL, &contents, &length, NULL, NULL)) @@ -125,7 +125,7 @@ static void plug_man_open (GApplication *application, GFile **files, int n_files, - const gchar *hint) + const char *hint) { int i; @@ -184,7 +184,7 @@ static gboolean is_red_plugin_enabled; static gboolean is_black_plugin_enabled; static gboolean -plugin_enabled (const gchar *name) +plugin_enabled (const char *name) { if (g_strcmp0 (name, "red") == 0) return is_red_plugin_enabled; @@ -228,7 +228,7 @@ plugin_action (GAction *action, } static void -enable_plugin (const gchar *name) +enable_plugin (const char *name) { GMenuModel *plugin_menu; GAction *action; @@ -246,8 +246,8 @@ enable_plugin (const gchar *name) { GMenu *section; GMenuItem *item; - gchar *label; - gchar *action_name; + char *label; + char *action_name; section = g_menu_new (); label = g_strdup_printf ("Turn text %s", name); @@ -272,7 +272,7 @@ enable_plugin (const gchar *name) } static void -disable_plugin (const gchar *name) +disable_plugin (const char *name) { GMenuModel *plugin_menu; @@ -285,7 +285,7 @@ disable_plugin (const gchar *name) for (i = 0; i < g_menu_model_get_n_items (plugin_menu); i++) { - gchar *id; + char *id; if (g_menu_model_get_item_attribute (plugin_menu, i, "id", "s", &id)) { if (g_strcmp0 (id, name) == 0) @@ -311,7 +311,7 @@ disable_plugin (const gchar *name) static void enable_or_disable_plugin (GtkToggleButton *button, - const gchar *name) + const char *name) { if (plugin_enabled (name)) disable_plugin (name); @@ -498,7 +498,7 @@ main (int argc, char **argv) { PlugMan *plug_man; int status; - const gchar *accels[] = { "F11", NULL }; + const char *accels[] = { "F11", NULL }; plug_man = plug_man_new (); gtk_application_set_accels_for_action (GTK_APPLICATION (plug_man), diff --git a/examples/search-bar.c b/examples/search-bar.c index d554529413..f60e1e8cfe 100644 --- a/examples/search-bar.c +++ b/examples/search-bar.c @@ -34,7 +34,7 @@ activate_cb (GtkApplication *app, int main (int argc, - gchar *argv[]) + char *argv[]) { GtkApplication *app; diff --git a/examples/sunny.c b/examples/sunny.c index 9cfd8bcbc0..fafc1f2a1b 100644 --- a/examples/sunny.c +++ b/examples/sunny.c @@ -30,7 +30,7 @@ new_window (GApplication *app, if (file != NULL) { - gchar *contents; + char *contents; gsize length; if (g_file_load_contents (file, NULL, &contents, &length, NULL, NULL)) @@ -56,7 +56,7 @@ static void open (GApplication *application, GFile **files, int n_files, - const gchar *hint) + const char *hint) { int i; diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c index df6d25c066..1256e1a1f6 100644 --- a/gdk/broadway/broadway-server.c +++ b/gdk/broadway/broadway-server.c @@ -1060,8 +1060,8 @@ send_error (HttpRequest *request, #define SEC_WEB_SOCKET_KEY_MAGIC "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" /* 'x3JJHMbDL1EzLkh9GBhXDw==' generates 'HSmrc0sMlYUkAGmm5OPpG2HaGWk=' */ -static gchar * -generate_handshake_response_wsietf_v7 (const gchar *key) +static char * +generate_handshake_response_wsietf_v7 (const char *key) { gsize digest_len = 20; guchar digest[20]; diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c index fd82a1810e..af1fd47ce4 100644 --- a/gdk/broadway/gdkdisplay-broadway.c +++ b/gdk/broadway/gdkdisplay-broadway.c @@ -175,7 +175,7 @@ create_touchscreen (GdkDisplay *display) } GdkDisplay * -_gdk_broadway_display_open (const gchar *display_name) +_gdk_broadway_display_open (const char *display_name) { GdkDisplay *display; GdkBroadwayDisplay *broadway_display; @@ -225,12 +225,12 @@ _gdk_broadway_display_open (const gchar *display_name) return display; } -static const gchar * +static const char * gdk_broadway_display_get_name (GdkDisplay *display) { g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); - return (gchar *) "Broadway"; + return (char *) "Broadway"; } static void @@ -311,7 +311,7 @@ gdk_broadway_display_finalize (GObject *object) static void gdk_broadway_display_notify_startup_complete (GdkDisplay *display, - const gchar *startup_id) + const char *startup_id) { } diff --git a/gdk/broadway/gdkprivate-broadway.h b/gdk/broadway/gdkprivate-broadway.h index 98d02958c8..78cab28440 100644 --- a/gdk/broadway/gdkprivate-broadway.h +++ b/gdk/broadway/gdkprivate-broadway.h @@ -89,10 +89,10 @@ void _gdk_broadway_events_got_input (GdkDisplay *display, BroadwayInputMsg *message); void _gdk_broadway_display_init_root_window (GdkDisplay *display); -GdkDisplay * _gdk_broadway_display_open (const gchar *display_name); +GdkDisplay * _gdk_broadway_display_open (const char *display_name); void _gdk_broadway_display_queue_events (GdkDisplay *display); GdkCursor*_gdk_broadway_display_get_cursor_for_name (GdkDisplay *display, - const gchar *name); + const char *name); GdkCursor *_gdk_broadway_display_get_cursor_for_texture (GdkDisplay *display, GdkTexture *texture, int x, diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c index 8d7fb8d954..5b5abdb6b3 100644 --- a/gdk/broadway/gdksurface-broadway.c +++ b/gdk/broadway/gdksurface-broadway.c @@ -660,13 +660,13 @@ gdk_broadway_surface_set_geometry_hints (GdkSurface *surface, static void gdk_broadway_surface_set_title (GdkSurface *surface, - const gchar *title) + const char *title) { } static void gdk_broadway_surface_set_startup_id (GdkSurface *surface, - const gchar *startup_id) + const char *startup_id) { } diff --git a/gdk/gdk-private.h b/gdk/gdk-private.h index 100c54adce..fb058c0f39 100644 --- a/gdk/gdk-private.h +++ b/gdk/gdk-private.h @@ -30,7 +30,7 @@ void gdk_display_set_cursor_theme (GdkDisplay *display, gboolean gdk_running_in_sandbox (void); gboolean gdk_should_use_portal (void); -const gchar * gdk_get_startup_notification_id (void); +const char * gdk_get_startup_notification_id (void); PangoDirection gdk_unichar_direction (gunichar ch); PangoDirection gdk_find_base_dir (const char *text, diff --git a/gdk/gdk.c b/gdk/gdk.c index bb6c1fc457..c874d15260 100644 --- a/gdk/gdk.c +++ b/gdk/gdk.c @@ -163,7 +163,7 @@ static const GdkDebugKey gdk_debug_keys[] = { G_DEFINE_CONSTRUCTOR(stash_desktop_startup_notification_id) #endif -static gchar *startup_notification_id = NULL; +static char *startup_notification_id = NULL; static void stash_desktop_startup_notification_id (void) @@ -209,8 +209,8 @@ gdk_parse_debug_var (const char *variable, guint i; guint result = 0; const char *string; - const gchar *p; - const gchar *q; + const char *p; + const char *q; gboolean invert; gboolean help; @@ -352,7 +352,7 @@ gdk_display_open_default (void) * Returns: (nullable) (transfer none): the original value of the * DESKTOP_STARTUP_ID environment variable, or %NULL. */ -const gchar * +const char * gdk_get_startup_notification_id (void) { return startup_notification_id; @@ -402,11 +402,11 @@ gdk_unichar_direction (gunichar ch) } PangoDirection -gdk_find_base_dir (const gchar *text, +gdk_find_base_dir (const char *text, int length) { PangoDirection dir = PANGO_DIRECTION_NEUTRAL; - const gchar *p; + const char *p; g_return_val_if_fail (text != NULL || length == 0, PANGO_DIRECTION_NEUTRAL); diff --git a/gdk/gdkapplaunchcontext.c b/gdk/gdkapplaunchcontext.c index a466209939..b34cdaad80 100644 --- a/gdk/gdkapplaunchcontext.c +++ b/gdk/gdkapplaunchcontext.c @@ -60,14 +60,14 @@ */ static void gdk_app_launch_context_finalize (GObject *object); -static gchar * gdk_app_launch_context_get_display_name (GAppLaunchContext *context, +static char * gdk_app_launch_context_get_display_name (GAppLaunchContext *context, GAppInfo *info, GList *files); -static gchar * gdk_app_launch_context_get_startup_notify_id (GAppLaunchContext *context, +static char * gdk_app_launch_context_get_startup_notify_id (GAppLaunchContext *context, GAppInfo *info, GList *files); static void gdk_app_launch_context_launch_failed (GAppLaunchContext *context, - const gchar *startup_notify_id); + const char *startup_notify_id); enum @@ -157,7 +157,7 @@ gdk_app_launch_context_finalize (GObject *object) G_OBJECT_CLASS (gdk_app_launch_context_parent_class)->finalize (object); } -static gchar * +static char * gdk_app_launch_context_get_display_name (GAppLaunchContext *context, GAppInfo *info, GList *files) @@ -298,6 +298,6 @@ gdk_app_launch_context_get_startup_notify_id (GAppLaunchContext *context, static void gdk_app_launch_context_launch_failed (GAppLaunchContext *context, - const gchar *startup_notify_id) + const char *startup_notify_id) { } diff --git a/gdk/gdkclipboard.c b/gdk/gdkclipboard.c index f4c5b91637..b408a68e23 100644 --- a/gdk/gdkclipboard.c +++ b/gdk/gdkclipboard.c @@ -1103,7 +1103,7 @@ gdk_clipboard_write_async (GdkClipboard *clipboard, return; } - mime_formats = gdk_content_formats_new ((const gchar *[2]) { mime_type, NULL }, 1); + mime_formats = gdk_content_formats_new ((const char *[2]) { mime_type, NULL }, 1); mime_formats = gdk_content_formats_union_serialize_gtypes (mime_formats); gtype = gdk_content_formats_match_gtype (formats, mime_formats); if (gtype != G_TYPE_INVALID) diff --git a/gdk/gdkcontentdeserializer.c b/gdk/gdkcontentdeserializer.c index 6a56f0187f..b372dc4847 100644 --- a/gdk/gdkcontentdeserializer.c +++ b/gdk/gdkcontentdeserializer.c @@ -835,7 +835,7 @@ init (void) for (f = formats; f; f = f->next) { GdkPixbufFormat *fmt = f->data; - gchar *name; + char *name; name = gdk_pixbuf_format_get_name (fmt); if (g_str_equal (name, "png")) @@ -854,7 +854,7 @@ init (void) for (f = formats; f; f = f->next) { GdkPixbufFormat *fmt = f->data; - gchar **mimes, **m; + char **mimes, **m; mimes = gdk_pixbuf_format_get_mime_types (fmt); for (m = mimes; *m; m++) diff --git a/gdk/gdkcontentserializer.c b/gdk/gdkcontentserializer.c index d9151527ff..aa22980f71 100644 --- a/gdk/gdkcontentserializer.c +++ b/gdk/gdkcontentserializer.c @@ -864,7 +864,7 @@ init (void) for (f = formats; f; f = f->next) { GdkPixbufFormat *fmt = f->data; - gchar *name; + char *name; name = gdk_pixbuf_format_get_name (fmt); if (g_str_equal (name, "png")) @@ -883,7 +883,7 @@ init (void) for (f = formats; f; f = f->next) { GdkPixbufFormat *fmt = f->data; - gchar **mimes, **m; + char **mimes, **m; if (!gdk_pixbuf_format_is_writable (fmt)) continue; diff --git a/gdk/gdkcursor.c b/gdk/gdkcursor.c index be3dca2e98..354d3e2cd9 100644 --- a/gdk/gdkcursor.c +++ b/gdk/gdkcursor.c @@ -319,7 +319,7 @@ gdk_cursor_equal (gconstpointer a, * cursor with the given name */ GdkCursor* -gdk_cursor_new_from_name (const gchar *name, +gdk_cursor_new_from_name (const char *name, GdkCursor *fallback) { g_return_val_if_fail (name != NULL, NULL); diff --git a/gdk/gdkcursor.h b/gdk/gdkcursor.h index d08baa511a..a2f161bd58 100644 --- a/gdk/gdkcursor.h +++ b/gdk/gdkcursor.h @@ -50,7 +50,7 @@ GdkCursor* gdk_cursor_new_from_texture (GdkTexture *texture, int hotspot_y, GdkCursor *fallback); GDK_AVAILABLE_IN_ALL -GdkCursor* gdk_cursor_new_from_name (const gchar *name, +GdkCursor* gdk_cursor_new_from_name (const char *name, GdkCursor *fallback); GDK_AVAILABLE_IN_ALL diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c index 5cddd20c78..ae6cd79e6b 100644 --- a/gdk/gdkdevice.c +++ b/gdk/gdkdevice.c @@ -634,7 +634,7 @@ gdk_device_get_surface_at_position (GdkDevice *device, * * Returns: a name **/ -const gchar * +const char * gdk_device_get_name (GdkDevice *device) { g_return_val_if_fail (GDK_IS_DEVICE (device), NULL); @@ -1297,10 +1297,10 @@ _gdk_device_surface_at_position (GdkDevice *device, * static GSettings * * get_device_settings (GdkDevice *device) * { - * const gchar *vendor, *product; + * const char *vendor, *product; * GSettings *settings; * GdkDevice *device; - * gchar *path; + * char *path; * * vendor = gdk_device_get_vendor_id (device); * product = gdk_device_get_product_id (device); @@ -1315,7 +1315,7 @@ _gdk_device_surface_at_position (GdkDevice *device, * * Returns: (nullable): the vendor ID, or %NULL */ -const gchar * +const char * gdk_device_get_vendor_id (GdkDevice *device) { g_return_val_if_fail (GDK_IS_DEVICE (device), NULL); @@ -1334,7 +1334,7 @@ gdk_device_get_vendor_id (GdkDevice *device) * * Returns: (nullable): the product ID, or %NULL */ -const gchar * +const char * gdk_device_get_product_id (GdkDevice *device) { g_return_val_if_fail (GDK_IS_DEVICE (device), NULL); diff --git a/gdk/gdkdevice.h b/gdk/gdkdevice.h index caa557c266..09286c6119 100644 --- a/gdk/gdkdevice.h +++ b/gdk/gdkdevice.h @@ -100,7 +100,7 @@ GDK_AVAILABLE_IN_ALL GType gdk_device_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -const gchar * gdk_device_get_name (GdkDevice *device); +const char * gdk_device_get_name (GdkDevice *device); GDK_AVAILABLE_IN_ALL gboolean gdk_device_get_has_cursor (GdkDevice *device); @@ -142,9 +142,9 @@ GDK_AVAILABLE_IN_ALL GdkDeviceType gdk_device_get_device_type (GdkDevice *device); GDK_AVAILABLE_IN_ALL -const gchar *gdk_device_get_vendor_id (GdkDevice *device); +const char *gdk_device_get_vendor_id (GdkDevice *device); GDK_AVAILABLE_IN_ALL -const gchar *gdk_device_get_product_id (GdkDevice *device); +const char *gdk_device_get_product_id (GdkDevice *device); GDK_AVAILABLE_IN_ALL GdkSeat *gdk_device_get_seat (GdkDevice *device); diff --git a/gdk/gdkdeviceprivate.h b/gdk/gdkdeviceprivate.h index 3c3140691a..1bd00c4241 100644 --- a/gdk/gdkdeviceprivate.h +++ b/gdk/gdkdeviceprivate.h @@ -36,7 +36,7 @@ struct _GdkDevice { GObject parent_instance; - gchar *name; + char *name; GdkInputSource source; gboolean has_cursor; GdkAxisFlags axis_flags; @@ -50,8 +50,8 @@ struct _GdkDevice GArray *axes; guint num_touches; - gchar *vendor_id; - gchar *product_id; + char *vendor_id; + char *product_id; GdkSeat *seat; GdkDeviceTool *last_tool; diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c index b06f412caf..5651bd1300 100644 --- a/gdk/gdkdisplay.c +++ b/gdk/gdkdisplay.c @@ -931,7 +931,7 @@ gdk_display_device_is_grabbed (GdkDisplay *display, * Returns: a string representing the display name. This string is owned * by GDK and should not be modified or freed. */ -const gchar * +const char * gdk_display_get_name (GdkDisplay *display) { g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); @@ -1127,7 +1127,7 @@ gdk_display_get_app_launch_context (GdkDisplay *display) * display could not be opened */ GdkDisplay * -gdk_display_open (const gchar *display_name) +gdk_display_open (const char *display_name) { return gdk_display_manager_open_display (gdk_display_manager_get (), display_name); @@ -1172,7 +1172,7 @@ _gdk_display_get_next_serial (GdkDisplay *display) */ void gdk_display_notify_startup_complete (GdkDisplay *display, - const gchar *startup_id) + const char *startup_id) { g_return_if_fail (GDK_IS_DISPLAY (display)); @@ -1188,7 +1188,7 @@ gdk_display_notify_startup_complete (GdkDisplay *display, * * Returns: the startup notification ID for @display, or %NULL */ -const gchar * +const char * gdk_display_get_startup_notification_id (GdkDisplay *display) { g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); diff --git a/gdk/gdkdisplay.h b/gdk/gdkdisplay.h index 217fbb6b57..de39f54271 100644 --- a/gdk/gdkdisplay.h +++ b/gdk/gdkdisplay.h @@ -41,10 +41,10 @@ G_BEGIN_DECLS GDK_AVAILABLE_IN_ALL GType gdk_display_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GdkDisplay *gdk_display_open (const gchar *display_name); +GdkDisplay *gdk_display_open (const char *display_name); GDK_AVAILABLE_IN_ALL -const gchar * gdk_display_get_name (GdkDisplay *display); +const char * gdk_display_get_name (GdkDisplay *display); GDK_AVAILABLE_IN_ALL gboolean gdk_display_device_is_grabbed (GdkDisplay *display, @@ -81,9 +81,9 @@ GdkClipboard * gdk_display_get_primary_clipboard (GdkDisplay GDK_AVAILABLE_IN_ALL void gdk_display_notify_startup_complete (GdkDisplay *display, - const gchar *startup_id); + const char *startup_id); GDK_AVAILABLE_IN_ALL -const gchar * gdk_display_get_startup_notification_id (GdkDisplay *display); +const char * gdk_display_get_startup_notification_id (GdkDisplay *display); GDK_AVAILABLE_IN_ALL GdkAppLaunchContext *gdk_display_get_app_launch_context (GdkDisplay *display); diff --git a/gdk/gdkdisplaymanager.c b/gdk/gdkdisplaymanager.c index db7dfa19ea..bfd5bb8b3c 100644 --- a/gdk/gdkdisplaymanager.c +++ b/gdk/gdkdisplaymanager.c @@ -215,7 +215,7 @@ gdk_display_manager_get_property (GObject *object, } } -static const gchar *allowed_backends; +static const char *allowed_backends; /** * gdk_set_allowed_backends: @@ -250,7 +250,7 @@ static const gchar *allowed_backends; * in order to take effect. */ void -gdk_set_allowed_backends (const gchar *backends) +gdk_set_allowed_backends (const char *backends) { allowed_backends = g_strdup (backends); } @@ -389,11 +389,11 @@ gdk_display_manager_list_displays (GdkDisplayManager *manager) */ GdkDisplay * gdk_display_manager_open_display (GdkDisplayManager *manager, - const gchar *name) + const char *name) { - const gchar *backend_list; + const char *backend_list; GdkDisplay *display; - gchar **backends; + char **backends; int i, j; gboolean allow_any; @@ -419,7 +419,7 @@ gdk_display_manager_open_display (GdkDisplayManager *manager, for (i = 0; display == NULL && backends[i] != NULL; i++) { - const gchar *backend = backends[i]; + const char *backend = backends[i]; gboolean any = g_str_equal (backend, "*"); if (!allow_any && !any && !strstr (allowed_backends, backend)) diff --git a/gdk/gdkdisplaymanager.h b/gdk/gdkdisplaymanager.h index 5e66d4145d..d7cbb649af 100644 --- a/gdk/gdkdisplaymanager.h +++ b/gdk/gdkdisplaymanager.h @@ -54,9 +54,9 @@ GDK_AVAILABLE_IN_ALL GSList * gdk_display_manager_list_displays (GdkDisplayManager *manager); GDK_AVAILABLE_IN_ALL GdkDisplay * gdk_display_manager_open_display (GdkDisplayManager *manager, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL -void gdk_set_allowed_backends (const gchar *backends); +void gdk_set_allowed_backends (const char *backends); G_END_DECLS diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h index 8a50d3cd3a..2ddc6d81cf 100644 --- a/gdk/gdkdisplayprivate.h +++ b/gdk/gdkdisplayprivate.h @@ -116,7 +116,7 @@ struct _GdkDisplayClass GType vk_context_type; /* type for GdkVulkanContext, must be set if vk_extension_name != NULL */ const char *vk_extension_name; /* Name of required windowing vulkan extension or %NULL (default) if Vulkan isn't supported */ - const gchar * (*get_name) (GdkDisplay *display); + const char * (*get_name) (GdkDisplay *display); void (*beep) (GdkDisplay *display); void (*sync) (GdkDisplay *display); void (*flush) (GdkDisplay *display); @@ -130,8 +130,8 @@ struct _GdkDisplayClass gulong (*get_next_serial) (GdkDisplay *display); void (*notify_startup_complete) (GdkDisplay *display, - const gchar *startup_id); - const gchar * (*get_startup_notification_id) (GdkDisplay *display); + const char *startup_id); + const char * (*get_startup_notification_id) (GdkDisplay *display); void (*event_data_copy) (GdkDisplay *display, GdkEvent *event, diff --git a/gdk/gdkdrag.c b/gdk/gdkdrag.c index c1eac41ac4..01314f9602 100644 --- a/gdk/gdkdrag.c +++ b/gdk/gdkdrag.c @@ -37,7 +37,7 @@ static struct { GdkDragAction action; - const gchar *name; + const char *name; GdkCursor *cursor; } drag_cursors[] = { { GDK_ACTION_ASK, "dnd-ask", NULL }, @@ -604,7 +604,7 @@ gdk_drag_write_async (GdkDrag *drag, return; } - mime_formats = gdk_content_formats_new ((const gchar *[2]) { mime_type, NULL }, 1); + mime_formats = gdk_content_formats_new ((const char *[2]) { mime_type, NULL }, 1); mime_formats = gdk_content_formats_union_serialize_gtypes (mime_formats); gtype = gdk_content_formats_match_gtype (formats, mime_formats); if (gtype != G_TYPE_INVALID) diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index 264c62f06c..2248b94208 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -120,7 +120,7 @@ value_event_collect_value (GValue *value, return NULL; } -static gchar * +static char * value_event_lcopy_value (const GValue *value, guint n_collect_values, GTypeCValue *collect_values, diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c index 5ab960335b..73523b88e1 100644 --- a/gdk/gdkglcontext.c +++ b/gdk/gdkglcontext.c @@ -455,7 +455,7 @@ gdk_gl_context_push_debug_group_printf (GdkGLContext *context, ...) { GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context); - gchar *message; + char *message; va_list args; if (priv->use_khr_debug) @@ -501,7 +501,7 @@ gdk_gl_context_label_object_printf (GdkGLContext *context, ...) { GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context); - gchar *message; + char *message; va_list args; if (priv->use_khr_debug) diff --git a/gdk/gdkglcontextprivate.h b/gdk/gdkglcontextprivate.h index c7acccba43..6d3d721eee 100644 --- a/gdk/gdkglcontextprivate.h +++ b/gdk/gdkglcontextprivate.h @@ -93,7 +93,7 @@ gboolean gdk_gl_context_has_unpack_subimage (GdkGLContext void gdk_gl_context_push_debug_group (GdkGLContext *context, const char *message); void gdk_gl_context_push_debug_group_printf (GdkGLContext *context, - const gchar *format, + const char *format, ...) G_GNUC_PRINTF (2, 3); void gdk_gl_context_pop_debug_group (GdkGLContext *context); void gdk_gl_context_label_object (GdkGLContext *context, diff --git a/gdk/gdkkeynames.c b/gdk/gdkkeynames.c index f8dfc1e5c0..2672d9b83b 100644 --- a/gdk/gdkkeynames.c +++ b/gdk/gdkkeynames.c @@ -43,10 +43,10 @@ gdk_keys_keyval_compare (const void *pkey, const void *pbase) return (*(int *) pkey) - ((gdk_key *) pbase)->keyval; } -static gchar* +static char * _gdk_keyval_name (guint keyval) { - static gchar buf[100]; + static char buf[100]; gdk_key *found; /* Check for directly encoded 24-bit UCS characters: */ @@ -66,7 +66,7 @@ _gdk_keyval_name (guint keyval) ((found - 1)->keyval == keyval)) found--; - return (gchar *) (keynames + found->offset); + return (char *) (keynames + found->offset); } else if (keyval != 0) { @@ -85,7 +85,7 @@ gdk_keys_name_compare (const void *pkey, const void *pbase) } static guint -_gdk_keyval_from_name (const gchar *keyval_name) +_gdk_keyval_from_name (const char *keyval_name) { gdk_key *found; diff --git a/gdk/gdkkeys.c b/gdk/gdkkeys.c index ac85d1da74..0c74dd64f4 100644 --- a/gdk/gdkkeys.c +++ b/gdk/gdkkeys.c @@ -757,7 +757,7 @@ gdk_keymap_translate_keyboard_state (GdkKeymap *keymap, * of the key, or %NULL if @keyval is not a valid key. The string * should not be modified. */ -const gchar * +const char * gdk_keyval_name (guint keyval) { return _gdk_keyval_name (keyval); @@ -777,7 +777,7 @@ gdk_keyval_name (guint keyval) * if the key name is not a valid key */ guint -gdk_keyval_from_name (const gchar *keyval_name) +gdk_keyval_from_name (const char *keyval_name) { return _gdk_keyval_from_name (keyval_name); } diff --git a/gdk/gdkkeys.h b/gdk/gdkkeys.h index 8baef542c6..0f75a2affc 100644 --- a/gdk/gdkkeys.h +++ b/gdk/gdkkeys.h @@ -38,7 +38,7 @@ GDK_AVAILABLE_IN_ALL const char *gdk_keyval_name (guint keyval) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -guint gdk_keyval_from_name (const gchar *keyval_name); +guint gdk_keyval_from_name (const char *keyval_name); GDK_AVAILABLE_IN_ALL void gdk_keyval_convert_case (guint symbol, guint *lower, diff --git a/gdk/gdkprofiler.c b/gdk/gdkprofiler.c index 4617d9a7e3..e87fefbd50 100644 --- a/gdk/gdkprofiler.c +++ b/gdk/gdkprofiler.c @@ -55,7 +55,7 @@ gdk_profiler_start (int fd) if (fd == -1) { - gchar *filename; + char *filename; filename = g_strdup_printf ("gtk.%d.syscap", getpid ()); g_print ("Writing profiling data to %s\n", filename); diff --git a/gdk/gdkrgba.c b/gdk/gdkrgba.c index 4d6d46143c..80c4349572 100644 --- a/gdk/gdkrgba.c +++ b/gdk/gdkrgba.c @@ -130,8 +130,8 @@ gdk_rgba_is_opaque (const GdkRGBA *rgba) * rgb() or rgba() specification. */ static gboolean -parse_rgb_value (const gchar *str, - gchar **endp, +parse_rgb_value (const char *str, + char **endp, gdouble *number) { const char *p; @@ -183,12 +183,12 @@ parse_rgb_value (const gchar *str, */ gboolean gdk_rgba_parse (GdkRGBA *rgba, - const gchar *spec) + const char *spec) { gboolean has_alpha; gdouble r, g, b, a; - gchar *str = (gchar *) spec; - gchar *p; + char *str = (char *) spec; + char *p; g_return_val_if_fail (spec != NULL, FALSE); @@ -370,7 +370,7 @@ gdk_rgba_equal (gconstpointer p1, * * Returns: A newly allocated text string */ -gchar * +char * gdk_rgba_to_string (const GdkRGBA *rgba) { if (rgba->alpha > 0.999) @@ -382,7 +382,7 @@ gdk_rgba_to_string (const GdkRGBA *rgba) } else { - gchar alpha[G_ASCII_DTOSTR_BUF_SIZE]; + char alpha[G_ASCII_DTOSTR_BUF_SIZE]; g_ascii_formatd (alpha, G_ASCII_DTOSTR_BUF_SIZE, "%g", CLAMP (rgba->alpha, 0, 1)); diff --git a/gdk/gdkrgba.h b/gdk/gdkrgba.h index 7ba506fc89..3c9f05b23a 100644 --- a/gdk/gdkrgba.h +++ b/gdk/gdkrgba.h @@ -65,9 +65,9 @@ gboolean gdk_rgba_equal (gconstpointer p1, GDK_AVAILABLE_IN_ALL gboolean gdk_rgba_parse (GdkRGBA *rgba, - const gchar *spec); + const char *spec); GDK_AVAILABLE_IN_ALL -gchar * gdk_rgba_to_string (const GdkRGBA *rgba); +char * gdk_rgba_to_string (const GdkRGBA *rgba); G_END_DECLS diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index 9840034514..eb2776b164 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -2763,8 +2763,8 @@ add_event_mark (GdkEvent *event, gint64 time, guint64 duration) { - gchar *message = NULL; - const gchar *kind; + char *message = NULL; + const char *kind; GEnumClass *class; GEnumValue *value; GdkEventType event_type; diff --git a/gdk/gdkvulkancontext.c b/gdk/gdkvulkancontext.c index 34a9f1dae0..d4c36a7cd0 100644 --- a/gdk/gdkvulkancontext.c +++ b/gdk/gdkvulkancontext.c @@ -971,7 +971,7 @@ gdk_display_create_vulkan_device (GdkDisplay *display, 0, NULL, device_extensions->len, - (const gchar * const *) device_extensions->pdata + (const char * const *) device_extensions->pdata }, NULL, &display->vk_device) != VK_SUCCESS) diff --git a/gdk/macos/gdkmacoscursor.c b/gdk/macos/gdkmacoscursor.c index a6da5c922b..cf571a9a11 100644 --- a/gdk/macos/gdkmacoscursor.c +++ b/gdk/macos/gdkmacoscursor.c @@ -84,7 +84,7 @@ CUSTOM_CURSOR_CTOR(gdkZoomOutCursor, 43) @end struct CursorsByName { - const gchar *name; + const char *name; NSString *selector; }; diff --git a/gdk/macos/gdkmacosdisplay-private.h b/gdk/macos/gdkmacosdisplay-private.h index 9f3d55853b..7638f87be3 100644 --- a/gdk/macos/gdkmacosdisplay-private.h +++ b/gdk/macos/gdkmacosdisplay-private.h @@ -83,7 +83,7 @@ struct _GdkMacosDisplayClass }; -GdkDisplay *_gdk_macos_display_open (const gchar *display_name); +GdkDisplay *_gdk_macos_display_open (const char *display_name); int _gdk_macos_display_get_fd (GdkMacosDisplay *self); void _gdk_macos_display_queue_events (GdkMacosDisplay *self); void _gdk_macos_display_to_display_coords (GdkMacosDisplay *self, @@ -129,7 +129,7 @@ NSWindow *_gdk_macos_display_find_native_under_pointer (GdkMacosDisp int *x, int *y); gboolean _gdk_macos_display_get_setting (GdkMacosDisplay *self, - const gchar *setting, + const char *setting, GValue *value); void _gdk_macos_display_reload_settings (GdkMacosDisplay *self); void _gdk_macos_display_surface_resigned_main (GdkMacosDisplay *self, diff --git a/gdk/macos/gdkmacosdisplay-settings.c b/gdk/macos/gdkmacosdisplay-settings.c index cf3224b6db..e6714f0a14 100644 --- a/gdk/macos/gdkmacosdisplay-settings.c +++ b/gdk/macos/gdkmacosdisplay-settings.c @@ -96,7 +96,7 @@ _gdk_macos_settings_load (GdkMacosSettings *settings) gboolean _gdk_macos_display_get_setting (GdkMacosDisplay *self, - const gchar *setting, + const char *setting, GValue *value) { GDK_BEGIN_MACOS_ALLOC_POOL; diff --git a/gdk/macos/gdkmacosdisplay.c b/gdk/macos/gdkmacosdisplay.c index 800696eb09..13d7dc8d1b 100644 --- a/gdk/macos/gdkmacosdisplay.c +++ b/gdk/macos/gdkmacosdisplay.c @@ -94,7 +94,7 @@ get_monitor (GdkMacosDisplay *self, static gboolean gdk_macos_display_get_setting (GdkDisplay *display, - const gchar *setting, + const char *setting, GValue *value) { return _gdk_macos_display_get_setting (GDK_MACOS_DISPLAY (display), setting, value); @@ -343,7 +343,7 @@ gdk_macos_display_load_display_link (GdkMacosDisplay *self) g_source_attach (self->frame_source, NULL); } -static const gchar * +static const char * gdk_macos_display_get_name (GdkDisplay *display) { return GDK_MACOS_DISPLAY (display)->name; @@ -382,7 +382,7 @@ gdk_macos_display_has_pending (GdkDisplay *display) static void gdk_macos_display_notify_startup_complete (GdkDisplay *display, - const gchar *startup_notification_id) + const char *startup_notification_id) { /* Not Supported */ } @@ -677,7 +677,7 @@ gdk_macos_display_init (GdkMacosDisplay *self) } GdkDisplay * -_gdk_macos_display_open (const gchar *display_name) +_gdk_macos_display_open (const char *display_name) { static GdkMacosDisplay *self; ProcessSerialNumber psn = { 0, kCurrentProcess }; diff --git a/gdk/macos/gdkmacosmonitor.c b/gdk/macos/gdkmacosmonitor.c index ade7f0bf42..91a85a0dfa 100644 --- a/gdk/macos/gdkmacosmonitor.c +++ b/gdk/macos/gdkmacosmonitor.c @@ -152,7 +152,7 @@ GetLocalizedName (NSScreen *screen) return g_steal_pointer (&name); } -static gchar * +static char * GetConnectorName (CGDirectDisplayID screen_id) { guint unit = CGDisplayUnitNumber (screen_id); @@ -193,8 +193,8 @@ _gdk_macos_monitor_reconfigure (GdkMacosMonitor *self) CGRect bounds; size_t width; size_t pixel_width; - gchar *connector; - gchar *name; + char *connector; + char *name; int refresh_rate; int scale_factor = 1; int width_mm; diff --git a/gdk/macos/gdkmacossurface-private.h b/gdk/macos/gdkmacossurface-private.h index 4d9aa4c053..074fd28854 100644 --- a/gdk/macos/gdkmacossurface-private.h +++ b/gdk/macos/gdkmacossurface-private.h @@ -79,7 +79,7 @@ NSWindow *_gdk_macos_surface_get_native (GdkMacosSurface CGDirectDisplayID _gdk_macos_surface_get_screen_id (GdkMacosSurface *self); const char *_gdk_macos_surface_get_title (GdkMacosSurface *self); void _gdk_macos_surface_set_title (GdkMacosSurface *self, - const gchar *title); + const char *title); void _gdk_macos_surface_get_shadow (GdkMacosSurface *self, int *top, int *right, diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c index 84c74b9d46..a5bc4098b9 100644 --- a/gdk/macos/gdkmacossurface.c +++ b/gdk/macos/gdkmacossurface.c @@ -571,7 +571,7 @@ _gdk_macos_surface_get_title (GdkMacosSurface *self) void _gdk_macos_surface_set_title (GdkMacosSurface *self, - const gchar *title) + const char *title) { g_return_if_fail (GDK_IS_MACOS_SURFACE (self)); diff --git a/gdk/wayland/gdkapplaunchcontext-wayland.c b/gdk/wayland/gdkapplaunchcontext-wayland.c index 943a1c9185..cb6cf9a12b 100644 --- a/gdk/wayland/gdkapplaunchcontext-wayland.c +++ b/gdk/wayland/gdkapplaunchcontext-wayland.c @@ -49,7 +49,7 @@ typedef struct _GdkWaylandAppLaunchContextClass GdkWaylandAppLaunchContextClass; struct _GdkWaylandAppLaunchContext { GdkAppLaunchContext base; - gchar *name; + char *name; guint serial; }; diff --git a/gdk/wayland/gdkcursor-wayland.c b/gdk/wayland/gdkcursor-wayland.c index 3358a8184a..c859f3ccac 100644 --- a/gdk/wayland/gdkcursor-wayland.c +++ b/gdk/wayland/gdkcursor-wayland.c @@ -62,7 +62,7 @@ _gdk_wayland_display_finalize_cursors (GdkWaylandDisplay *display) } static const struct { - const gchar *css_name, *traditional_name; + const char *css_name, *traditional_name; } name_map[] = { { "default", "left_ptr" }, { "help", "question_arrow" }, @@ -101,8 +101,8 @@ static const struct { { "zoom-out", "left_ptr" } }; -static const gchar * -name_fallback (const gchar *name) +static const char * +name_fallback (const char *name) { int i; diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 13f03ca4b3..e9fc839e83 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -161,7 +161,7 @@ struct _GdkWaylandTabletPadData guint enter_serial; uint32_t n_buttons; - gchar *path; + char *path; GList *rings; GList *strips; @@ -171,8 +171,8 @@ struct _GdkWaylandTabletPadData struct _GdkWaylandTabletData { struct zwp_tablet_v2 *wp_tablet; - gchar *name; - gchar *path; + char *name; + char *path; uint32_t vid; uint32_t pid; @@ -2853,8 +2853,8 @@ tablet_handle_done (void *data, GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tablet->seat); GdkDisplay *display = gdk_seat_get_display (GDK_SEAT (seat)); GdkDevice *logical_device, *stylus_device; - gchar *logical_name; - gchar *vid, *pid; + char *logical_name; + char *vid, *pid; vid = g_strdup_printf ("%.4x", tablet->vid); pid = g_strdup_printf ("%.4x", tablet->pid); @@ -5077,7 +5077,7 @@ gdk_wayland_seat_get_wl_seat (GdkSeat *seat) * * Returns: the /dev/input/event* path of this device **/ -const gchar * +const char * gdk_wayland_device_get_node_path (GdkDevice *device) { GdkWaylandTabletData *tablet; @@ -5113,7 +5113,7 @@ void gdk_wayland_device_pad_set_feedback (GdkDevice *device, GdkDevicePadFeature feature, guint feature_idx, - const gchar *label) + const char *label) { GdkWaylandTabletPadData *pad; GdkWaylandTabletPadGroupData *group; diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index 22623042eb..d0e6298e56 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -610,7 +610,7 @@ _gdk_wayland_display_prepare_cursor_themes (GdkWaylandDisplay *display_wayland) static void init_settings (GdkDisplay *display); GdkDisplay * -_gdk_wayland_display_open (const gchar *display_name) +_gdk_wayland_display_open (const char *display_name) { struct wl_display *wl_display; GdkDisplay *display; @@ -758,10 +758,10 @@ gdk_wayland_display_finalize (GObject *object) G_OBJECT_CLASS (gdk_wayland_display_parent_class)->finalize (object); } -static const gchar * +static const char * gdk_wayland_display_get_name (GdkDisplay *display) { - const gchar *name; + const char *name; name = g_getenv ("WAYLAND_DISPLAY"); if (name == NULL) @@ -830,7 +830,7 @@ static void gdk_wayland_display_make_default (GdkDisplay *display) { GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display); - const gchar *startup_id; + const char *startup_id; g_free (display_wayland->startup_notification_id); display_wayland->startup_notification_id = NULL; @@ -870,7 +870,7 @@ gdk_wayland_display_get_next_serial (GdkDisplay *display) * * Returns: the startup notification ID for @display, or %NULL */ -const gchar * +const char * gdk_wayland_display_get_startup_notification_id (GdkDisplay *display) { return GDK_WAYLAND_DISPLAY (display)->startup_notification_id; @@ -903,10 +903,10 @@ gdk_wayland_display_set_startup_notification_id (GdkDisplay *display, static void gdk_wayland_display_notify_startup_complete (GdkDisplay *display, - const gchar *startup_id) + const char *startup_id) { GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display); - gchar *free_this = NULL; + char *free_this = NULL; if (startup_id == NULL) { @@ -1071,7 +1071,7 @@ get_cursor_theme (GdkWaylandDisplay *display_wayland, void gdk_wayland_display_set_cursor_theme (GdkDisplay *display, - const gchar *name, + const char *name, int size) { GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY(display); @@ -1116,7 +1116,7 @@ static void _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *display_wayland) { guint size; - const gchar *name; + const char *name; GValue v = G_VALUE_INIT; gint64 before = g_get_monotonic_time (); @@ -1467,9 +1467,9 @@ get_dpi_from_gsettings (GdkWaylandDisplay *display_wayland) typedef struct _TranslationEntry TranslationEntry; struct _TranslationEntry { gboolean valid; - const gchar *schema; - const gchar *key; - const gchar *setting; + const char *schema; + const char *key; + const char *setting; GType type; union { const char *s; @@ -1994,7 +1994,7 @@ set_value_from_entry (GdkDisplay *display, case G_TYPE_STRING: if (settings && entry->valid) { - gchar *s; + char *s; s = g_settings_get_string (settings, entry->key); g_value_set_string (value, s); g_free (s); @@ -2053,7 +2053,7 @@ set_decoration_layout_from_entry (GdkDisplay *display, if (settings) { - gchar *s = g_settings_get_string (settings, entry->key); + char *s = g_settings_get_string (settings, entry->key); translate_wm_button_layout_to_gtk (s); g_value_set_string (value, s); @@ -2585,11 +2585,11 @@ gdk_wayland_display_get_output_scale (GdkWaylandDisplay *display_wayland, **/ gboolean gdk_wayland_display_query_registry (GdkDisplay *display, - const gchar *global) + const char *global) { GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display); GHashTableIter iter; - gchar *value; + char *value; g_return_val_if_fail (GDK_IS_WAYLAND_DISPLAY (display), FALSE); g_return_val_if_fail (global != NULL, FALSE); diff --git a/gdk/wayland/gdkdisplay-wayland.h b/gdk/wayland/gdkdisplay-wayland.h index 7321b34a4e..daf157dbcc 100644 --- a/gdk/wayland/gdkdisplay-wayland.h +++ b/gdk/wayland/gdkdisplay-wayland.h @@ -59,8 +59,8 @@ typedef struct { gboolean antialias; gboolean hinting; int dpi; - const gchar *rgba; - const gchar *hintstyle; + const char *rgba; + const char *hintstyle; } GsdXftSettings; typedef enum _GdkWaylandShellVariant @@ -81,7 +81,7 @@ struct _GdkWaylandDisplay guint32 shell_capabilities; /* Startup notification */ - gchar *startup_notification_id; + char *startup_notification_id; /* Most recent serial */ guint32 serial; @@ -127,7 +127,7 @@ struct _GdkWaylandDisplay GList *current_grabbing_popups; struct wl_cursor_theme *cursor_theme; - gchar *cursor_theme_name; + char *cursor_theme_name; int cursor_theme_size; GHashTable *cursor_surface_cache; diff --git a/gdk/wayland/gdkprivate-wayland.h b/gdk/wayland/gdkprivate-wayland.h index c38f9b7f68..98b4af7a1c 100644 --- a/gdk/wayland/gdkprivate-wayland.h +++ b/gdk/wayland/gdkprivate-wayland.h @@ -153,7 +153,7 @@ void _gdk_wayland_display_queue_events (GdkDisplay *display); GdkAppLaunchContext *_gdk_wayland_display_get_app_launch_context (GdkDisplay *display); -GdkDisplay *_gdk_wayland_display_open (const gchar *display_name); +GdkDisplay *_gdk_wayland_display_open (const char *display_name); GList *gdk_wayland_display_get_toplevel_surfaces (GdkDisplay *display); diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index 65eb7f387d..b6e60a40fe 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -111,17 +111,17 @@ struct _GdkWaylandSurface int pending_buffer_offset_x; int pending_buffer_offset_y; - gchar *title; + char *title; struct { gboolean was_set; - gchar *application_id; - gchar *app_menu_path; - gchar *menubar_path; - gchar *window_object_path; - gchar *application_object_path; - gchar *unique_bus_name; + char *application_id; + char *app_menu_path; + char *menubar_path; + char *window_object_path; + char *application_object_path; + char *unique_bus_name; } application; GdkGeometry geometry_hints; @@ -387,7 +387,7 @@ gdk_wayland_surface_update_size (GdkSurface *surface, gdk_surface_invalidate_rect (surface, NULL); } -static const gchar * +static const char * get_default_title (void) { const char *title; @@ -1688,7 +1688,7 @@ gdk_wayland_surface_create_xdg_toplevel (GdkSurface *surface) { GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface)); GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface); - const gchar *app_id; + const char *app_id; gdk_surface_freeze_updates (surface); @@ -3393,7 +3393,7 @@ gdk_wayland_surface_set_geometry_hints (GdkSurface *surface, static void gdk_wayland_surface_set_title (GdkSurface *surface, - const gchar *title) + const char *title) { GdkWaylandSurface *impl; const char *end; @@ -3429,7 +3429,7 @@ gdk_wayland_surface_set_title (GdkSurface *surface, static void gdk_wayland_surface_set_startup_id (GdkSurface *surface, - const gchar *startup_id) + const char *startup_id) { } diff --git a/gdk/wayland/gdkwaylanddevice.h b/gdk/wayland/gdkwaylanddevice.h index d0daaeae8c..f07662bec3 100644 --- a/gdk/wayland/gdkwaylanddevice.h +++ b/gdk/wayland/gdkwaylanddevice.h @@ -56,13 +56,13 @@ GDK_AVAILABLE_IN_ALL struct wl_seat *gdk_wayland_seat_get_wl_seat (GdkSeat *seat); GDK_AVAILABLE_IN_ALL -const gchar *gdk_wayland_device_get_node_path (GdkDevice *device); +const char *gdk_wayland_device_get_node_path (GdkDevice *device); GDK_AVAILABLE_IN_ALL void gdk_wayland_device_pad_set_feedback (GdkDevice *device, GdkDevicePadFeature element, guint idx, - const gchar *label); + const char *label); G_END_DECLS diff --git a/gdk/wayland/gdkwaylanddisplay.h b/gdk/wayland/gdkwaylanddisplay.h index 373a2a8e46..f5d955f20f 100644 --- a/gdk/wayland/gdkwaylanddisplay.h +++ b/gdk/wayland/gdkwaylanddisplay.h @@ -51,10 +51,10 @@ GDK_AVAILABLE_IN_ALL struct wl_compositor *gdk_wayland_display_get_wl_compositor (GdkDisplay *display); GDK_AVAILABLE_IN_ALL void gdk_wayland_display_set_cursor_theme (GdkDisplay *display, - const gchar *theme, + const char *theme, int size); GDK_AVAILABLE_IN_ALL -const gchar * gdk_wayland_display_get_startup_notification_id (GdkDisplay *display); +const char * gdk_wayland_display_get_startup_notification_id (GdkDisplay *display); GDK_AVAILABLE_IN_ALL void gdk_wayland_display_set_startup_notification_id (GdkDisplay *display, const char *startup_id); @@ -63,7 +63,7 @@ gboolean gdk_wayland_display_prefers_ssd (GdkDisplay *dis GDK_AVAILABLE_IN_ALL gboolean gdk_wayland_display_query_registry (GdkDisplay *display, - const gchar *global); + const char *global); G_END_DECLS diff --git a/gdk/win32/bdfcursor.c b/gdk/win32/bdfcursor.c index 7c091a1626..8eb8e0ec76 100644 --- a/gdk/win32/bdfcursor.c +++ b/gdk/win32/bdfcursor.c @@ -25,21 +25,21 @@ #include typedef struct { - gchar *name; + char *name; int id; - gchar *bitmap; + char *bitmap; int hotx; int hoty; } font_info_t; typedef struct { - gchar *name; + char *name; int id; int width; int height; int hotx; int hoty; - gchar *data; + char *data; } cursor_info_t; static GSList *fonts = NULL; @@ -98,13 +98,13 @@ cursor_info_t *ci; } static int read_bdf_font(fname) -gchar *fname; +char *fname; { FILE *f; - gchar line[2048]; + char line[2048]; int rv = 0; gboolean startchar = FALSE, startbitmap = FALSE; - gchar *charname,*p,*bitmap; + char *charname,*p,*bitmap; int dx = 0,dy = 0; int w,h,x,y,py; int id,tmp; @@ -280,7 +280,7 @@ static void compose_cursors_from_fonts() for (l = g_slist_copy (fonts); l; l = g_slist_delete_link (l,l)) { font_info_t *fi = l->data; - gchar *name; + char *name; GSList *ml; name = g_strconcat(fi->name, "_mask", NULL); @@ -301,8 +301,8 @@ static char *dump_cursor(ci, id) cursor_info_t *ci; int id; { - static gchar cdata[8192]; - gchar *p; + static char cdata[8192]; + char *p; int i; int c; gboolean flushed; @@ -351,7 +351,7 @@ static int dump_cursors() GSList *ptr; FILE *f = stdout; - fprintf(f, "static const struct { const gchar *name; int type; guchar width; guchar height; guchar hotx; guchar hoty; guchar *data; } cursors[] = {\n"); + fprintf(f, "static const struct { const char *name; int type; guchar width; guchar height; guchar hotx; guchar hoty; guchar *data; } cursors[] = {\n"); for (ptr = cursors; ptr; ptr = ptr->next) { @@ -367,7 +367,7 @@ static int dump_cursors() int main(argc, argv) int argc; -gchar **argv; +char **argv; { if (argc != 2) { diff --git a/gdk/win32/gdkclipdrop-win32.c b/gdk/win32/gdkclipdrop-win32.c index 65e4fdb0d9..4a7fac2bd2 100644 --- a/gdk/win32/gdkclipdrop-win32.c +++ b/gdk/win32/gdkclipdrop-win32.c @@ -297,7 +297,7 @@ Otherwise it's similar to how the clipboard works. Only the DnD server #define CLIPBOARD_RENDER_TIMEOUT (G_USEC_PER_SEC * 29) gboolean _gdk_win32_transmute_windows_data (UINT from_w32format, - const gchar *to_contentformat, + const char *to_contentformat, HANDLE hdata, guchar **set_data, gsize *set_data_length); @@ -347,7 +347,7 @@ typedef struct _GdkWin32ClipboardStorePrepElement GdkWin32ClipboardStorePrepElem struct _GdkWin32ClipboardStorePrepElement { UINT w32format; - const gchar *contentformat; + const char *contentformat; HANDLE handle; GOutputStream *stream; }; @@ -889,7 +889,7 @@ grab_data_from_hdata (GdkWin32ClipboardThreadRetrieve *retr, if (data == NULL) { - gchar *length_str = g_strdup_printf ("%" G_GSIZE_FORMAT, length); + char *length_str = g_strdup_printf ("%" G_GSIZE_FORMAT, length); send_response (retr->parent.item_type, retr->parent.opaque_task, g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, @@ -1609,22 +1609,22 @@ gdk_win32_clipdrop_init (GdkWin32Clipdrop *win32_clipdrop) win32_clipdrop->n_known_pixbuf_formats = 0; for (rover = pixbuf_formats; rover != NULL; rover = rover->next) { - gchar **mime_types = + char **mime_types = gdk_pixbuf_format_get_mime_types ((GdkPixbufFormat *) rover->data); - gchar **mime_type; + char **mime_type; for (mime_type = mime_types; *mime_type != NULL; mime_type++) win32_clipdrop->n_known_pixbuf_formats++; } - win32_clipdrop->known_pixbuf_formats = g_new (const gchar *, win32_clipdrop->n_known_pixbuf_formats); + win32_clipdrop->known_pixbuf_formats = g_new (const char *, win32_clipdrop->n_known_pixbuf_formats); i = 0; for (rover = pixbuf_formats; rover != NULL; rover = rover->next) { - gchar **mime_types = + char **mime_types = gdk_pixbuf_format_get_mime_types ((GdkPixbufFormat *) rover->data); - gchar **mime_type; + char **mime_type; for (mime_type = mime_types; *mime_type != NULL; mime_type++) win32_clipdrop->known_pixbuf_formats[i++] = g_intern_string (*mime_type); @@ -1840,7 +1840,7 @@ gdk_win32_clipdrop_init (GdkWin32Clipdrop *win32_clipdrop) #define CLIPBOARD_IDLE_ABORT_TIME 30 -static const gchar * +static const char * predefined_name (UINT fmt) { #define CASE(fmt) case fmt: return #fmt @@ -1876,15 +1876,15 @@ predefined_name (UINT fmt) } } -gchar * +char * _gdk_win32_get_clipboard_format_name (UINT fmt, gboolean *is_predefined) { int registered_name_w_len = 1024; wchar_t *registered_name_w = g_malloc (registered_name_w_len); - gchar *registered_name = NULL; + char *registered_name = NULL; int gcfn_result; - const gchar *predef = predefined_name (fmt); + const char *predef = predefined_name (fmt); /* TODO: cache the result in a hash table */ @@ -1934,13 +1934,13 @@ _gdk_win32_get_clipboard_format_name (UINT fmt, * Does nothing for strings that already look like a mime/type * (no spaces, one slash, with at least one char on each side of the slash). */ -const gchar * -_gdk_win32_get_clipboard_format_name_as_interned_mimetype (gchar *w32format_name) +const char * +_gdk_win32_get_clipboard_format_name_as_interned_mimetype (char *w32format_name) { - gchar *mime_type; - const gchar *result; - gchar *space = strchr (w32format_name, ' '); - gchar *slash = strchr (w32format_name, '/'); + char *mime_type; + const char *result; + char *space = strchr (w32format_name, ' '); + char *slash = strchr (w32format_name, '/'); if (space == NULL && slash > w32format_name && @@ -1956,7 +1956,7 @@ _gdk_win32_get_clipboard_format_name_as_interned_mimetype (gchar *w32format_name } static GArray * -get_compatibility_w32formats_for_contentformat (const gchar *contentformat) +get_compatibility_w32formats_for_contentformat (const char *contentformat) { GArray *result = NULL; int i; @@ -2017,8 +2017,8 @@ _gdk_win32_add_w32format_to_pairs (UINT w32format, GdkContentFormatsBuilder *builder) { gboolean predef; - gchar *w32format_name = _gdk_win32_get_clipboard_format_name (w32format, &predef); - const gchar *interned_w32format_name; + char *w32format_name = _gdk_win32_get_clipboard_format_name (w32format, &predef); + const char *interned_w32format_name; GdkWin32ContentFormatPair pair; GArray *comp_pairs; int i, j; @@ -2079,7 +2079,7 @@ transmute_cf_unicodetext_to_utf8_string (const guchar *data, GDestroyNotify *set_data_destroy) { wchar_t *ptr, *p, *q; - gchar *result; + char *result; glong wclen, u8_len; /* Strip out \r */ @@ -2280,12 +2280,12 @@ transmute_cf_text_to_utf8_string (const guchar *data, GDestroyNotify *set_data_destroy) { char *ptr, *p, *q; - gchar *result; + char *result; glong wclen, u8_len; wchar_t *wstr; /* Strip out \r */ - ptr = (gchar *) data; + ptr = (char *) data; p = ptr; q = ptr; wclen = 0; @@ -2509,11 +2509,11 @@ transmute_cf_shell_id_list_to_text_uri_list (const guchar *data, if (SHGetPathFromIDListW (file_id_full, path_w)) { - gchar *filename = g_utf16_to_utf8 (path_w, -1, NULL, NULL, NULL); + char *filename = g_utf16_to_utf8 (path_w, -1, NULL, NULL, NULL); if (filename) { - gchar *uri = g_filename_to_uri (filename, NULL, NULL); + char *uri = g_filename_to_uri (filename, NULL, NULL); if (uri) { @@ -2566,7 +2566,7 @@ transmute_image_bmp_to_cf_dib (const guchar *data, gboolean _gdk_win32_transmute_windows_data (UINT from_w32format, - const gchar *to_contentformat, + const char *to_contentformat, HANDLE hdata, guchar **set_data, gsize *set_data_length) @@ -2627,7 +2627,7 @@ _gdk_win32_transmute_windows_data (UINT from_w32format, } gboolean -_gdk_win32_transmute_contentformat (const gchar *from_contentformat, +_gdk_win32_transmute_contentformat (const char *from_contentformat, UINT to_w32format, const guchar *data, int length, diff --git a/gdk/win32/gdkclipdrop-win32.h b/gdk/win32/gdkclipdrop-win32.h index f28b0eec80..6d37e9e367 100644 --- a/gdk/win32/gdkclipdrop-win32.h +++ b/gdk/win32/gdkclipdrop-win32.h @@ -38,7 +38,7 @@ typedef struct { /* This is assumed to be an interned string, it will be * compared by simply comparing the pointer. */ - const gchar *contentformat; + const char *contentformat; gboolean transmute; } GdkWin32ContentFormatPair; @@ -129,7 +129,7 @@ struct _GdkWin32Clipdrop GObject *parent_instance; /* interned strings for well-known image formats */ - const gchar **known_pixbuf_formats; + const char **known_pixbuf_formats; int n_known_pixbuf_formats; /* GArray of GdkAtoms for various known Selection and DnD strings. @@ -238,7 +238,7 @@ void _gdk_win32_clipdrop_init (void); gboolean _gdk_win32_format_uses_hdata (UINT w32format); -gchar * _gdk_win32_get_clipboard_format_name (UINT fmt, +char * _gdk_win32_get_clipboard_format_name (UINT fmt, gboolean *is_predefined); void _gdk_win32_add_w32format_to_pairs (UINT format, GArray *array, @@ -249,7 +249,7 @@ int _gdk_win32_add_contentformat_to_pairs (const char void _gdk_win32_clipboard_default_output_done (GObject *clipboard, GAsyncResult *result, gpointer user_data); -gboolean _gdk_win32_transmute_contentformat (const gchar *from_contentformat, +gboolean _gdk_win32_transmute_contentformat (const char *from_contentformat, UINT to_w32format, const guchar *data, int length, @@ -257,7 +257,7 @@ gboolean _gdk_win32_transmute_contentformat (const gchar gsize *set_data_length); gboolean _gdk_win32_transmute_windows_data (UINT from_w32format, - const gchar *to_contentformat, + const char *to_contentformat, HANDLE hdata, guchar **set_data, gsize *set_data_length); diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c index 9184e6bcd3..9bfdd2c443 100644 --- a/gdk/win32/gdkcursor-win32.c +++ b/gdk/win32/gdkcursor-win32.c @@ -382,7 +382,7 @@ gdk_win32_hcursor_get_handle (GdkWin32HCursor *cursor) static HCURSOR hcursor_from_x_cursor (int i, - const gchar *name) + const char *name) { int j, x, y, ofs; HCURSOR rv; @@ -448,7 +448,7 @@ hcursor_from_x_cursor (int i, static GdkWin32HCursor * win32_cursor_create_win32hcursor (GdkWin32Display *display, Win32Cursor *cursor, - const gchar *name) + const char *name) { GdkWin32HCursor *result; @@ -467,7 +467,7 @@ win32_cursor_create_win32hcursor (GdkWin32Display *display, case GDK_WIN32_CURSOR_LOAD_FROM_RESOURCE_NULL: result = gdk_win32_hcursor_new (display, LoadImageA (NULL, - (const gchar *) cursor->resource_name, + (const char *) cursor->resource_name, IMAGE_CURSOR, cursor->width, cursor->height, @@ -477,7 +477,7 @@ win32_cursor_create_win32hcursor (GdkWin32Display *display, case GDK_WIN32_CURSOR_LOAD_FROM_RESOURCE_THIS: result = gdk_win32_hcursor_new (display, LoadImageA (_gdk_app_hmodule, - (const gchar *) cursor->resource_name, + (const char *) cursor->resource_name, IMAGE_CURSOR, cursor->width, cursor->height, @@ -487,7 +487,7 @@ win32_cursor_create_win32hcursor (GdkWin32Display *display, case GDK_WIN32_CURSOR_LOAD_FROM_RESOURCE_GTK: result = gdk_win32_hcursor_new (display, LoadImageA (_gdk_dll_hinstance, - (const gchar *) cursor->resource_name, + (const char *) cursor->resource_name, IMAGE_CURSOR, cursor->width, cursor->height, @@ -546,10 +546,10 @@ win32_cursor_destroy (gpointer data) static void win32_cursor_theme_load_from (Win32CursorTheme *theme, int size, - const gchar *dir) + const char *dir) { GDir *gdir; - const gchar *filename; + const char *filename; HCURSOR hcursor; gdir = g_dir_open (dir, 0, NULL); @@ -559,10 +559,10 @@ win32_cursor_theme_load_from (Win32CursorTheme *theme, while ((filename = g_dir_read_name (gdir)) != NULL) { - gchar *fullname; + char *fullname; gunichar2 *filenamew; - gchar *cursor_name; - gchar *dot; + char *cursor_name; + char *dot; Win32Cursor *cursor; fullname = g_build_filename (dir, filename, NULL); @@ -599,11 +599,11 @@ win32_cursor_theme_load_from (Win32CursorTheme *theme, static void win32_cursor_theme_load_from_dirs (Win32CursorTheme *theme, - const gchar *name, + const char *name, int size) { - gchar *theme_dir; - const gchar * const *dirs; + char *theme_dir; + const char * const *dirs; int i; dirs = g_get_system_data_dirs (); @@ -689,7 +689,7 @@ win32_cursor_theme_load_system (Win32CursorTheme *theme, } Win32CursorTheme * -win32_cursor_theme_load (const gchar *name, +win32_cursor_theme_load (const char *name, int size) { Win32CursorTheme *result = g_new0 (Win32CursorTheme, 1); @@ -725,7 +725,7 @@ win32_cursor_theme_destroy (Win32CursorTheme *theme) Win32Cursor * win32_cursor_theme_get_cursor (Win32CursorTheme *theme, - const gchar *name) + const char *name) { return g_hash_table_lookup (theme->named_cursors, name); } @@ -779,7 +779,7 @@ _gdk_win32_display_init_cursors (GdkWin32Display *display) /* This is where we use the names mapped to the equivalents that Windows defines by default */ static GdkWin32HCursor * win32hcursor_idc_from_name (GdkWin32Display *display, - const gchar *name) + const char *name) { int i; @@ -799,7 +799,7 @@ win32hcursor_idc_from_name (GdkWin32Display *display, static GdkWin32HCursor * win32hcursor_x_from_name (GdkWin32Display *display, - const gchar *name) + const char *name) { int i; @@ -812,7 +812,7 @@ win32hcursor_x_from_name (GdkWin32Display *display, static GdkWin32HCursor * win32hcursor_from_theme (GdkWin32Display *display, - const gchar *name) + const char *name) { Win32CursorTheme *theme; Win32Cursor *theme_cursor; @@ -832,7 +832,7 @@ win32hcursor_from_theme (GdkWin32Display *display, static GdkWin32HCursor * win32hcursor_from_name (GdkWin32Display *display, - const gchar *name) + const char *name) { GdkWin32HCursor *win32hcursor; @@ -879,7 +879,7 @@ create_blank_win32hcursor (GdkWin32Display *display) static GdkWin32HCursor * gdk_win32hcursor_create_for_name (GdkWin32Display *display, - const gchar *name) + const char *name) { GdkWin32HCursor *win32hcursor = NULL; @@ -940,7 +940,7 @@ _gdk_win32_cursor_update (GdkWin32Display *win32_display, Win32CursorTheme *theme; Win32Cursor *theme_cursor; - const gchar *name = gdk_cursor_get_name (cursor); + const char *name = gdk_cursor_get_name (cursor); /* Do nothing if this is not a named cursor. */ if (name == NULL) @@ -1509,7 +1509,7 @@ gdk_win32_display_get_win32hcursor (GdkWin32Display *display, { GdkWin32Display *win32_display = GDK_WIN32_DISPLAY (display); GdkWin32HCursor *win32hcursor; - const gchar *cursor_name; + const char *cursor_name; GdkCursor *fallback; g_return_val_if_fail (cursor != NULL, NULL); diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c index a2d26b0231..df456c29fd 100644 --- a/gdk/win32/gdkdevicemanager-win32.c +++ b/gdk/win32/gdkdevicemanager-win32.c @@ -360,7 +360,7 @@ wintab_init_check (GdkDeviceManagerWin32 *device_manager) UINT devix, cursorix; int i, num_axes = 0; wchar_t devname[100], csrname[100]; - gchar *devname_utf8, *csrname_utf8, *device_name; + char *devname_utf8, *csrname_utf8, *device_name; BOOL defcontext_done; HMODULE wintab32; char *wintab32_dll_path; diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index 53227c70ff..27e094d535 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -339,7 +339,7 @@ _gdk_win32_display_init_monitors (GdkWin32Display *win32_display) */ void gdk_win32_display_set_cursor_theme (GdkDisplay *display, - const gchar *name, + const char *name, int size) { int cursor_size; @@ -492,7 +492,7 @@ register_display_change_notification (GdkDisplay *display) } GdkDisplay * -_gdk_win32_display_open (const gchar *display_name) +_gdk_win32_display_open (const char *display_name) { GdkWin32Display *win32_display; @@ -548,7 +548,7 @@ _gdk_win32_display_open (const gchar *display_name) G_DEFINE_TYPE (GdkWin32Display, gdk_win32_display, GDK_TYPE_DISPLAY) -static const gchar * +static const char * gdk_win32_display_get_name (GdkDisplay *display) { HDESK hdesk = GetThreadDesktop (GetCurrentThreadId ()); @@ -882,7 +882,7 @@ _gdk_win32_enable_hidpi (GdkWin32Display *display) static void gdk_win32_display_init (GdkWin32Display *display) { - const gchar *scale_str = g_getenv ("GDK_SCALE"); + const char *scale_str = g_getenv ("GDK_SCALE"); display->monitors = G_LIST_MODEL (g_list_store_new (GDK_TYPE_MONITOR)); @@ -927,7 +927,7 @@ gdk_win32_display_check_composited (GdkWin32Display *display) static void gdk_win32_display_notify_startup_complete (GdkDisplay *display, - const gchar *startup_id) + const char *startup_id) { /* nothing */ } @@ -1038,7 +1038,7 @@ _gdk_win32_display_get_monitor_scale_factor (GdkWin32Display *win32_display, static gboolean gdk_win32_display_get_setting (GdkDisplay *display, - const gchar *name, + const char *name, GValue *value) { return _gdk_win32_get_setting (name, value); diff --git a/gdk/win32/gdkdisplay-win32.h b/gdk/win32/gdkdisplay-win32.h index 02c217189f..bbb96fe255 100644 --- a/gdk/win32/gdkdisplay-win32.h +++ b/gdk/win32/gdkdisplay-win32.h @@ -72,7 +72,7 @@ struct _GdkWin32Display GdkWin32Screen *screen; Win32CursorTheme *cursor_theme; - gchar *cursor_theme_name; + char *cursor_theme_name; int cursor_theme_size; HWND hwnd; diff --git a/gdk/win32/gdkdrag-win32.c b/gdk/win32/gdkdrag-win32.c index 20f8cb3f4b..8d6caa9ae3 100644 --- a/gdk/win32/gdkdrag-win32.c +++ b/gdk/win32/gdkdrag-win32.c @@ -2255,7 +2255,7 @@ gdk_win32_drag_cancel (GdkDrag *drag, { GdkWin32Drag *drag_win32 = GDK_WIN32_DRAG (drag); - const gchar *reason_str = NULL; + const char *reason_str = NULL; switch (reason) { case GDK_DRAG_CANCEL_NO_TARGET: diff --git a/gdk/win32/gdkdrop-win32.c b/gdk/win32/gdkdrop-win32.c index 8d0ba39431..aecb5d8eed 100644 --- a/gdk/win32/gdkdrop-win32.c +++ b/gdk/win32/gdkdrop-win32.c @@ -95,7 +95,7 @@ struct _GdkWin32Drop /* The list from WM_DROPFILES is store here temporarily, * until the next gdk_win32_drop_read_async () */ - gchar *dropfiles_list; + char *dropfiles_list; guint drop_finished : 1; /* FALSE until gdk_drop_finish() is called */ guint drop_failed : 1; /* Whether the drop was unsuccessful */ @@ -316,7 +316,7 @@ query_object_formats (LPDATAOBJECT pDataObj, while (SUCCEEDED (hr) && hr != S_FALSE) { gboolean is_predef; - gchar *registered_name = _gdk_win32_get_clipboard_format_name (fmt.cfFormat, &is_predef); + char *registered_name = _gdk_win32_get_clipboard_format_name (fmt.cfFormat, &is_predef); if (registered_name && is_predef) GDK_NOTE (DND, g_print ("supported built-in source format 0x%x %s\n", fmt.cfFormat, registered_name)); @@ -817,7 +817,7 @@ target_context_new (GdkSurface *window) static gboolean resolve_link (HWND hWnd, wchar_t *link, - gchar **lpszPath) + char **lpszPath) { WIN32_FILE_ATTRIBUTE_DATA wfad; HRESULT hr; @@ -940,7 +940,7 @@ gdk_dropfiles_filter (GdkWin32Display *display, HANDLE hdrop; POINT pt; int nfiles, i; - gchar *fileName, *linkedFile; + char *fileName, *linkedFile; if (msg->message != WM_DROPFILES) return GDK_WIN32_MESSAGE_FILTER_CONTINUE; @@ -972,7 +972,7 @@ gdk_dropfiles_filter (GdkWin32Display *display, result = g_string_new (NULL); for (i = 0; i < nfiles; i++) { - gchar *uri; + char *uri; wchar_t wfn[MAX_PATH]; DragQueryFileW (hdrop, i, wfn, MAX_PATH); @@ -1225,7 +1225,7 @@ grab_data_from_hdata (GTask *task, if (data == NULL) { - gchar *length_str = g_strdup_printf ("%" G_GSIZE_FORMAT, length); + char *length_str = g_strdup_printf ("%" G_GSIZE_FORMAT, length); g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot get DnD data. Failed to allocate %s bytes to store the data."), length_str); g_free (length_str); diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index 0802fabdd3..a2ff0d952e 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -2038,7 +2038,7 @@ gdk_event_translate (MSG *msg, int button; - gchar buf[256]; + char buf[256]; gboolean return_val = FALSE; int i; diff --git a/gdk/win32/gdkmain-win32.c b/gdk/win32/gdkmain-win32.c index ea71f046b3..73fd620ac1 100644 --- a/gdk/win32/gdkmain-win32.c +++ b/gdk/win32/gdkmain-win32.c @@ -52,7 +52,7 @@ static gboolean gdk_synchronize = FALSE; void _gdk_win32_surfaceing_init (void) { - gchar buf[10]; + char buf[10]; if (getenv ("GDK_IGNORE_WINTAB") != NULL) _gdk_input_ignore_wintab = TRUE; @@ -77,18 +77,18 @@ _gdk_win32_surfaceing_init (void) } void -_gdk_win32_api_failed (const gchar *where, - const gchar *api) +_gdk_win32_api_failed (const char *where, + const char *api) { DWORD error_code = GetLastError (); - gchar *msg = g_win32_error_message (error_code); + char *msg = g_win32_error_message (error_code); g_warning ("%s: %s failed with code %lu: %s", where, api, error_code, msg); g_free (msg); } void -_gdk_other_api_failed (const gchar *where, - const gchar *api) +_gdk_other_api_failed (const char *where, + const char *api) { g_warning ("%s: %s failed", where, api); } @@ -104,14 +104,14 @@ _gdk_other_api_failed (const gchar *where, * function’s return value is used in debugging output right after the call, * and the return value isn’t used after that. */ -static gchar * -static_printf (const gchar *format, +static char * +static_printf (const char *format, ...) { - static gchar buf[10000]; - gchar *msg; - static gchar *bufp = buf; - gchar *retval; + static char buf[10000]; + char *msg; + static char *bufp = buf; + char *retval; va_list args; va_start (args, format); @@ -244,7 +244,7 @@ _gdk_win32_print_dc (HDC hdc) DeleteObject (hrgn); } -gchar * +char * _gdk_win32_drag_protocol_to_string (GdkDragProtocol protocol) { switch (protocol) @@ -261,12 +261,12 @@ _gdk_win32_drag_protocol_to_string (GdkDragProtocol protocol) return NULL; } -gchar * +char * _gdk_win32_surface_state_to_string (GdkSurfaceState state) { - gchar buf[100]; - gchar *bufp = buf; - gchar *s = ""; + char buf[100]; + char *bufp = buf; + char *s = ""; buf[0] = '\0'; @@ -287,12 +287,12 @@ _gdk_win32_surface_state_to_string (GdkSurfaceState state) return static_printf ("%s", buf); } -gchar * +char * _gdk_win32_surface_style_to_string (LONG style) { - gchar buf[1000]; - gchar *bufp = buf; - gchar *s = ""; + char buf[1000]; + char *bufp = buf; + char *s = ""; buf[0] = '\0'; @@ -329,12 +329,12 @@ _gdk_win32_surface_style_to_string (LONG style) return static_printf ("%s", buf); } -gchar * +char * _gdk_win32_surface_exstyle_to_string (LONG style) { - gchar buf[1000]; - gchar *bufp = buf; - gchar *s = ""; + char buf[1000]; + char *bufp = buf; + char *s = ""; buf[0] = '\0'; @@ -375,12 +375,12 @@ _gdk_win32_surface_exstyle_to_string (LONG style) return static_printf ("%s", buf); } -gchar * +char * _gdk_win32_surface_pos_bits_to_string (UINT flags) { - gchar buf[1000]; - gchar *bufp = buf; - gchar *s = ""; + char buf[1000]; + char *bufp = buf; + char *s = ""; buf[0] = '\0'; @@ -407,12 +407,12 @@ _gdk_win32_surface_pos_bits_to_string (UINT flags) return static_printf ("%s", buf); } -gchar * +char * _gdk_win32_drag_action_to_string (GdkDragAction actions) { - gchar buf[100]; - gchar *bufp = buf; - gchar *s = ""; + char buf[100]; + char *bufp = buf; + char *s = ""; buf[0] = '\0'; @@ -429,7 +429,7 @@ _gdk_win32_drag_action_to_string (GdkDragAction actions) return static_printf ("%s", buf); } -gchar * +char * _gdk_win32_rop2_to_string (int rop2) { switch (rop2) @@ -458,7 +458,7 @@ _gdk_win32_rop2_to_string (int rop2) return NULL; } -gchar * +char * _gdk_win32_lbstyle_to_string (UINT brush_style) { switch (brush_style) @@ -477,7 +477,7 @@ _gdk_win32_lbstyle_to_string (UINT brush_style) return NULL; } -gchar * +char * _gdk_win32_pstype_to_string (DWORD pen_style) { switch (pen_style & PS_TYPE_MASK) @@ -490,7 +490,7 @@ _gdk_win32_pstype_to_string (DWORD pen_style) return NULL; } -gchar * +char * _gdk_win32_psstyle_to_string (DWORD pen_style) { switch (pen_style & PS_STYLE_MASK) @@ -512,7 +512,7 @@ _gdk_win32_psstyle_to_string (DWORD pen_style) return NULL; } -gchar * +char * _gdk_win32_psendcap_to_string (DWORD pen_style) { switch (pen_style & PS_ENDCAP_MASK) @@ -528,7 +528,7 @@ _gdk_win32_psendcap_to_string (DWORD pen_style) return NULL; } -gchar * +char * _gdk_win32_psjoin_to_string (DWORD pen_style) { switch (pen_style & PS_JOIN_MASK) @@ -544,7 +544,7 @@ _gdk_win32_psjoin_to_string (DWORD pen_style) return NULL; } -gchar * +char * _gdk_win32_message_to_string (UINT msg) { switch (msg) @@ -781,16 +781,16 @@ _gdk_win32_message_to_string (UINT msg) return NULL; } -gchar * +char * _gdk_win32_key_to_string (LONG lParam) { char buf[100]; - gchar *keyname_utf8; + char *keyname_utf8; if (GetKeyNameText (lParam, buf, sizeof (buf)) && (keyname_utf8 = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL)) != NULL) { - gchar *retval = static_printf ("%s", keyname_utf8); + char *retval = static_printf ("%s", keyname_utf8); g_free (keyname_utf8); @@ -800,7 +800,7 @@ _gdk_win32_key_to_string (LONG lParam) return static_printf ("unk-%#lx", lParam); } -gchar * +char * _gdk_win32_cf_to_string (UINT format) { char buf[100]; @@ -844,13 +844,13 @@ _gdk_win32_cf_to_string (UINT format) } } -gchar * +char * _gdk_win32_data_to_string (const guchar *data, int nbytes) { GString *s = g_string_new (""); int i; - gchar *retval; + char *retval; for (i = 0; i < nbytes; i++) if (data[i] >=' ' && data[i] <= '~') @@ -864,7 +864,7 @@ _gdk_win32_data_to_string (const guchar *data, return retval; } -gchar * +char * _gdk_win32_rect_to_string (const RECT *rect) { return static_printf ("%ldx%ld@%+ld%+ld", @@ -872,7 +872,7 @@ _gdk_win32_rect_to_string (const RECT *rect) rect->left, rect->top); } -gchar * +char * _gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect) { return static_printf ("%dx%d@%+d%+d", @@ -880,7 +880,7 @@ _gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect) rect->x, rect->y); } -gchar * +char * _gdk_win32_cairo_region_to_string (const cairo_region_t *rgn) { cairo_rectangle_int_t extents; @@ -890,7 +890,7 @@ _gdk_win32_cairo_region_to_string (const cairo_region_t *rgn) extents.x, extents.y); } -gchar * +char * _gdk_win32_surface_description (GdkSurface *d) { g_return_val_if_fail (GDK_IS_SURFACE (d), NULL); diff --git a/gdk/win32/gdkmonitor-win32.c b/gdk/win32/gdkmonitor-win32.c index 4171965fc7..9452f0f33b 100644 --- a/gdk/win32/gdkmonitor-win32.c +++ b/gdk/win32/gdkmonitor-win32.c @@ -186,7 +186,7 @@ get_device_property (HDEVINFO device_infoset, if (error_code != ERROR_INSUFFICIENT_BUFFER) { - gchar *emsg = g_win32_error_message (error_code); + char *emsg = g_win32_error_message (error_code); g_warning ("Failed to get device node property {" G_GUID_FORMAT "},%lu size: %s", g_format_guid (&property_key->fmtid), property_key->pid, @@ -212,7 +212,7 @@ get_device_property (HDEVINFO device_infoset, { DWORD error_code = GetLastError (); - gchar *emsg = g_win32_error_message (error_code); + char *emsg = g_win32_error_message (error_code); g_warning ("Failed to get device node property {" G_GUID_FORMAT "},%lu: %s", g_format_guid (&property_key->fmtid), property_key->pid, @@ -256,7 +256,7 @@ get_monitor_devices (GdkWin32Display *win32_display) for (device_index = 0; TRUE; device_index++) { gunichar2 *p; - gchar *instance_path; + char *instance_path; gunichar2 *prop; DWORD proptype; HKEY device_registry_key; @@ -325,7 +325,7 @@ get_monitor_devices (GdkWin32Display *win32_display) { if (proptype == DEVPROP_TYPE_STRING) { - gchar *manufacturer = g_utf16_to_utf8 (prop, -1, NULL, NULL, NULL); + char *manufacturer = g_utf16_to_utf8 (prop, -1, NULL, NULL, NULL); gdk_monitor_set_manufacturer (mon, manufacturer); g_free (manufacturer); } @@ -341,7 +341,7 @@ get_monitor_devices (GdkWin32Display *win32_display) { if (proptype == DEVPROP_TYPE_STRING) { - gchar *name = g_utf16_to_utf8 (prop, -1, NULL, NULL, NULL); + char *name = g_utf16_to_utf8 (prop, -1, NULL, NULL, NULL); gdk_monitor_set_model (mon, name); g_free (name); } @@ -456,7 +456,7 @@ populate_monitor_devices_from_display_config (GPtrArray *monitors) int i; GdkWin32Monitor *w32mon; GdkMonitor *mon; - gchar *path, *path_lower; + char *path, *path_lower; DISPLAYCONFIG_RATIONAL *refresh; if ((dispconf_paths[path_index].flags & DISPLAYCONFIG_PATH_ACTIVE) == 0) @@ -502,7 +502,7 @@ populate_monitor_devices_from_display_config (GPtrArray *monitors) if (!tdn.flags.friendlyNameForced) { /* monitorFriendlyDeviceName is usually nicer */ - gchar *name = g_utf16_to_utf8 (tdn.monitorFriendlyDeviceName, -1, NULL, NULL, NULL); + char *name = g_utf16_to_utf8 (tdn.monitorFriendlyDeviceName, -1, NULL, NULL, NULL); gdk_monitor_set_model (mon, name); g_free (name); } @@ -574,7 +574,7 @@ enum_monitor (HMONITOR hmonitor, for (i_monitor = 0; TRUE; i_monitor++) { DISPLAY_DEVICEW dd_monitor; - gchar *device_id_lower, *tmp; + char *device_id_lower, *tmp; DWORD i; GdkWin32Monitor *w32mon; GdkMonitor *mon; @@ -631,7 +631,7 @@ enum_monitor (HMONITOR hmonitor, if (gdk_monitor_get_model (mon) == NULL) { - gchar *name = NULL; + char *name = NULL; /* Only use dd.DeviceName as a last resort, as it is just * \\.\DISPLAYX\MonitorY (for some values of X and Y). diff --git a/gdk/win32/gdkmonitor-win32.h b/gdk/win32/gdkmonitor-win32.h index c32f403169..6bfcd2bc1f 100644 --- a/gdk/win32/gdkmonitor-win32.h +++ b/gdk/win32/gdkmonitor-win32.h @@ -34,7 +34,7 @@ struct _GdkWin32Monitor GdkRectangle work_rect; /* Device instance path (used to match GdkWin32Monitor to monitor device) */ - gchar *instance_path; + char *instance_path; /* TRUE if monitor is made up by us * (this happens when system has logical monitors, but no physical ones). diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h index 86c0157369..9357d22be9 100644 --- a/gdk/win32/gdkprivate-win32.h +++ b/gdk/win32/gdkprivate-win32.h @@ -212,39 +212,39 @@ void _gdk_win32_print_system_palette (void); void _gdk_win32_print_hpalette (HPALETTE hpal); void _gdk_win32_print_dc (HDC hdc); -gchar *_gdk_win32_drag_protocol_to_string (GdkDragProtocol protocol); -gchar *_gdk_win32_surface_state_to_string (GdkSurfaceState state); -gchar *_gdk_win32_surface_style_to_string (LONG style); -gchar *_gdk_win32_surface_exstyle_to_string (LONG style); -gchar *_gdk_win32_surface_pos_bits_to_string (UINT flags); -gchar *_gdk_win32_drag_action_to_string (GdkDragAction actions); -gchar *_gdk_win32_surface_description (GdkSurface *d); +char *_gdk_win32_drag_protocol_to_string (GdkDragProtocol protocol); +char *_gdk_win32_surface_state_to_string (GdkSurfaceState state); +char *_gdk_win32_surface_style_to_string (LONG style); +char *_gdk_win32_surface_exstyle_to_string (LONG style); +char *_gdk_win32_surface_pos_bits_to_string (UINT flags); +char *_gdk_win32_drag_action_to_string (GdkDragAction actions); +char *_gdk_win32_surface_description (GdkSurface *d); -gchar *_gdk_win32_rop2_to_string (int rop2); -gchar *_gdk_win32_lbstyle_to_string (UINT brush_style); -gchar *_gdk_win32_pstype_to_string (DWORD pen_style); -gchar *_gdk_win32_psstyle_to_string (DWORD pen_style); -gchar *_gdk_win32_psendcap_to_string (DWORD pen_style); -gchar *_gdk_win32_psjoin_to_string (DWORD pen_style); -gchar *_gdk_win32_message_to_string (UINT msg); -gchar *_gdk_win32_key_to_string (LONG lParam); -gchar *_gdk_win32_cf_to_string (UINT format); -gchar *_gdk_win32_data_to_string (const guchar*data, +char *_gdk_win32_rop2_to_string (int rop2); +char *_gdk_win32_lbstyle_to_string (UINT brush_style); +char *_gdk_win32_pstype_to_string (DWORD pen_style); +char *_gdk_win32_psstyle_to_string (DWORD pen_style); +char *_gdk_win32_psendcap_to_string (DWORD pen_style); +char *_gdk_win32_psjoin_to_string (DWORD pen_style); +char *_gdk_win32_message_to_string (UINT msg); +char *_gdk_win32_key_to_string (LONG lParam); +char *_gdk_win32_cf_to_string (UINT format); +char *_gdk_win32_data_to_string (const guchar*data, int nbytes); -gchar *_gdk_win32_rect_to_string (const RECT *rect); +char *_gdk_win32_rect_to_string (const RECT *rect); -gchar *_gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect); -gchar *_gdk_win32_cairo_region_to_string (const cairo_region_t *box); +char *_gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect); +char *_gdk_win32_cairo_region_to_string (const cairo_region_t *box); void _gdk_win32_print_event (GdkEvent *event); #endif -gchar *_gdk_win32_last_error_string (void); -void _gdk_win32_api_failed (const gchar *where, - const gchar *api); -void _gdk_other_api_failed (const gchar *where, - const gchar *api); +char *_gdk_win32_last_error_string (void); +void _gdk_win32_api_failed (const char *where, + const char *api); +void _gdk_other_api_failed (const char *where, + const char *api); #define WIN32_API_FAILED(api) _gdk_win32_api_failed (G_STRLOC , api) #define WIN32_GDI_FAILED(api) WIN32_API_FAILED (api) @@ -329,7 +329,7 @@ HICON _gdk_win32_pixbuf_to_hcursor (GdkPixbuf *pixbuf, void _gdk_win32_display_init_cursors (GdkWin32Display *display); void _gdk_win32_display_finalize_cursors (GdkWin32Display *display); void _gdk_win32_display_update_cursors (GdkWin32Display *display); -GdkCursor *_gdk_win32_display_get_cursor_for_name (GdkDisplay *display, const gchar* cursor_name); +GdkCursor *_gdk_win32_display_get_cursor_for_name (GdkDisplay *display, const char * cursor_name); GdkCursor *gdk_win32_display_cursor_from_hcursor (GdkDisplay *display, HCURSOR hcursor); typedef struct _Win32CursorTheme Win32CursorTheme; @@ -357,10 +357,10 @@ struct _Win32Cursor { int xcursor_number; }; -Win32CursorTheme *win32_cursor_theme_load (const gchar *name, +Win32CursorTheme *win32_cursor_theme_load (const char *name, int size); Win32Cursor * win32_cursor_theme_get_cursor (Win32CursorTheme *theme, - const gchar *name); + const char *name); void win32_cursor_theme_destroy (Win32CursorTheme *theme); Win32CursorTheme *_gdk_win32_display_get_cursor_theme (GdkWin32Display *win32_display); @@ -399,13 +399,13 @@ GdkDrag *_gdk_win32_surface_drag_begin (GdkSurface *window, double y_root); /* Stray GdkWin32Screen members */ -gboolean _gdk_win32_get_setting (const gchar *name, GValue *value); +gboolean _gdk_win32_get_setting (const char *name, GValue *value); void _gdk_win32_screen_on_displaychange_event (GdkWin32Screen *screen); GdkSurface *gdk_win32_screen_get_root_window (GdkWin32Screen *screen); GdkSurface *gdk_win32_display_get_root_window (GdkDisplay *display); /* Distributed display manager implementation */ -GdkDisplay *_gdk_win32_display_open (const gchar *display_name); +GdkDisplay *_gdk_win32_display_open (const char *display_name); void _gdk_win32_append_event (GdkEvent *event); void _gdk_win32_emit_configure_event (GdkSurface *window); diff --git a/gdk/win32/gdkproperty-win32.c b/gdk/win32/gdkproperty-win32.c index a5c9ade81a..0cbd3f0095 100644 --- a/gdk/win32/gdkproperty-win32.c +++ b/gdk/win32/gdkproperty-win32.c @@ -33,12 +33,12 @@ #include "gdkprivate-win32.h" #include "gdkwin32.h" -static gchar* +static char * _get_system_font_name (HDC hdc) { NONCLIENTMETRICSW ncm; PangoFontDescription *font_desc; - gchar *result, *font_desc_string; + char *result, *font_desc_string; int logpixelsy; int font_size; @@ -98,7 +98,7 @@ _get_system_font_name (HDC hdc) */ gboolean -_gdk_win32_get_setting (const gchar *name, +_gdk_win32_get_setting (const char *name, GValue *value) { /* @@ -188,7 +188,7 @@ _gdk_win32_get_setting (const gchar *name, } else if (strcmp ("gtk-font-name", name) == 0) { - gchar *font_name = _get_system_font_name (_gdk_display_hdc); + char *font_name = _get_system_font_name (_gdk_display_hdc); if (font_name) { diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c index 428311904b..06af6e8303 100644 --- a/gdk/win32/gdksurface-win32.c +++ b/gdk/win32/gdksurface-win32.c @@ -312,7 +312,7 @@ _gdk_win32_surface_enable_transparency (GdkSurface *window) return SUCCEEDED (call_result); } -static const gchar * +static const char * get_default_title (void) { const char *title; @@ -355,7 +355,7 @@ RegisterGdkClass (GdkSurfaceType wtype, GdkSurfaceTypeHint wtype_hint) /* initialize once! */ if (0 == hAppIcon && 0 == hAppIconSm) { - gchar sLoc [MAX_PATH+1]; + char sLoc [MAX_PATH+1]; if (0 != GetModuleFileName (_gdk_dll_hinstance, sLoc, MAX_PATH)) { @@ -486,7 +486,7 @@ _gdk_win32_display_create_surface (GdkDisplay *display, GdkWin32Surface *impl; GdkWin32Display *display_win32; GdkSurface *surface; - const gchar *title; + const char *title; wchar_t *wtitle; int window_width, window_height; int window_x, window_y; @@ -1529,7 +1529,7 @@ gdk_win32_surface_set_geometry_hints (GdkSurface *window, static void gdk_win32_surface_set_title (GdkSurface *window, - const gchar *title) + const char *title) { wchar_t *wtitle; @@ -2029,7 +2029,7 @@ _gdk_win32_surface_update_style_bits (GdkSurface *window) #if defined(MORE_AEROSNAP_DEBUGGING) static void -log_region (gchar *prefix, AeroSnapEdgeRegion *region) +log_region (char *prefix, AeroSnapEdgeRegion *region) { GDK_NOTE (MISC, g_print ("Region %s:\n" "edge %d x %d @ %d x %d\n" @@ -3456,7 +3456,7 @@ handle_aerosnap_move_resize (GdkSurface *window, } -static const gchar * +static const char * get_cursor_name_from_op (GdkW32WindowDragOp op, GdkSurfaceEdge edge) { @@ -3511,7 +3511,7 @@ setup_drag_move_resize_context (GdkSurface *window, guint32 timestamp) { RECT rect; - const gchar *cursor_name; + const char *cursor_name; GdkSurface *pointer_window; GdkWin32Surface *impl = GDK_WIN32_SURFACE (window); gboolean maximized = gdk_toplevel_get_state (GDK_TOPLEVEL (window)) & GDK_SURFACE_STATE_MAXIMIZED; diff --git a/gdk/win32/gdkwin32display.h b/gdk/win32/gdkwin32display.h index 6eebe6e76d..a91fe3e49d 100644 --- a/gdk/win32/gdkwin32display.h +++ b/gdk/win32/gdkwin32display.h @@ -54,7 +54,7 @@ GType gdk_win32_display_get_type (void); GDK_AVAILABLE_IN_ALL void gdk_win32_display_set_cursor_theme (GdkDisplay *display, - const gchar *name, + const char *name, int size); /** diff --git a/gdk/win32/xcursors.h b/gdk/win32/xcursors.h index 03e10d12e2..a7a95a2515 100644 --- a/gdk/win32/xcursors.h +++ b/gdk/win32/xcursors.h @@ -1,4 +1,4 @@ -static const struct { const gchar *name; const gchar *builtin; int type; guchar width; guchar height; guchar hotx; guchar hoty; gchar *data; } cursors[] = { +static const struct { const char *name; const char *builtin; int type; guchar width; guchar height; guchar hotx; guchar hoty; char *data; } cursors[] = { { "X_cursor", NULL, 0, 16, 16, 7, 7, "\125\000\000\125\152\100\001\251\152\220\006\251\152\244\032\251" "\032\251\152\244\006\252\252\220\001\252\252\100\000\152\251\000" diff --git a/gdk/x11/gdkapplaunchcontext-x11.c b/gdk/x11/gdkapplaunchcontext-x11.c index adc11bf4ec..b0a8985640 100644 --- a/gdk/x11/gdkapplaunchcontext-x11.c +++ b/gdk/x11/gdkapplaunchcontext-x11.c @@ -293,7 +293,7 @@ gdk_x11_app_launch_context_get_startup_notify_id (GAppLaunchContext *context, } else if (files_count == 1) { - gchar *display_name; + char *display_name; if (g_file_is_native (files->data)) fileinfo = g_file_query_info (files->data, @@ -389,7 +389,7 @@ gdk_x11_app_launch_context_get_startup_notify_id (GAppLaunchContext *context, static void gdk_x11_app_launch_context_launch_failed (GAppLaunchContext *context, - const gchar *startup_notify_id) + const char *startup_notify_id) { GdkAppLaunchContext *ctx; GdkX11Screen *screen; @@ -457,7 +457,7 @@ GdkAppLaunchContext * _gdk_x11_display_get_app_launch_context (GdkDisplay *display) { GdkAppLaunchContext *ctx; - const gchar *display_name; + const char *display_name; ctx = g_object_new (GDK_TYPE_X11_APP_LAUNCH_CONTEXT, "display", display, diff --git a/gdk/x11/gdkclipboard-x11.c b/gdk/x11/gdkclipboard-x11.c index af2434fbf4..404c8c7cd6 100644 --- a/gdk/x11/gdkclipboard-x11.c +++ b/gdk/x11/gdkclipboard-x11.c @@ -823,7 +823,7 @@ gdk_x11_clipboard_init (GdkX11Clipboard *cb) GdkClipboard * gdk_x11_clipboard_new (GdkDisplay *display, - const gchar *selection) + const char *selection) { GdkX11Clipboard *cb; diff --git a/gdk/x11/gdkclipboard-x11.h b/gdk/x11/gdkclipboard-x11.h index e4b82ee622..9eeea4a0c6 100644 --- a/gdk/x11/gdkclipboard-x11.h +++ b/gdk/x11/gdkclipboard-x11.h @@ -34,7 +34,7 @@ typedef struct _GdkX11Clipboard GdkX11Clipboard; GType gdk_x11_clipboard_get_type (void) G_GNUC_CONST; GdkClipboard * gdk_x11_clipboard_new (GdkDisplay *display, - const gchar *selection); + const char *selection); GSList * gdk_x11_clipboard_formats_to_targets (GdkContentFormats *formats); Atom * gdk_x11_clipboard_formats_to_atoms (GdkDisplay *display, diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c index bb05c01baf..3e99403954 100644 --- a/gdk/x11/gdkcursor-x11.c +++ b/gdk/x11/gdkcursor-x11.c @@ -184,8 +184,8 @@ gdk_x11_cursor_create_for_texture (GdkDisplay *display, return xcursor; } -static const gchar * -name_fallback (const gchar *name) +static const char * +name_fallback (const char *name) { int i; @@ -239,7 +239,7 @@ gdk_x11_cursor_create_for_texture (GdkDisplay *display, static Cursor gdk_x11_cursor_create_for_name (GdkDisplay *display, - const gchar *name) + const char *name) { int i; @@ -279,12 +279,12 @@ gdk_x11_cursor_create_for_name (GdkDisplay *display, */ void gdk_x11_display_set_cursor_theme (GdkDisplay *display, - const gchar *theme, + const char *theme, const int size) { #if defined(HAVE_XCURSOR) && defined(HAVE_XFIXES) && XFIXES_MAJOR >= 2 Display *xdisplay; - gchar *old_theme; + char *old_theme; int old_size; gpointer cursor, xcursor; GHashTableIter iter; diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c index ef63fb5c4d..51cd98a2a5 100644 --- a/gdk/x11/gdkdevicemanager-xi2.c +++ b/gdk/x11/gdkdevicemanager-xi2.c @@ -384,8 +384,8 @@ has_abs_axes (GdkDisplay *display, static gboolean get_device_ids (GdkDisplay *display, XIDeviceInfo *info, - gchar **vendor_id, - gchar **product_id) + char **vendor_id, + char **product_id) { gulong nitems, bytes_after; guint32 *data; @@ -474,7 +474,7 @@ create_device (GdkX11DeviceManagerXI2 *device_manager, GdkDeviceType type; GdkDevice *device; int num_touches = 0; - gchar *vendor_id = NULL, *product_id = NULL; + char *vendor_id = NULL, *product_id = NULL; if (dev->use == XIMasterKeyboard || dev->use == XISlaveKeyboard) input_source = GDK_SOURCE_KEYBOARD; @@ -485,7 +485,7 @@ create_device (GdkX11DeviceManagerXI2 *device_manager, input_source = touch_source; else { - gchar *tmp_name; + char *tmp_name; tmp_name = g_ascii_strdown (dev->name, -1); @@ -531,8 +531,8 @@ create_device (GdkX11DeviceManagerXI2 *device_manager, GDK_DISPLAY_NOTE (display, INPUT, ({ - const gchar *type_names[] = { "logical", "physical", "floating" }; - const gchar *source_names[] = { "mouse", "pen", "eraser", "cursor", "keyboard", "direct touch", "indirect touch", "trackpoint", "pad" }; + const char *type_names[] = { "logical", "physical", "floating" }; + const char *source_names[] = { "mouse", "pen", "eraser", "cursor", "keyboard", "direct touch", "indirect touch", "trackpoint", "pad" }; g_message ("input device:\n\tname: %s\n\ttype: %s\n\tsource: %s\n\thas cursor: %d\n\ttouches: %d", dev->name, type_names[type], diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index ab9a1ee949..8be698fa6e 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -1331,7 +1331,7 @@ gdk_event_init (GdkDisplay *display) static void set_sm_client_id (GdkDisplay *display, - const gchar *sm_client_id) + const char *sm_client_id) { GdkX11Display *display_x11 = GDK_X11_DISPLAY (display); @@ -1377,13 +1377,13 @@ gdk_display_setup_window_visual (GdkDisplay *display, * %NULL on error. **/ GdkDisplay * -gdk_x11_display_open (const gchar *display_name) +gdk_x11_display_open (const char *display_name) { Display *xdisplay; GdkDisplay *display; GdkX11Display *display_x11; int argc; - gchar *argv[1]; + char *argv[1]; XClassHint *class_hint; int ignore; int maj, min; @@ -1733,10 +1733,10 @@ gdk_internal_connection_watch (Display *display, gdk_remove_connection_handler ((GdkInternalConnection *)*watch_data); } -static const gchar * +static const char * gdk_x11_display_get_name (GdkDisplay *display) { - return (gchar *) DisplayString (GDK_X11_DISPLAY (display)->xdisplay); + return (char *) DisplayString (GDK_X11_DISPLAY (display)->xdisplay); } gboolean @@ -2093,7 +2093,7 @@ static void gdk_x11_display_make_default (GdkDisplay *display) { GdkX11Display *display_x11 = GDK_X11_DISPLAY (display); - const gchar *startup_id; + const char *startup_id; g_free (display_x11->startup_notification_id); display_x11->startup_notification_id = NULL; @@ -2257,9 +2257,9 @@ gdk_x11_display_broadcast_startup_message (GdkDisplay *display, static void gdk_x11_display_notify_startup_complete (GdkDisplay *display, - const gchar *startup_id) + const char *startup_id) { - gchar *free_this = NULL; + char *free_this = NULL; if (startup_id == NULL) { @@ -2329,7 +2329,7 @@ gdk_x11_display_get_user_time (GdkDisplay *display) * * Returns: the startup notification ID for @display */ -const gchar * +const char * gdk_x11_display_get_startup_notification_id (GdkDisplay *display) { return GDK_X11_DISPLAY (display)->startup_notification_id; @@ -2357,10 +2357,10 @@ gdk_x11_display_get_startup_notification_id (GdkDisplay *display) **/ void gdk_x11_display_set_startup_notification_id (GdkDisplay *display, - const gchar *startup_id) + const char *startup_id) { GdkX11Display *display_x11; - gchar *time_str; + char *time_str; display_x11 = GDK_X11_DISPLAY (display); @@ -2376,7 +2376,7 @@ gdk_x11_display_set_startup_notification_id (GdkDisplay *display, if (time_str != NULL) { gulong retval; - gchar *end; + char *end; errno = 0; /* Skip past the "_TIME" part */ @@ -2463,8 +2463,8 @@ _gdk_x11_display_error_event (GdkDisplay *display, if (!ignore) { - gchar buf[64]; - gchar *msg; + char buf[64]; + char *msg; XGetErrorText (display_x11->xdisplay, error->error_code, buf, 63); @@ -2735,7 +2735,7 @@ gdk_x11_display_error_trap_pop_ignored (GdkDisplay *display) * session management and the Inter-Client Communication Conventions Manual */ void -gdk_x11_set_sm_client_id (const gchar *sm_client_id) +gdk_x11_set_sm_client_id (const char *sm_client_id) { GSList *displays, *l; @@ -2893,7 +2893,7 @@ gdk_x11_display_get_window_colormap (GdkX11Display *display) static gboolean gdk_x11_display_get_setting (GdkDisplay *display, - const gchar *name, + const char *name, GValue *value) { return gdk_x11_screen_get_setting (GDK_X11_DISPLAY (display)->screen, name, value); diff --git a/gdk/x11/gdkdisplay-x11.h b/gdk/x11/gdkdisplay-x11.h index c3719e9ac5..58eafeca61 100644 --- a/gdk/x11/gdkdisplay-x11.h +++ b/gdk/x11/gdkdisplay-x11.h @@ -110,7 +110,7 @@ struct _GdkX11Display int primary_monitor; /* Startup notification */ - gchar *startup_notification_id; + char *startup_notification_id; /* Time of most recent user interaction. */ gulong user_time; diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c index 5e8e03fccb..291a892156 100644 --- a/gdk/x11/gdkdrag-x11.c +++ b/gdk/x11/gdkdrag-x11.c @@ -302,7 +302,7 @@ precache_target_list (GdkDrag *drag) atoms = gdk_content_formats_get_mime_types (formats, &n_atoms); _gdk_x11_precache_atoms (gdk_drag_get_display (drag), - (const gchar **) atoms, + (const char **) atoms, n_atoms); } @@ -805,7 +805,7 @@ get_client_window_at_coords (GdkSurfaceCache *cache, /* Utility functions */ static struct { - const gchar *name; + const char *name; GdkDragAction action; } xdnd_actions_table[] = { { "XdndActionCopy", GDK_ACTION_COPY }, diff --git a/gdk/x11/gdkdrop-x11.c b/gdk/x11/gdkdrop-x11.c index 628ac33d0e..7bbb6cc78f 100644 --- a/gdk/x11/gdkdrop-x11.c +++ b/gdk/x11/gdkdrop-x11.c @@ -257,7 +257,7 @@ gdk_x11_drop_finalize (GObject *object) static void print_target_list (GdkContentFormats *formats) { - gchar *name = gdk_content_formats_to_string (formats); + char *name = gdk_content_formats_to_string (formats); g_message ("DND formats: %s", name); g_free (name); } @@ -270,7 +270,7 @@ print_target_list (GdkContentFormats *formats) /* Utility functions */ static struct { - const gchar *name; + const char *name; GdkDragAction action; } xdnd_actions_table[] = { { "XdndActionCopy", GDK_ACTION_COPY }, diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c index dc4cd45e3c..689c6b330e 100644 --- a/gdk/x11/gdkkeys-x11.c +++ b/gdk/x11/gdkkeys-x11.c @@ -166,7 +166,7 @@ update_modmap (Display *display, GdkX11Keymap *keymap_x11) { static struct { - const gchar *name; + const char *name; Atom atom; GdkModifierType mask; } vmods[] = { diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h index eca7e4fcbd..eeae4abbe5 100644 --- a/gdk/x11/gdkprivate-x11.h +++ b/gdk/x11/gdkprivate-x11.h @@ -129,7 +129,7 @@ int _gdk_x11_display_text_property_to_utf8_list (GdkDisplay *display int format, const guchar *text, int length, - gchar ***list); + char ***list); char * gdk_x11_utf8_to_string_target (const char *utf8_str, gboolean return_latin1); @@ -186,11 +186,11 @@ GdkSurface * _gdk_x11_display_create_surface (GdkDisplay *display, GList * gdk_x11_display_get_toplevel_windows (GdkDisplay *display); void _gdk_x11_precache_atoms (GdkDisplay *display, - const gchar * const *atom_names, + const char * const *atom_names, int n_atoms); Atom _gdk_x11_get_xatom_for_display_printf (GdkDisplay *display, - const gchar *format, + const char *format, ...) G_GNUC_PRINTF (2, 3); GdkDrag *gdk_x11_drag_find (GdkDisplay *display, diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c index fd6ddca2fb..bbe916d5cc 100644 --- a/gdk/x11/gdkproperty-x11.c +++ b/gdk/x11/gdkproperty-x11.c @@ -77,7 +77,7 @@ lookup_cached_xatom (GdkDisplay *display, **/ Atom gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display, - const gchar *atom_name) + const char *atom_name) { Atom xatom = None; @@ -102,7 +102,7 @@ gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display, void _gdk_x11_precache_atoms (GdkDisplay *display, - const gchar * const *atom_names, + const char * const *atom_names, int n_atoms) { Atom *xatoms; @@ -147,7 +147,7 @@ _gdk_x11_precache_atoms (GdkDisplay *display, * Returns: name of the X atom; this string is owned by GDK, * so it shouldn’t be modified or freed. **/ -const gchar * +const char * gdk_x11_get_xatom_name_for_display (GdkDisplay *display, Atom xatom) @@ -197,7 +197,7 @@ gdk_x11_get_xatom_name_for_display (GdkDisplay *display, Atom _gdk_x11_get_xatom_for_display_printf (GdkDisplay *display, - const gchar *format, + const char *format, ...) { va_list args; diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c index 8b875dfc58..6a96389040 100644 --- a/gdk/x11/gdkscreen-x11.c +++ b/gdk/x11/gdkscreen-x11.c @@ -1061,7 +1061,7 @@ _gdk_x11_screen_window_manager_changed (GdkX11Screen *screen) gboolean gdk_x11_screen_get_setting (GdkX11Screen *x11_screen, - const gchar *name, + const char *name, GValue *value) { const GValue *setting; @@ -1305,7 +1305,7 @@ gdk_x11_screen_get_window_manager_name (GdkX11Screen *x11_screen) int format; gulong n_items; gulong bytes_after; - gchar *name; + char *name; name = NULL; @@ -1357,7 +1357,7 @@ gdk_x11_screen_class_init (GdkX11ScreenClass *klass) static guint32 get_netwm_cardinal_property (GdkX11Screen *x11_screen, - const gchar *name) + const char *name) { guint32 prop = 0; Atom type; diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c index 83cdd8c37a..26e1b589b5 100644 --- a/gdk/x11/gdkselection-x11.c +++ b/gdk/x11/gdkselection-x11.c @@ -59,12 +59,12 @@ gdk_x11_display_text_property_to_text_list (GdkDisplay *display, int format, const guchar *text, int length, - gchar ***list) + char ***list) { XTextProperty property; int count = 0; int res; - gchar **local_list; + char **local_list; g_return_val_if_fail (GDK_IS_DISPLAY (display), 0); if (list) @@ -101,7 +101,7 @@ gdk_x11_display_text_property_to_text_list (GdkDisplay *display, * gdk_x11_display_text_property_to_text_list(). */ void -gdk_x11_free_text_list (gchar **list) +gdk_x11_free_text_list (char **list) { g_return_if_fail (list != NULL); @@ -109,22 +109,22 @@ gdk_x11_free_text_list (gchar **list) } static int -make_list (const gchar *text, +make_list (const char *text, int length, gboolean latin1, - gchar ***list) + char ***list) { GSList *strings = NULL; int n_strings = 0; int i; - const gchar *p = text; - const gchar *q; + const char *p = text; + const char *q; GSList *tmp_list; GError *error = NULL; while (p < text + length) { - gchar *str; + char *str; q = p; while (*q && q < text + length) @@ -165,7 +165,7 @@ make_list (const gchar *text, if (list) { - *list = g_new (gchar *, n_strings + 1); + *list = g_new (char *, n_strings + 1); (*list)[n_strings] = NULL; } @@ -192,22 +192,22 @@ _gdk_x11_display_text_property_to_utf8_list (GdkDisplay *display, int format, const guchar *text, int length, - gchar ***list) + char ***list) { if (g_str_equal (encoding, "STRING")) { - return make_list ((gchar *)text, length, TRUE, list); + return make_list ((char *)text, length, TRUE, list); } else if (g_str_equal (encoding, "UTF8_STRING")) { - return make_list ((gchar *)text, length, FALSE, list); + return make_list ((char *)text, length, FALSE, list); } else { - gchar **local_list; + char **local_list; int local_count; int i; - const gchar *charset = NULL; + const char *charset = NULL; gboolean need_conversion = !g_get_charset (&charset); int count = 0; GError *error = NULL; @@ -221,7 +221,7 @@ _gdk_x11_display_text_property_to_utf8_list (GdkDisplay *display, length, &local_list); if (list) - *list = g_new (gchar *, local_count + 1); + *list = g_new (char *, local_count + 1); for (i=0; iencoding, "TEXT")) { GConverterResult result; - gchar *tmp, *latin1; + char *tmp, *latin1; tmp = g_strndup (inbuf, inbuf_size); latin1 = gdk_x11_utf8_to_string_target (tmp, TRUE); diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c index ecb9ea6b6f..6d18060a9e 100644 --- a/gdk/x11/gdkvisual-x11.c +++ b/gdk/x11/gdkvisual-x11.c @@ -198,7 +198,7 @@ _gdk_x11_screen_init_visuals (GdkX11Screen *x11_screen, #ifdef G_ENABLE_DEBUG if (GDK_DISPLAY_DEBUG_CHECK (GDK_SCREEN_DISPLAY (x11_screen), MISC)) { - static const gchar *const visual_names[] = + static const char *const visual_names[] = { "static gray", "grayscale", diff --git a/gdk/x11/gdkx11display.h b/gdk/x11/gdkx11display.h index 0eb84a8025..a84247fd00 100644 --- a/gdk/x11/gdkx11display.h +++ b/gdk/x11/gdkx11display.h @@ -81,17 +81,17 @@ GDK_AVAILABLE_IN_ALL guint32 gdk_x11_display_get_user_time (GdkDisplay *display); GDK_AVAILABLE_IN_ALL -const gchar * gdk_x11_display_get_startup_notification_id (GdkDisplay *display); +const char * gdk_x11_display_get_startup_notification_id (GdkDisplay *display); GDK_AVAILABLE_IN_ALL void gdk_x11_display_set_startup_notification_id (GdkDisplay *display, - const gchar *startup_id); + const char *startup_id); GDK_AVAILABLE_IN_ALL void gdk_x11_display_set_program_class (GdkDisplay *display, const char *program_class); GDK_AVAILABLE_IN_ALL void gdk_x11_display_set_cursor_theme (GdkDisplay *display, - const gchar *theme, + const char *theme, const int size); GDK_AVAILABLE_IN_ALL @@ -126,7 +126,7 @@ GDK_AVAILABLE_IN_ALL void gdk_x11_display_error_trap_pop_ignored (GdkDisplay *display); GDK_AVAILABLE_IN_ALL -void gdk_x11_set_sm_client_id (const gchar *sm_client_id); +void gdk_x11_set_sm_client_id (const char *sm_client_id); G_END_DECLS diff --git a/gdk/x11/gdkx11property.h b/gdk/x11/gdkx11property.h index 5275c61214..905711cb76 100644 --- a/gdk/x11/gdkx11property.h +++ b/gdk/x11/gdkx11property.h @@ -38,9 +38,9 @@ G_BEGIN_DECLS GDK_AVAILABLE_IN_ALL Atom gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display, - const gchar *atom_name); + const char *atom_name); GDK_AVAILABLE_IN_ALL -const gchar * gdk_x11_get_xatom_name_for_display (GdkDisplay *display, +const char * gdk_x11_get_xatom_name_for_display (GdkDisplay *display, Atom xatom); G_END_DECLS diff --git a/gdk/x11/gdkx11selection.h b/gdk/x11/gdkx11selection.h index 7fd9f73892..2b012e0685 100644 --- a/gdk/x11/gdkx11selection.h +++ b/gdk/x11/gdkx11selection.h @@ -42,9 +42,9 @@ int gdk_x11_display_text_property_to_text_list (GdkDisplay *display, int format, const guchar *text, int length, - gchar ***list); + char ***list); GDK_AVAILABLE_IN_ALL -void gdk_x11_free_text_list (gchar **list); +void gdk_x11_free_text_list (char **list); GDK_AVAILABLE_IN_ALL int gdk_x11_display_string_to_compound_text (GdkDisplay *display, const char *str, diff --git a/gdk/x11/gdkx11surface.h b/gdk/x11/gdkx11surface.h index f2be036d38..63b11ecf04 100644 --- a/gdk/x11/gdkx11surface.h +++ b/gdk/x11/gdkx11surface.h @@ -60,8 +60,8 @@ void gdk_x11_surface_set_user_time (GdkSurface *surface, guint32 timestamp); GDK_AVAILABLE_IN_ALL void gdk_x11_surface_set_utf8_property (GdkSurface *surface, - const gchar *name, - const gchar *value); + const char *name, + const char *value); GDK_AVAILABLE_IN_ALL void gdk_x11_surface_set_theme_variant (GdkSurface *surface, const char *variant); diff --git a/gdk/x11/gdkxftdefaults.c b/gdk/x11/gdkxftdefaults.c index 2d3709c97c..226bbcd985 100644 --- a/gdk/x11/gdkxftdefaults.c +++ b/gdk/x11/gdkxftdefaults.c @@ -57,7 +57,7 @@ static int parse_boolean (char *v) { - gchar c0, c1; + char c0, c1; c0 = *v; if (g_ascii_isupper ((int)c0)) @@ -82,11 +82,11 @@ parse_boolean (char *v) static gboolean get_boolean_default (GdkX11Screen *x11_screen, - const gchar *option, + const char *option, gboolean *value) { Display *dpy = GDK_SCREEN_XDISPLAY (x11_screen); - gchar *v; + char *v; int i; if (GDK_DISPLAY_DEBUG_CHECK (GDK_SCREEN_DISPLAY (x11_screen), DEFAULT_SETTINGS)) @@ -108,11 +108,11 @@ get_boolean_default (GdkX11Screen *x11_screen, static gboolean get_double_default (GdkX11Screen *x11_screen, - const gchar *option, + const char *option, gdouble *value) { Display *dpy = GDK_SCREEN_XDISPLAY (x11_screen); - gchar *v, *e; + char *v, *e; if (GDK_DISPLAY_DEBUG_CHECK (GDK_SCREEN_DISPLAY (x11_screen), DEFAULT_SETTINGS)) return FALSE; @@ -135,11 +135,11 @@ get_double_default (GdkX11Screen *x11_screen, static gboolean get_integer_default (GdkX11Screen *x11_screen, - const gchar *option, + const char *option, int *value) { Display *dpy = GDK_SCREEN_XDISPLAY (x11_screen); - gchar *v, *e; + char *v, *e; if (GDK_DISPLAY_DEBUG_CHECK (GDK_SCREEN_DISPLAY (x11_screen), DEFAULT_SETTINGS)) return FALSE; diff --git a/gsk/gskrendernode.c b/gsk/gskrendernode.c index 2a614fd9ca..92dfc77e2f 100644 --- a/gsk/gskrendernode.c +++ b/gsk/gskrendernode.c @@ -115,7 +115,7 @@ value_render_node_collect_value (GValue *value, return NULL; } -static gchar * +static char * value_render_node_lcopy_value (const GValue *value, guint n_collect_values, GTypeCValue *collect_values, diff --git a/gtk/a11y/gtkaccessibilityutil.c b/gtk/a11y/gtkaccessibilityutil.c index 8414776bb3..78bef37c3b 100644 --- a/gtk/a11y/gtkaccessibilityutil.c +++ b/gtk/a11y/gtkaccessibilityutil.c @@ -84,13 +84,13 @@ get_root (void) return root; } -static const gchar * +static const char * get_toolkit_name (void) { return "gtk"; } -static const gchar * +static const char * get_toolkit_version (void) { return GTK_VERSION; diff --git a/gtk/a11y/gtkbooleancellaccessible.c b/gtk/a11y/gtkbooleancellaccessible.c index 3074c9f65f..634bfd449d 100644 --- a/gtk/a11y/gtkbooleancellaccessible.c +++ b/gtk/a11y/gtkbooleancellaccessible.c @@ -35,7 +35,7 @@ gtk_boolean_cell_accessible_get_n_actions (AtkAction *action) return parent_action_iface->get_n_actions (action) + 1; } -static const gchar * +static const char * gtk_boolean_cell_accessible_get_description (AtkAction *action, int i) { @@ -45,7 +45,7 @@ gtk_boolean_cell_accessible_get_description (AtkAction *action, return parent_action_iface->get_description (action, i - 1); } -static const gchar * +static const char * gtk_boolean_cell_accessible_action_get_name (AtkAction *action, int i) { @@ -55,7 +55,7 @@ gtk_boolean_cell_accessible_action_get_name (AtkAction *action, return parent_action_iface->get_description (action, i - 1); } -static const gchar * +static const char * gtk_boolean_cell_accessible_action_get_localized_name (AtkAction *action, int i) { diff --git a/gtk/a11y/gtkbuttonaccessible.c b/gtk/a11y/gtkbuttonaccessible.c index 3afd64644f..b01d5ceefb 100644 --- a/gtk/a11y/gtkbuttonaccessible.c +++ b/gtk/a11y/gtkbuttonaccessible.c @@ -102,10 +102,10 @@ get_label_from_button (GtkWidget *button) return child; } -static const gchar * +static const char * gtk_button_accessible_get_name (AtkObject *obj) { - const gchar *name = NULL; + const char *name = NULL; GtkWidget *widget; GtkWidget *child; @@ -228,11 +228,11 @@ gtk_button_accessible_get_n_actions (AtkAction *action) return 1; } -static const gchar * +static const char * gtk_button_accessible_get_keybinding (AtkAction *action, int i) { - gchar *return_value = NULL; + char *return_value = NULL; GtkWidget *widget; GtkWidget *label; guint key_val; @@ -282,7 +282,7 @@ gtk_button_accessible_get_keybinding (AtkAction *action, return return_value; } -static const gchar * +static const char * gtk_button_accessible_action_get_name (AtkAction *action, int i) { @@ -291,7 +291,7 @@ gtk_button_accessible_action_get_name (AtkAction *action, return NULL; } -static const gchar * +static const char * gtk_button_accessible_action_get_localized_name (AtkAction *action, int i) { @@ -300,7 +300,7 @@ gtk_button_accessible_action_get_localized_name (AtkAction *action, return NULL; } -static const gchar * +static const char * gtk_button_accessible_action_get_description (AtkAction *action, int i) { @@ -320,7 +320,7 @@ atk_action_interface_init (AtkActionIface *iface) iface->get_description = gtk_button_accessible_action_get_description; } -static const gchar * +static const char * gtk_button_accessible_get_image_description (AtkImage *image) { GtkWidget *widget; @@ -405,7 +405,7 @@ gtk_button_accessible_get_image_size (AtkImage *image, static gboolean gtk_button_accessible_set_image_description (AtkImage *image, - const gchar *description) + const char *description) { GtkWidget *widget; GtkWidget *button_image; diff --git a/gtk/a11y/gtkcellaccessible.c b/gtk/a11y/gtkcellaccessible.c index 51bff40d29..71ef303ea3 100644 --- a/gtk/a11y/gtkcellaccessible.c +++ b/gtk/a11y/gtkcellaccessible.c @@ -230,7 +230,7 @@ gtk_cell_accessible_action_get_n_actions (AtkAction *action) return 3; } -static const gchar * +static const char * gtk_cell_accessible_action_get_name (AtkAction *action, int index) { @@ -247,7 +247,7 @@ gtk_cell_accessible_action_get_name (AtkAction *action, } } -static const gchar * +static const char * gtk_cell_accessible_action_get_localized_name (AtkAction *action, int index) { @@ -264,7 +264,7 @@ gtk_cell_accessible_action_get_localized_name (AtkAction *action, } } -static const gchar * +static const char * gtk_cell_accessible_action_get_description (AtkAction *action, int index) { @@ -281,7 +281,7 @@ gtk_cell_accessible_action_get_description (AtkAction *action, } } -static const gchar * +static const char * gtk_cell_accessible_action_get_keybinding (AtkAction *action, int index) { diff --git a/gtk/a11y/gtkcolorswatchaccessible.c b/gtk/a11y/gtkcolorswatchaccessible.c index 5ee14822b8..8ea77a6590 100644 --- a/gtk/a11y/gtkcolorswatchaccessible.c +++ b/gtk/a11y/gtkcolorswatchaccessible.c @@ -122,14 +122,14 @@ gtk_color_swatch_accessible_get_n_actions (AtkAction *action) return 3; } -static const gchar * +static const char * gtk_color_swatch_accessible_get_keybinding (AtkAction *action, int i) { return NULL; } -static const gchar * +static const char * gtk_color_swatch_accessible_get_name (AtkAction *action, int i) { @@ -142,7 +142,7 @@ gtk_color_swatch_accessible_get_name (AtkAction *action, } } -static const gchar * +static const char * gtk_color_swatch_accessible_get_localized_name (AtkAction *action, int i) { @@ -155,7 +155,7 @@ gtk_color_swatch_accessible_get_localized_name (AtkAction *action, } } -static const gchar * +static const char * gtk_color_swatch_accessible_get_description (AtkAction *action, int i) { diff --git a/gtk/a11y/gtkcomboboxaccessible.c b/gtk/a11y/gtkcomboboxaccessible.c index 2b29ad7457..454b4730f3 100644 --- a/gtk/a11y/gtkcomboboxaccessible.c +++ b/gtk/a11y/gtkcomboboxaccessible.c @@ -23,7 +23,7 @@ struct _GtkComboBoxAccessiblePrivate { - gchar *name; + char *name; int old_selection; gboolean popup_set; }; @@ -95,14 +95,14 @@ gtk_combo_box_accessible_finalize (GObject *object) G_OBJECT_CLASS (gtk_combo_box_accessible_parent_class)->finalize (object); } -static const gchar * +static const char * gtk_combo_box_accessible_get_name (AtkObject *obj) { GtkWidget *widget; GtkComboBox *combo_box; GtkComboBoxAccessible *accessible; GtkTreeIter iter; - const gchar *name; + const char *name; GtkTreeModel *model; int n_columns; int i; @@ -248,7 +248,7 @@ gtk_combo_box_accessible_get_n_actions (AtkAction *action) return 1; } -static const gchar * +static const char * gtk_combo_box_accessible_get_keybinding (AtkAction *action, int i) { @@ -260,7 +260,7 @@ gtk_combo_box_accessible_get_keybinding (AtkAction *action, GPtrArray *target; gpointer target_object; guint key_val; - gchar *return_value = NULL; + char *return_value = NULL; if (i != 0) return NULL; @@ -293,7 +293,7 @@ gtk_combo_box_accessible_get_keybinding (AtkAction *action, return return_value; } -static const gchar * +static const char * gtk_combo_box_accessible_action_get_name (AtkAction *action, int i) { @@ -302,7 +302,7 @@ gtk_combo_box_accessible_action_get_name (AtkAction *action, return NULL; } -static const gchar * +static const char * gtk_combo_box_accessible_action_get_localized_name (AtkAction *action, int i) { @@ -311,7 +311,7 @@ gtk_combo_box_accessible_action_get_localized_name (AtkAction *action, return NULL; } -static const gchar * +static const char * gtk_combo_box_accessible_action_get_description (AtkAction *action, int i) { diff --git a/gtk/a11y/gtkentryaccessible.c b/gtk/a11y/gtkentryaccessible.c index 88a7ffcbcc..19eec7ef49 100644 --- a/gtk/a11y/gtkentryaccessible.c +++ b/gtk/a11y/gtkentryaccessible.c @@ -111,8 +111,8 @@ gtk_entry_icon_accessible_initialize (AtkObject *obj, GtkEntryIconAccessible *icon = GTK_ENTRY_ICON_ACCESSIBLE (obj); GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (icon->entry)); GtkEntry *gtk_entry = GTK_ENTRY (widget); - const gchar *name; - gchar *text; + const char *name; + char *text; ATK_OBJECT_CLASS (gtk_entry_icon_accessible_parent_class)->initialize (obj, data); atk_object_set_role (obj, ATK_ROLE_ICON); @@ -255,7 +255,7 @@ gtk_entry_icon_accessible_get_n_actions (AtkAction *action) return (gtk_entry_get_icon_activatable (gtk_entry, icon->pos) ? 1 : 0); } -static const gchar * +static const char * gtk_entry_icon_accessible_get_name (AtkAction *action, int i) { @@ -418,7 +418,7 @@ check_for_selection_change (GtkEntryAccessible *accessible, static void insert_text_cb (GtkEditable *editable, - gchar *new_text, + char *new_text, int new_text_length, int *position, GtkEntryAccessible *self) @@ -455,7 +455,7 @@ delete_text_cb (GtkEditable *editable, if (end < 0) { - gchar *text; + char *text; text = gtk_text_get_display_text (textw, 0, -1); end = g_utf8_strlen (text, -1); @@ -556,7 +556,7 @@ on_notify (GObject *gobject, { if (priv->icons[GTK_ENTRY_ICON_PRIMARY]) { - const gchar *name; + const char *name; name = gtk_entry_get_icon_name (GTK_ENTRY (widget), GTK_ENTRY_ICON_PRIMARY); if (name) atk_object_set_name (priv->icons[GTK_ENTRY_ICON_PRIMARY], name); @@ -566,7 +566,7 @@ on_notify (GObject *gobject, { if (priv->icons[GTK_ENTRY_ICON_SECONDARY]) { - const gchar *name; + const char *name; name = gtk_entry_get_icon_name (GTK_ENTRY (widget), GTK_ENTRY_ICON_SECONDARY); if (name) atk_object_set_name (priv->icons[GTK_ENTRY_ICON_SECONDARY], name); @@ -576,7 +576,7 @@ on_notify (GObject *gobject, { if (priv->icons[GTK_ENTRY_ICON_PRIMARY]) { - gchar *text; + char *text; text = gtk_entry_get_icon_tooltip_text (GTK_ENTRY (widget), GTK_ENTRY_ICON_PRIMARY); if (text) { @@ -593,7 +593,7 @@ on_notify (GObject *gobject, { if (priv->icons[GTK_ENTRY_ICON_SECONDARY]) { - gchar *text; + char *text; text = gtk_entry_get_icon_tooltip_text (GTK_ENTRY (widget), GTK_ENTRY_ICON_SECONDARY); if (text) { @@ -831,7 +831,7 @@ gtk_entry_accessible_init (GtkEntryAccessible *entry) ATK_OBJECT (entry)->role = ATK_ROLE_TEXT; } -static gchar * +static char * gtk_entry_accessible_get_text (AtkText *atk_text, int start_pos, int end_pos) @@ -846,7 +846,7 @@ gtk_entry_accessible_get_text (AtkText *atk_text, return gtk_text_get_display_text (text, start_pos, end_pos); } -static gchar * +static char * gtk_entry_accessible_get_text_before_offset (AtkText *atk_text, int offset, AtkTextBoundary boundary_type, @@ -865,7 +865,7 @@ gtk_entry_accessible_get_text_before_offset (AtkText *atk_text, start_offset, end_offset); } -static gchar * +static char * gtk_entry_accessible_get_text_at_offset (AtkText *atk_text, int offset, AtkTextBoundary boundary_type, @@ -884,7 +884,7 @@ gtk_entry_accessible_get_text_at_offset (AtkText *atk_text, start_offset, end_offset); } -static gchar * +static char * gtk_entry_accessible_get_text_after_offset (AtkText *atk_text, int offset, AtkTextBoundary boundary_type, @@ -1033,7 +1033,7 @@ gtk_entry_accessible_get_character_extents (AtkText *atk_text, { GtkText *textw; PangoRectangle char_rect; - gchar *entry_text; + char *entry_text; int index, x_layout, y_layout; GtkAllocation allocation; @@ -1065,7 +1065,7 @@ gtk_entry_accessible_get_offset_at_point (AtkText *atk_text, AtkCoordType coords) { GtkText *textw; - gchar *text; + char *text; int index, x_layout, y_layout; int x_local, y_local; glong offset; @@ -1118,7 +1118,7 @@ gtk_entry_accessible_get_n_selections (AtkText *text) return 0; } -static gchar * +static char * gtk_entry_accessible_get_selection (AtkText *text, int selection_num, int *start_pos, @@ -1216,8 +1216,8 @@ gtk_entry_accessible_get_character_at_offset (AtkText *atk_text, int offset) { GtkText *textw; - gchar *text; - gchar *index; + char *text; + char *index; gunichar result; result = '\0'; @@ -1265,7 +1265,7 @@ atk_text_interface_init (AtkTextIface *iface) static void gtk_entry_accessible_set_text_contents (AtkEditableText *text, - const gchar *string) + const char *string) { GtkWidget *widget; @@ -1281,7 +1281,7 @@ gtk_entry_accessible_set_text_contents (AtkEditableText *text, static void gtk_entry_accessible_insert_text (AtkEditableText *text, - const gchar *string, + const char *string, int length, int *position) { @@ -1307,7 +1307,7 @@ gtk_entry_accessible_copy_text (AtkEditableText *text, { GtkWidget *widget; GtkEditable *editable; - gchar *str; + char *str; GdkClipboard *clipboard; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); @@ -1328,7 +1328,7 @@ gtk_entry_accessible_cut_text (AtkEditableText *text, { GtkWidget *widget; GtkEditable *editable; - gchar *str; + char *str; GdkClipboard *clipboard; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); @@ -1453,7 +1453,7 @@ gtk_entry_accessible_get_n_actions (AtkAction *action) return 1; } -static const gchar * +static const char * gtk_entry_accessible_get_keybinding (AtkAction *action, int i) { @@ -1498,7 +1498,7 @@ gtk_entry_accessible_get_keybinding (AtkAction *action, return NULL; } -static const gchar* +static const char * gtk_entry_accessible_action_get_name (AtkAction *action, int i) { @@ -1507,7 +1507,7 @@ gtk_entry_accessible_action_get_name (AtkAction *action, return NULL; } -static const gchar* +static const char * gtk_entry_accessible_action_get_localized_name (AtkAction *action, int i) { @@ -1516,7 +1516,7 @@ gtk_entry_accessible_action_get_localized_name (AtkAction *action, return NULL; } -static const gchar* +static const char * gtk_entry_accessible_action_get_description (AtkAction *action, int i) { diff --git a/gtk/a11y/gtkexpanderaccessible.c b/gtk/a11y/gtkexpanderaccessible.c index 8644675d11..1610363beb 100644 --- a/gtk/a11y/gtkexpanderaccessible.c +++ b/gtk/a11y/gtkexpanderaccessible.c @@ -27,7 +27,7 @@ static void atk_action_interface_init (AtkActionIface *iface); G_DEFINE_TYPE_WITH_CODE (GtkExpanderAccessible, gtk_expander_accessible, GTK_TYPE_WIDGET_ACCESSIBLE, G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)) -static const gchar * +static const char * gtk_expander_accessible_get_full_text (GtkExpander *widget) { GtkWidget *label_widget; @@ -40,11 +40,11 @@ gtk_expander_accessible_get_full_text (GtkExpander *widget) return gtk_label_get_text (GTK_LABEL (label_widget)); } -static const gchar * +static const char * gtk_expander_accessible_get_name (AtkObject *obj) { GtkWidget *widget; - const gchar *name; + const char *name; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); if (widget == NULL) @@ -184,11 +184,11 @@ gtk_expander_accessible_get_n_actions (AtkAction *action) return 1; } -static const gchar * +static const char * gtk_expander_accessible_get_keybinding (AtkAction *action, int i) { - gchar *return_value = NULL; + char *return_value = NULL; GtkWidget *widget; GtkWidget *label; @@ -212,7 +212,7 @@ gtk_expander_accessible_get_keybinding (AtkAction *action, return return_value; } -static const gchar * +static const char * gtk_expander_accessible_action_get_name (AtkAction *action, int i) { @@ -221,7 +221,7 @@ gtk_expander_accessible_action_get_name (AtkAction *action, return NULL; } -static const gchar * +static const char * gtk_expander_accessible_action_get_localized_name (AtkAction *action, int i) { @@ -230,7 +230,7 @@ gtk_expander_accessible_action_get_localized_name (AtkAction *action, return NULL; } -static const gchar * +static const char * gtk_expander_accessible_action_get_description (AtkAction *action, int i) { diff --git a/gtk/a11y/gtkframeaccessible.c b/gtk/a11y/gtkframeaccessible.c index 7f80a7b813..7c59bb237f 100644 --- a/gtk/a11y/gtkframeaccessible.c +++ b/gtk/a11y/gtkframeaccessible.c @@ -33,10 +33,10 @@ gtk_frame_accessible_initialize (AtkObject *accessible, accessible->role = ATK_ROLE_PANEL; } -static const gchar * +static const char * gtk_frame_accessible_get_name (AtkObject *obj) { - const gchar *name; + const char *name; GtkWidget *widget; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); diff --git a/gtk/a11y/gtkiconviewaccessible.c b/gtk/a11y/gtkiconviewaccessible.c index 4a4fd8e9a1..ded31c5e2b 100644 --- a/gtk/a11y/gtkiconviewaccessible.c +++ b/gtk/a11y/gtkiconviewaccessible.c @@ -45,9 +45,9 @@ typedef struct GtkIconViewItem *item; GtkWidget *widget; AtkStateSet *state_set; - gchar *text; - gchar *action_description; - gchar *image_description; + char *text; + char *action_description; + char *image_description; guint action_idle_handler; } GtkIconViewItemAccessible; @@ -126,7 +126,7 @@ gtk_icon_view_item_accessible_get_n_actions (AtkAction *action) return 1; } -static const gchar * +static const char * gtk_icon_view_item_accessible_get_description (AtkAction *action, int i) { @@ -143,7 +143,7 @@ gtk_icon_view_item_accessible_get_description (AtkAction *action, return "Activate item"; } -static const gchar * +static const char * gtk_icon_view_item_accessible_get_name (AtkAction *action, int i) { @@ -156,7 +156,7 @@ gtk_icon_view_item_accessible_get_name (AtkAction *action, static gboolean gtk_icon_view_item_accessible_set_description (AtkAction *action, int i, - const gchar *description) + const char *description) { GtkIconViewItemAccessible *item; @@ -181,7 +181,7 @@ atk_action_item_interface_init (AtkActionIface *iface) iface->get_description = gtk_icon_view_item_accessible_get_description; } -static const gchar * +static const char * gtk_icon_view_item_accessible_get_image_description (AtkImage *image) { GtkIconViewItemAccessible *item; @@ -193,7 +193,7 @@ gtk_icon_view_item_accessible_get_image_description (AtkImage *image) static gboolean gtk_icon_view_item_accessible_set_image_description (AtkImage *image, - const gchar *description) + const char *description) { GtkIconViewItemAccessible *item; @@ -247,7 +247,7 @@ get_pixbuf_box (GtkIconView *icon_view, static gboolean get_text_foreach (GtkCellRenderer *renderer, - gchar **text) + char **text) { if (GTK_IS_CELL_RENDERER_TEXT (renderer)) { @@ -257,11 +257,11 @@ get_text_foreach (GtkCellRenderer *renderer, return FALSE; } -static gchar * +static char * get_text (GtkIconView *icon_view, GtkIconViewItem *item) { - gchar *text = NULL; + char *text = NULL; _gtk_icon_view_set_cell_data (icon_view, item); gtk_cell_area_foreach (icon_view->priv->cell_area, @@ -334,7 +334,7 @@ atk_image_item_interface_init (AtkImageIface *iface) iface->get_image_position = gtk_icon_view_item_accessible_get_image_position; } -static gchar * +static char * gtk_icon_view_item_accessible_get_text (AtkText *text, int start_pos, int end_pos) @@ -356,8 +356,8 @@ gtk_icon_view_item_accessible_get_character_at_offset (AtkText *text, int offset) { GtkIconViewItemAccessible *item; - gchar *string; - gchar *index; + char *string; + char *index; item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text); if (atk_state_set_contains_state (item->state_set, ATK_STATE_DEFUNCT)) @@ -386,7 +386,7 @@ create_pango_layout (GtkIconViewItemAccessible *item) return layout; } -static gchar * +static char * gtk_icon_view_item_accessible_get_text_before_offset (AtkText *atk_text, int offset, AtkTextBoundary boundary_type, @@ -395,7 +395,7 @@ gtk_icon_view_item_accessible_get_text_before_offset (AtkText *atk_text, { GtkIconViewItemAccessible *item; PangoLayout *layout; - gchar *text; + char *text; item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (atk_text); if (atk_state_set_contains_state (item->state_set, ATK_STATE_DEFUNCT)) @@ -408,7 +408,7 @@ gtk_icon_view_item_accessible_get_text_before_offset (AtkText *atk_text, return text; } -static gchar * +static char * gtk_icon_view_item_accessible_get_text_at_offset (AtkText *atk_text, int offset, AtkTextBoundary boundary_type, @@ -417,7 +417,7 @@ gtk_icon_view_item_accessible_get_text_at_offset (AtkText *atk_text, { GtkIconViewItemAccessible *item; PangoLayout *layout; - gchar *text; + char *text; item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (atk_text); if (atk_state_set_contains_state (item->state_set, ATK_STATE_DEFUNCT)) @@ -430,7 +430,7 @@ gtk_icon_view_item_accessible_get_text_at_offset (AtkText *atk_text, return text; } -static gchar * +static char * gtk_icon_view_item_accessible_get_text_after_offset (AtkText *atk_text, int offset, AtkTextBoundary boundary_type, @@ -439,7 +439,7 @@ gtk_icon_view_item_accessible_get_text_after_offset (AtkText *atk_text, { GtkIconViewItemAccessible *item; PangoLayout *layout; - gchar *text; + char *text; item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (atk_text); if (atk_state_set_contains_state (item->state_set, ATK_STATE_DEFUNCT)) @@ -480,7 +480,7 @@ gtk_icon_view_item_accessible_get_character_extents (AtkText *text, #if 0 GtkIconView *icon_view; PangoRectangle char_rect; - const gchar *item_text; + const char *item_text; int index; #endif @@ -520,7 +520,7 @@ gtk_icon_view_item_accessible_get_offset_at_point (AtkText *text, int offset = 0; #if 0 GtkIconView *icon_view; - const gchar *item_text; + const char *item_text; int index; int l_x, l_y; #endif diff --git a/gtk/a11y/gtkimageaccessible.c b/gtk/a11y/gtkimageaccessible.c index 98e6d5843d..a86a1074ef 100644 --- a/gtk/a11y/gtkimageaccessible.c +++ b/gtk/a11y/gtkimageaccessible.c @@ -25,8 +25,8 @@ struct _GtkImageAccessiblePrivate { - gchar *image_description; - gchar *stock_name; + char *image_description; + char *stock_name; }; static void atk_image_interface_init (AtkImageIface *iface); @@ -45,8 +45,8 @@ gtk_image_accessible_initialize (AtkObject *accessible, } typedef struct { - const gchar *name; - const gchar *label; + const char *name; + const char *label; } NameMapEntry; static const NameMapEntry name_map[] = { @@ -129,11 +129,11 @@ static const NameMapEntry name_map[] = { }; /* GTK+ internal methods */ -static gchar * -elide_underscores (const gchar *original) +static char * +elide_underscores (const char *original) { - gchar *q, *result; - const gchar *p, *end; + char *q, *result; + const char *p, *end; gsize len; gboolean last_underscore; @@ -172,11 +172,11 @@ elide_underscores (const gchar *original) return result; } -static gchar * -name_from_icon_name (const gchar *icon_name) +static char * +name_from_icon_name (const char *icon_name) { - gchar *name; - const gchar *label; + char *name; + const char *label; int i; name = g_strdup (icon_name); @@ -209,13 +209,13 @@ gtk_image_accessible_finalize (GObject *object) G_OBJECT_CLASS (gtk_image_accessible_parent_class)->finalize (object); } -static const gchar * +static const char * gtk_image_accessible_get_name (AtkObject *accessible) { GtkWidget* widget; GtkImage *image; GtkImageAccessible *image_accessible; - const gchar *name; + const char *name; GtkImageType storage_type; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)); @@ -241,7 +241,7 @@ gtk_image_accessible_get_name (AtkObject *accessible) else if (storage_type == GTK_IMAGE_GICON) { GIcon *icon; - const gchar * const *icon_names; + const char * const *icon_names; icon = gtk_image_get_gicon (image); if (G_IS_THEMED_ICON (icon)) @@ -271,7 +271,7 @@ gtk_image_accessible_init (GtkImageAccessible *image) image->priv = gtk_image_accessible_get_instance_private (image); } -static const gchar * +static const char * gtk_image_accessible_get_image_description (AtkImage *image) { GtkImageAccessible *accessible = GTK_IMAGE_ACCESSIBLE (image); @@ -318,7 +318,7 @@ gtk_image_accessible_get_image_size (AtkImage *image, static gboolean gtk_image_accessible_set_image_description (AtkImage *image, - const gchar *description) + const char *description) { GtkImageAccessible* accessible = GTK_IMAGE_ACCESSIBLE (image); diff --git a/gtk/a11y/gtkimagecellaccessible.c b/gtk/a11y/gtkimagecellaccessible.c index 56827237f7..4deb292cd6 100644 --- a/gtk/a11y/gtkimagecellaccessible.c +++ b/gtk/a11y/gtkimagecellaccessible.c @@ -22,7 +22,7 @@ struct _GtkImageCellAccessiblePrivate { - gchar *image_description; + char *image_description; }; static void atk_image_interface_init (AtkImageIface *iface); @@ -54,7 +54,7 @@ gtk_image_cell_accessible_init (GtkImageCellAccessible *image_cell) image_cell->priv = gtk_image_cell_accessible_get_instance_private (image_cell); } -static const gchar * +static const char * gtk_image_cell_accessible_get_image_description (AtkImage *image) { GtkImageCellAccessible *image_cell = GTK_IMAGE_CELL_ACCESSIBLE (image); @@ -64,7 +64,7 @@ gtk_image_cell_accessible_get_image_description (AtkImage *image) static gboolean gtk_image_cell_accessible_set_image_description (AtkImage *image, - const gchar *description) + const char *description) { GtkImageCellAccessible *image_cell = GTK_IMAGE_CELL_ACCESSIBLE (image); diff --git a/gtk/a11y/gtklabelaccessible.c b/gtk/a11y/gtklabelaccessible.c index 7c53c309f0..ce20a4fb5e 100644 --- a/gtk/a11y/gtklabelaccessible.c +++ b/gtk/a11y/gtklabelaccessible.c @@ -173,13 +173,13 @@ static void atk_action_interface_init (AtkActionIface *iface); G_DEFINE_TYPE_WITH_CODE (GtkLabelAccessibleLink, _gtk_label_accessible_link, ATK_TYPE_HYPERLINK, G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)) -static gchar * +static char * gtk_label_accessible_link_get_uri (AtkHyperlink *atk_link, int i) { GtkLabelAccessibleLink *link = (GtkLabelAccessibleLink *)atk_link; GtkWidget *widget; - const gchar *uri; + const char *uri; g_return_val_if_fail (i == 0, NULL); @@ -313,7 +313,7 @@ gtk_label_accessible_link_get_n_actions (AtkAction *action) return 1; } -static const gchar * +static const char * gtk_label_accessible_link_get_name (AtkAction *action, int i) { @@ -458,10 +458,10 @@ gtk_label_accessible_ref_relation_set (AtkObject *obj) return relation_set; } -static const gchar* +static const char * gtk_label_accessible_get_name (AtkObject *accessible) { - const gchar *name; + const char *name; g_return_val_if_fail (GTK_IS_LABEL_ACCESSIBLE (accessible), NULL); @@ -686,13 +686,13 @@ _gtk_label_accessible_focus_link_changed (GtkLabel *label) /* AtkText implementation {{{2 */ -static gchar* +static char * gtk_label_accessible_get_text (AtkText *atk_text, int start_pos, int end_pos) { GtkWidget *widget; - const gchar *text; + const char *text; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_text)); if (widget == NULL) @@ -703,7 +703,7 @@ gtk_label_accessible_get_text (AtkText *atk_text, if (text) { guint length; - const gchar *start, *end; + const char *start, *end; length = g_utf8_strlen (text, -1); if (end_pos < 0 || end_pos > length) @@ -720,7 +720,7 @@ gtk_label_accessible_get_text (AtkText *atk_text, return NULL; } -static gchar * +static char * gtk_label_accessible_get_text_before_offset (AtkText *text, int offset, AtkTextBoundary boundary_type, @@ -738,7 +738,7 @@ gtk_label_accessible_get_text_before_offset (AtkText *text, start_offset, end_offset); } -static gchar* +static char * gtk_label_accessible_get_text_at_offset (AtkText *text, int offset, AtkTextBoundary boundary_type, @@ -756,7 +756,7 @@ gtk_label_accessible_get_text_at_offset (AtkText *text, start_offset, end_offset); } -static gchar* +static char * gtk_label_accessible_get_text_after_offset (AtkText *text, int offset, AtkTextBoundary boundary_type, @@ -778,7 +778,7 @@ static int gtk_label_accessible_get_character_count (AtkText *atk_text) { GtkWidget *widget; - const gchar *text; + const char *text; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_text)); if (widget == NULL) @@ -844,7 +844,7 @@ gtk_label_accessible_get_n_selections (AtkText *text) return 0; } -static gchar * +static char * gtk_label_accessible_get_selection (AtkText *atk_text, int selection_num, int *start_pos, @@ -864,7 +864,7 @@ gtk_label_accessible_get_selection (AtkText *atk_text, if (gtk_label_get_selection_bounds (label, start_pos, end_pos)) { - const gchar *text; + const char *text; text = gtk_label_get_text (label); @@ -974,7 +974,7 @@ gtk_label_accessible_get_character_extents (AtkText *text, GtkWidget *widget; GtkLabel *label; PangoRectangle char_rect; - const gchar *label_text; + const char *label_text; int index, x_layout, y_layout; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); @@ -1003,7 +1003,7 @@ gtk_label_accessible_get_offset_at_point (AtkText *atk_text, { GtkWidget *widget; GtkLabel *label; - const gchar *text; + const char *text; int index, x_layout, y_layout; int x_local, y_local; @@ -1041,7 +1041,7 @@ gtk_label_accessible_get_offset_at_point (AtkText *atk_text, static AtkAttributeSet * add_attribute (AtkAttributeSet *attributes, AtkTextAttribute attr, - const gchar *value) + const char *value) { AtkAttribute *at; @@ -1105,8 +1105,8 @@ gtk_label_accessible_get_character_at_offset (AtkText *atk_text, int offset) { GtkWidget *widget; - const gchar *text; - gchar *index; + const char *text; + char *index; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_text)); if (widget == NULL) diff --git a/gtk/a11y/gtklevelbaraccessible.c b/gtk/a11y/gtklevelbaraccessible.c index 071845a167..a8054c204d 100644 --- a/gtk/a11y/gtklevelbaraccessible.c +++ b/gtk/a11y/gtklevelbaraccessible.c @@ -125,7 +125,7 @@ gtk_level_bar_accessible_set_current_value (AtkValue *obj, static void gtk_level_bar_accessible_get_value_and_text (AtkValue *obj, gdouble *value, - gchar **text) + char **text) { GtkWidget *widget; GtkLevelBar *level_bar; diff --git a/gtk/a11y/gtklinkbuttonaccessible.c b/gtk/a11y/gtklinkbuttonaccessible.c index 1a218940a1..f5738a78d3 100644 --- a/gtk/a11y/gtklinkbuttonaccessible.c +++ b/gtk/a11y/gtklinkbuttonaccessible.c @@ -58,13 +58,13 @@ gtk_link_button_accessible_link_new (GtkLinkButtonAccessible *button) return ATK_HYPERLINK (l); } -static gchar * +static char * gtk_link_button_accessible_link_get_uri (AtkHyperlink *atk_link, int i) { GtkLinkButtonAccessibleLink *l = (GtkLinkButtonAccessibleLink *)atk_link; GtkWidget *widget; - const gchar *uri; + const char *uri; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (l->button)); uri = gtk_link_button_get_uri (GTK_LINK_BUTTON (widget)); @@ -137,7 +137,7 @@ gtk_link_button_accessible_link_get_n_actions (AtkAction *action) return 1; } -static const gchar * +static const char * gtk_link_button_accessible_link_get_name (AtkAction *action, int i) { diff --git a/gtk/a11y/gtklockbuttonaccessible.c b/gtk/a11y/gtklockbuttonaccessible.c index 0e3216dcde..a7b878838c 100644 --- a/gtk/a11y/gtklockbuttonaccessible.c +++ b/gtk/a11y/gtklockbuttonaccessible.c @@ -24,7 +24,7 @@ G_DEFINE_TYPE (GtkLockButtonAccessible, gtk_lock_button_accessible, GTK_TYPE_BUTTON_ACCESSIBLE) -static const gchar * +static const char * gtk_lock_button_accessible_get_name (AtkObject *obj) { GtkLockButton *lockbutton; diff --git a/gtk/a11y/gtkmenubuttonaccessible.c b/gtk/a11y/gtkmenubuttonaccessible.c index 914fa704f5..cdd2792e06 100644 --- a/gtk/a11y/gtkmenubuttonaccessible.c +++ b/gtk/a11y/gtkmenubuttonaccessible.c @@ -60,10 +60,10 @@ gtk_menu_button_accessible_ref_child (AtkObject *obj, return accessible; } -static const gchar * +static const char * gtk_menu_button_accessible_get_name (AtkObject *obj) { - const gchar *name = NULL; + const char *name = NULL; GtkWidget *widget; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); diff --git a/gtk/a11y/gtknotebookpageaccessible.c b/gtk/a11y/gtknotebookpageaccessible.c index dfa199ad51..0d8c37ce9e 100644 --- a/gtk/a11y/gtknotebookpageaccessible.c +++ b/gtk/a11y/gtknotebookpageaccessible.c @@ -78,7 +78,7 @@ get_label_from_notebook_page (GtkNotebookPageAccessible *page) return find_label_child (child); } -static const gchar * +static const char * gtk_notebook_page_accessible_get_name (AtkObject *accessible) { GtkWidget *label; diff --git a/gtk/a11y/gtkpanedaccessible.c b/gtk/a11y/gtkpanedaccessible.c index 8d2791166a..475b65b626 100644 --- a/gtk/a11y/gtkpanedaccessible.c +++ b/gtk/a11y/gtkpanedaccessible.c @@ -144,7 +144,7 @@ gtk_paned_accessible_set_current_value (AtkValue *obj, static void gtk_paned_accessible_get_value_and_text (AtkValue *obj, gdouble *value, - gchar **text) + char **text) { GtkWidget *widget; GtkPaned *paned; diff --git a/gtk/a11y/gtkpasswordentryaccessible.c b/gtk/a11y/gtkpasswordentryaccessible.c index 9cb060ad22..350f681926 100644 --- a/gtk/a11y/gtkpasswordentryaccessible.c +++ b/gtk/a11y/gtkpasswordentryaccessible.c @@ -190,7 +190,7 @@ atk_text_interface_init (AtkTextIface *iface) static void gtk_password_entry_accessible_set_text_contents (AtkEditableText *text, - const gchar *string) + const char *string) { GtkWidget *widget; @@ -206,7 +206,7 @@ gtk_password_entry_accessible_set_text_contents (AtkEditableText *text, static void gtk_password_entry_accessible_insert_text (AtkEditableText *text, - const gchar *string, + const char *string, int length, int *position) { @@ -362,7 +362,7 @@ gtk_password_entry_accessible_get_n_actions (AtkAction *action) return n_actions; } -static const gchar * +static const char * gtk_password_entry_accessible_get_keybinding (AtkAction *action, int i) { @@ -407,7 +407,7 @@ gtk_password_entry_accessible_get_keybinding (AtkAction *action, return NULL; } -static const gchar * +static const char * gtk_password_entry_accessible_action_get_name (AtkAction *action, int i) { @@ -426,7 +426,7 @@ gtk_password_entry_accessible_action_get_name (AtkAction *action, return NULL; } -static const gchar* +static const char * gtk_password_entry_accessible_action_get_localized_name (AtkAction *action, int i) { @@ -438,7 +438,7 @@ gtk_password_entry_accessible_action_get_localized_name (AtkAction *action, return NULL; } -static const gchar * +static const char * gtk_password_entry_accessible_action_get_description (AtkAction *action, int i) { @@ -551,7 +551,7 @@ on_selection_bound_changed (GObject *gobject, static void insert_text_cb (GtkEditable *editable, - gchar *new_text, + char *new_text, int new_text_length, int *position, GtkPasswordEntryAccessible *self) diff --git a/gtk/a11y/gtkpictureaccessible.c b/gtk/a11y/gtkpictureaccessible.c index ce8b449557..7e4b10b3f0 100644 --- a/gtk/a11y/gtkpictureaccessible.c +++ b/gtk/a11y/gtkpictureaccessible.c @@ -33,7 +33,7 @@ struct _GtkPictureAccessibleClass GtkWidgetAccessibleClass parent_class; }; -static const gchar * +static const char * gtk_picture_accessible_get_image_description (AtkImage *image) { GtkWidget* widget; @@ -103,11 +103,11 @@ gtk_picture_accessible_initialize (AtkObject *accessible, accessible->role = ATK_ROLE_IMAGE; } -static const gchar * +static const char * gtk_picture_accessible_get_name (AtkObject *accessible) { GtkWidget* widget; - const gchar *name; + const char *name; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)); if (widget == NULL) diff --git a/gtk/a11y/gtkprogressbaraccessible.c b/gtk/a11y/gtkprogressbaraccessible.c index 99aaf95624..517f845184 100644 --- a/gtk/a11y/gtkprogressbaraccessible.c +++ b/gtk/a11y/gtkprogressbaraccessible.c @@ -79,7 +79,7 @@ gtk_progress_bar_accessible_get_minimum_value (AtkValue *obj, static void gtk_progress_bar_accessible_get_value_and_text (AtkValue *obj, gdouble *value, - gchar **text) + char **text) { GtkWidget *widget; diff --git a/gtk/a11y/gtkrangeaccessible.c b/gtk/a11y/gtkrangeaccessible.c index 5675e08c4b..8650f7c452 100644 --- a/gtk/a11y/gtkrangeaccessible.c +++ b/gtk/a11y/gtkrangeaccessible.c @@ -224,7 +224,7 @@ gtk_range_accessible_set_current_value (AtkValue *obj, static void gtk_range_accessible_get_value_and_text (AtkValue *obj, gdouble *value, - gchar **text) + char **text) { GtkWidget *widget; GtkAdjustment *adjustment; diff --git a/gtk/a11y/gtkscaleaccessible.c b/gtk/a11y/gtkscaleaccessible.c index 1a8be87793..b369b449a7 100644 --- a/gtk/a11y/gtkscaleaccessible.c +++ b/gtk/a11y/gtkscaleaccessible.c @@ -22,7 +22,7 @@ G_DEFINE_TYPE (GtkScaleAccessible, gtk_scale_accessible, GTK_TYPE_RANGE_ACCESSIBLE) -static const gchar * +static const char * gtk_scale_accessible_get_description (AtkObject *object) { GtkWidget *widget; diff --git a/gtk/a11y/gtkscalebuttonaccessible.c b/gtk/a11y/gtkscalebuttonaccessible.c index 33e01b2150..7c31735a21 100644 --- a/gtk/a11y/gtkscalebuttonaccessible.c +++ b/gtk/a11y/gtkscalebuttonaccessible.c @@ -158,7 +158,7 @@ gtk_scale_button_accessible_get_n_actions (AtkAction *action) return 2; } -static const gchar * +static const char * gtk_scale_button_accessible_get_description (AtkAction *action, int i) { @@ -173,7 +173,7 @@ gtk_scale_button_accessible_get_description (AtkAction *action, } } -static const gchar * +static const char * gtk_scale_button_accessible_action_get_name (AtkAction *action, int i) { @@ -188,7 +188,7 @@ gtk_scale_button_accessible_action_get_name (AtkAction *action, } } -static const gchar * +static const char * gtk_scale_button_accessible_action_get_localized_name (AtkAction *action, int i) { @@ -301,7 +301,7 @@ gtk_scale_button_accessible_set_current_value (AtkValue *obj, static void gtk_scale_button_accessible_get_value_and_text (AtkValue *obj, gdouble *value, - gchar **text) + char **text) { GtkWidget *widget; GtkAdjustment *adjustment; diff --git a/gtk/a11y/gtksearchentryaccessible.c b/gtk/a11y/gtksearchentryaccessible.c index 47b23e1167..27b009971e 100644 --- a/gtk/a11y/gtksearchentryaccessible.c +++ b/gtk/a11y/gtksearchentryaccessible.c @@ -94,7 +94,7 @@ check_for_selection_change (GtkSearchEntryAccessible *self, static void insert_text_cb (GtkEditable *editable, - gchar *new_text, + char *new_text, int new_text_length, int *position, GtkSearchEntryAccessible *self) @@ -278,7 +278,7 @@ gtk_search_entry_accessible_init (GtkSearchEntryAccessible *self) atk_object_set_name (atk_obj, _("Search")); } -static gchar * +static char * gtk_search_entry_accessible_get_text (AtkText *atk_text, int start_pos, int end_pos) @@ -291,7 +291,7 @@ gtk_search_entry_accessible_get_text (AtkText *atk_text, return gtk_text_get_display_text (text, start_pos, end_pos); } -static gchar * +static char * gtk_search_entry_accessible_get_text_before_offset (AtkText *atk_text, int offset, AtkTextBoundary boundary_type, @@ -308,7 +308,7 @@ gtk_search_entry_accessible_get_text_before_offset (AtkText *atk_text, start_offset, end_offset); } -static gchar * +static char * gtk_search_entry_accessible_get_text_at_offset (AtkText *atk_text, int offset, AtkTextBoundary boundary_type, @@ -325,7 +325,7 @@ gtk_search_entry_accessible_get_text_at_offset (AtkText *atk_text, start_offset, end_offset); } -static gchar * +static char * gtk_search_entry_accessible_get_text_after_offset (AtkText *atk_text, int offset, AtkTextBoundary boundary_type, @@ -537,7 +537,7 @@ gtk_search_entry_accessible_get_n_selections (AtkText *text) return 0; } -static gchar * +static char * gtk_search_entry_accessible_get_selection (AtkText *text, int selection_num, int *start_pos, @@ -693,7 +693,7 @@ atk_text_interface_init (AtkTextIface *iface) static void gtk_search_entry_accessible_set_text_contents (AtkEditableText *text, - const gchar *string) + const char *string) { GtkWidget *widget; @@ -709,7 +709,7 @@ gtk_search_entry_accessible_set_text_contents (AtkEditableText *text, static void gtk_search_entry_accessible_insert_text (AtkEditableText *text, - const gchar *string, + const char *string, int length, int *position) { @@ -909,7 +909,7 @@ gtk_search_entry_accessible_get_n_actions (AtkAction *action) return n_actions; } -static const gchar * +static const char * gtk_search_entry_accessible_get_keybinding (AtkAction *action, int i) { @@ -954,7 +954,7 @@ gtk_search_entry_accessible_get_keybinding (AtkAction *action, return NULL; } -static const gchar * +static const char * gtk_search_entry_accessible_action_get_name (AtkAction *action, int i) { @@ -973,7 +973,7 @@ gtk_search_entry_accessible_action_get_name (AtkAction *action, return NULL; } -static const gchar* +static const char * gtk_search_entry_accessible_action_get_localized_name (AtkAction *action, int i) { @@ -985,7 +985,7 @@ gtk_search_entry_accessible_action_get_localized_name (AtkAction *action, return NULL; } -static const gchar * +static const char * gtk_search_entry_accessible_action_get_description (AtkAction *action, int i) { diff --git a/gtk/a11y/gtkspinbuttonaccessible.c b/gtk/a11y/gtkspinbuttonaccessible.c index 01e2a15634..879a1eb132 100644 --- a/gtk/a11y/gtkspinbuttonaccessible.c +++ b/gtk/a11y/gtkspinbuttonaccessible.c @@ -202,7 +202,7 @@ gtk_spin_button_accessible_set_current_value (AtkValue *obj, static void gtk_spin_button_accessible_get_value_and_text (AtkValue *obj, gdouble *value, - gchar **text) + char **text) { GtkWidget *widget; GtkAdjustment *adjustment; diff --git a/gtk/a11y/gtkstatusbaraccessible.c b/gtk/a11y/gtkstatusbaraccessible.c index 95e2f02c98..b2be32a9b0 100644 --- a/gtk/a11y/gtkstatusbaraccessible.c +++ b/gtk/a11y/gtkstatusbaraccessible.c @@ -28,7 +28,7 @@ G_DEFINE_TYPE (GtkStatusbarAccessible, gtk_statusbar_accessible, GTK_TYPE_WIDGET static void text_changed (GtkStatusbar *statusbar, guint context_id, - const gchar *text, + const char *text, AtkObject *obj) { if (!obj->name) @@ -52,10 +52,10 @@ gtk_statusbar_accessible_initialize (AtkObject *obj, obj->role = ATK_ROLE_STATUSBAR; } -static const gchar * +static const char * gtk_statusbar_accessible_get_name (AtkObject *obj) { - const gchar *name; + const char *name; GtkWidget *widget; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); diff --git a/gtk/a11y/gtkswitchaccessible.c b/gtk/a11y/gtkswitchaccessible.c index 985321499f..1b63ee4806 100644 --- a/gtk/a11y/gtkswitchaccessible.c +++ b/gtk/a11y/gtkswitchaccessible.c @@ -72,7 +72,7 @@ gtk_switch_action_get_n_actions (AtkAction *action) return 1; } -static const gchar * +static const char * gtk_switch_action_get_name (AtkAction *action, int i) { @@ -81,7 +81,7 @@ gtk_switch_action_get_name (AtkAction *action, return NULL; } -static const gchar * +static const char * gtk_switch_action_get_localized_name (AtkAction *action, int i) { @@ -90,7 +90,7 @@ gtk_switch_action_get_localized_name (AtkAction *action, return NULL; } -static const gchar * +static const char * gtk_switch_action_get_description (AtkAction *action, int i) { diff --git a/gtk/a11y/gtktextaccessible.c b/gtk/a11y/gtktextaccessible.c index d71a7869b6..66f110aa46 100644 --- a/gtk/a11y/gtktextaccessible.c +++ b/gtk/a11y/gtktextaccessible.c @@ -38,7 +38,7 @@ struct _GtkTextAccessiblePrivate /* Callbacks */ static void insert_text_cb (GtkEditable *editable, - gchar *new_text, + char *new_text, int new_text_length, int *position); static void delete_text_cb (GtkEditable *editable, @@ -88,7 +88,7 @@ gtk_text_accessible_get_attributes (AtkObject *accessible) GtkWidget *widget; AtkAttributeSet *attributes; AtkAttribute *placeholder_text; - const gchar *text; + const char *text; attributes = ATK_OBJECT_CLASS (gtk_text_accessible_parent_class)->get_attributes (accessible); @@ -229,7 +229,7 @@ gtk_text_accessible_init (GtkTextAccessible *entry) entry->priv->selection_bound = 0; } -static gchar * +static char * gtk_text_accessible_get_text (AtkText *atk_text, int start_pos, int end_pos) @@ -243,7 +243,7 @@ gtk_text_accessible_get_text (AtkText *atk_text, return gtk_text_get_display_text (GTK_TEXT (widget), start_pos, end_pos); } -static gchar * +static char * gtk_text_accessible_get_text_before_offset (AtkText *text, int offset, AtkTextBoundary boundary_type, @@ -261,7 +261,7 @@ gtk_text_accessible_get_text_before_offset (AtkText *text, start_offset, end_offset); } -static gchar * +static char * gtk_text_accessible_get_text_at_offset (AtkText *text, int offset, AtkTextBoundary boundary_type, @@ -279,7 +279,7 @@ gtk_text_accessible_get_text_at_offset (AtkText *text, start_offset, end_offset); } -static gchar * +static char * gtk_text_accessible_get_text_after_offset (AtkText *text, int offset, AtkTextBoundary boundary_type, @@ -301,7 +301,7 @@ static int gtk_text_accessible_get_character_count (AtkText *atk_text) { GtkWidget *widget; - gchar *text; + char *text; glong char_count; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_text)); @@ -425,7 +425,7 @@ gtk_text_accessible_get_character_extents (AtkText *text, GtkWidget *widget; GtkText *entry; PangoRectangle char_rect; - gchar *entry_text; + char *entry_text; int index, x_layout, y_layout; GtkAllocation allocation; @@ -459,7 +459,7 @@ gtk_text_accessible_get_offset_at_point (AtkText *atk_text, { GtkWidget *widget; GtkText *entry; - gchar *text; + char *text; int index, x_layout, y_layout; int x_local, y_local; glong offset; @@ -513,7 +513,7 @@ gtk_text_accessible_get_n_selections (AtkText *text) return 0; } -static gchar * +static char * gtk_text_accessible_get_selection (AtkText *text, int selection_num, int *start_pos, @@ -611,8 +611,8 @@ gtk_text_accessible_get_character_at_offset (AtkText *atk_text, int offset) { GtkWidget *widget; - gchar *text; - gchar *index; + char *text; + char *index; gunichar result; result = '\0'; @@ -659,7 +659,7 @@ atk_text_interface_init (AtkTextIface *iface) static void gtk_text_accessible_set_text_contents (AtkEditableText *text, - const gchar *string) + const char *string) { GtkWidget *widget; @@ -675,7 +675,7 @@ gtk_text_accessible_set_text_contents (AtkEditableText *text, static void gtk_text_accessible_insert_text (AtkEditableText *text, - const gchar *string, + const char *string, int length, int *position) { @@ -701,7 +701,7 @@ gtk_text_accessible_copy_text (AtkEditableText *text, { GtkWidget *widget; GtkEditable *editable; - gchar *str; + char *str; GdkClipboard *clipboard; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); @@ -722,7 +722,7 @@ gtk_text_accessible_cut_text (AtkEditableText *text, { GtkWidget *widget; GtkEditable *editable; - gchar *str; + char *str; GdkClipboard *clipboard; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); @@ -822,7 +822,7 @@ atk_editable_text_interface_init (AtkEditableTextIface *iface) static void insert_text_cb (GtkEditable *editable, - gchar *new_text, + char *new_text, int new_text_length, int *position) { @@ -857,7 +857,7 @@ delete_text_cb (GtkEditable *editable, if (end < 0) { - gchar *text; + char *text; text = gtk_text_get_display_text (GTK_TEXT (editable), 0, -1); end = g_utf8_strlen (text, -1); @@ -932,7 +932,7 @@ gtk_text_accessible_get_n_actions (AtkAction *action) return 1; } -static const gchar * +static const char * gtk_text_accessible_get_keybinding (AtkAction *action, int i) { @@ -977,7 +977,7 @@ gtk_text_accessible_get_keybinding (AtkAction *action, return NULL; } -static const gchar* +static const char * gtk_text_accessible_action_get_name (AtkAction *action, int i) { @@ -986,7 +986,7 @@ gtk_text_accessible_action_get_name (AtkAction *action, return NULL; } -static const gchar* +static const char * gtk_text_accessible_action_get_localized_name (AtkAction *action, int i) { @@ -995,7 +995,7 @@ gtk_text_accessible_action_get_localized_name (AtkAction *action, return NULL; } -static const gchar* +static const char * gtk_text_accessible_action_get_description (AtkAction *action, int i) { diff --git a/gtk/a11y/gtktextcellaccessible.c b/gtk/a11y/gtktextcellaccessible.c index 9df1f41a20..7c51cb6480 100644 --- a/gtk/a11y/gtktextcellaccessible.c +++ b/gtk/a11y/gtktextcellaccessible.c @@ -26,33 +26,33 @@ struct _GtkTextCellAccessiblePrivate { - gchar *cell_text; + char *cell_text; int caret_pos; int cell_length; PangoLayout *layout; }; -static const gchar* gtk_text_cell_accessible_get_name (AtkObject *atk_obj); +static const char * gtk_text_cell_accessible_get_name (AtkObject *atk_obj); /* atktext.h */ -static gchar* gtk_text_cell_accessible_get_text (AtkText *text, +static char * gtk_text_cell_accessible_get_text (AtkText *text, int start_pos, int end_pos); static gunichar gtk_text_cell_accessible_get_character_at_offset (AtkText *text, int offset); -static gchar* gtk_text_cell_accessible_get_text_before_offset (AtkText *text, +static char * gtk_text_cell_accessible_get_text_before_offset (AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset); -static gchar* gtk_text_cell_accessible_get_text_at_offset (AtkText *text, +static char * gtk_text_cell_accessible_get_text_at_offset (AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset); -static gchar* gtk_text_cell_accessible_get_text_after_offset (AtkText *text, +static char * gtk_text_cell_accessible_get_text_after_offset (AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, @@ -121,7 +121,7 @@ gtk_text_cell_accessible_finalize (GObject *object) G_OBJECT_CLASS (gtk_text_cell_accessible_parent_class)->finalize (object); } -static const gchar * +static const char * gtk_text_cell_accessible_get_name (AtkObject *atk_obj) { GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (atk_obj); @@ -139,7 +139,7 @@ gtk_text_cell_accessible_update_cache (GtkCellAccessible *cell, GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (cell); AtkObject *obj = ATK_OBJECT (cell); int text_length; - gchar *text; + char *text; GtkCellRenderer *renderer; if (text_cell->priv->layout) @@ -201,12 +201,12 @@ gtk_text_cell_accessible_init (GtkTextCellAccessible *text_cell) text_cell->priv->caret_pos = -1; } -static gchar * +static char * gtk_text_cell_accessible_get_text (AtkText *atk_text, int start_pos, int end_pos) { - gchar *text; + char *text; text = GTK_TEXT_CELL_ACCESSIBLE (atk_text)->priv->cell_text; if (text) @@ -215,7 +215,7 @@ gtk_text_cell_accessible_get_text (AtkText *atk_text, return g_strdup (""); } -static gchar * +static char * gtk_text_cell_accessible_get_text_before_offset (AtkText *atk_text, int offset, AtkTextBoundary boundary_type, @@ -223,14 +223,14 @@ gtk_text_cell_accessible_get_text_before_offset (AtkText *atk_text, int *end_offset) { GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (atk_text); - gchar *text; + char *text; text = _gtk_pango_get_text_before (text_cell->priv->layout, boundary_type, offset, start_offset, end_offset); return text; } -static gchar * +static char * gtk_text_cell_accessible_get_text_at_offset (AtkText *atk_text, int offset, AtkTextBoundary boundary_type, @@ -238,14 +238,14 @@ gtk_text_cell_accessible_get_text_at_offset (AtkText *atk_text, int *end_offset) { GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (atk_text); - gchar *text; + char *text; text = _gtk_pango_get_text_at (text_cell->priv->layout, boundary_type, offset, start_offset, end_offset); return text; } -static gchar * +static char * gtk_text_cell_accessible_get_text_after_offset (AtkText *atk_text, int offset, AtkTextBoundary boundary_type, @@ -253,7 +253,7 @@ gtk_text_cell_accessible_get_text_after_offset (AtkText *atk_text, int *end_offset) { GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (atk_text); - gchar *text; + char *text; text = _gtk_pango_get_text_after (text_cell->priv->layout, boundary_type, offset, start_offset, end_offset); @@ -318,7 +318,7 @@ gtk_text_cell_accessible_get_run_attributes (AtkText *text, static AtkAttributeSet * add_attribute (AtkAttributeSet *attributes, AtkTextAttribute attr, - const gchar *value) + const char *value) { AtkAttribute *at; @@ -376,7 +376,7 @@ create_pango_layout (GtkTextCellAccessible *text) PangoFontDescription *font_desc; gboolean foreground_set, strikethrough_set, strikethrough; gboolean scale_set, underline_set, rise_set; - gchar *renderer_text; + char *renderer_text; gdouble scale; int rise; GtkRendererCellAccessible *gail_renderer; @@ -494,7 +494,7 @@ gtk_text_cell_accessible_get_character_extents (AtkText *text, AtkObject *parent; PangoRectangle char_rect; GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (text); - gchar *renderer_text; + char *renderer_text; gfloat xalign, yalign; int x_offset, y_offset, index; int xpad, ypad; @@ -572,7 +572,7 @@ gtk_text_cell_accessible_get_offset_at_point (AtkText *text, GtkWidget *widget; GdkRectangle rendered_rect; GtkTextCellAccessible *text_cell = GTK_TEXT_CELL_ACCESSIBLE (text); - gchar *renderer_text; + char *renderer_text; gfloat xalign, yalign; int x_offset, y_offset, index; int xpad, ypad; @@ -667,8 +667,8 @@ static gunichar gtk_text_cell_accessible_get_character_at_offset (AtkText *text, int offset) { - gchar *index; - gchar *string; + char *index; + char *string; string = GTK_TEXT_CELL_ACCESSIBLE(text)->priv->cell_text; diff --git a/gtk/a11y/gtktextviewaccessible.c b/gtk/a11y/gtktextviewaccessible.c index a937d88ab5..f6cf38fc48 100644 --- a/gtk/a11y/gtktextviewaccessible.c +++ b/gtk/a11y/gtktextviewaccessible.c @@ -41,7 +41,7 @@ struct _GtkTextViewAccessiblePrivate static void insert_text_cb (GtkTextBuffer *buffer, GtkTextIter *arg1, - gchar *arg2, + char *arg2, int arg3, gpointer user_data); static void delete_range_cb (GtkTextBuffer *buffer, @@ -178,7 +178,7 @@ gtk_text_view_accessible_init (GtkTextViewAccessible *accessible) accessible->priv = gtk_text_view_accessible_get_instance_private (accessible); } -static gchar * +static char * gtk_text_view_accessible_get_text (AtkText *text, int start_offset, int end_offset) @@ -200,7 +200,7 @@ gtk_text_view_accessible_get_text (AtkText *text, return gtk_text_buffer_get_text (buffer, &start, &end, FALSE); } -static gchar * +static char * gtk_text_view_accessible_get_text_after_offset (AtkText *text, int offset, AtkTextBoundary boundary_type, @@ -243,7 +243,7 @@ gtk_text_view_accessible_get_text_after_offset (AtkText *text, return gtk_text_buffer_get_slice (buffer, &start, &end, FALSE); } -static gchar * +static char * gtk_text_view_accessible_get_text_at_offset (AtkText *text, int offset, AtkTextBoundary boundary_type, @@ -288,7 +288,7 @@ gtk_text_view_accessible_get_text_at_offset (AtkText *text, return gtk_text_buffer_get_slice (buffer, &start, &end, FALSE); } -static gchar * +static char * gtk_text_view_accessible_get_text_before_offset (AtkText *text, int offset, AtkTextBoundary boundary_type, @@ -352,7 +352,7 @@ gtk_text_view_accessible_get_character_at_offset (AtkText *text, GtkWidget *widget; GtkTextIter start, end; GtkTextBuffer *buffer; - gchar *string; + char *string; gunichar unichar; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); @@ -521,7 +521,7 @@ gtk_text_view_accessible_get_character_extents (AtkText *text, static AtkAttributeSet * add_text_attribute (AtkAttributeSet *attributes, AtkTextAttribute attr, - gchar *value) + char *value) { AtkAttribute *at; @@ -538,7 +538,7 @@ add_text_int_attribute (AtkAttributeSet *attributes, int i) { - gchar *value; + char *value; value = g_strdup (atk_text_attribute_get_value (attr, i)); @@ -686,7 +686,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { GdkRGBA *rgba; - gchar *value; + char *value; g_object_get (tag, "foreground-rgba", &rgba, NULL); value = g_strdup_printf ("%u,%u,%u", @@ -709,7 +709,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { GdkRGBA *rgba; - gchar *value; + char *value; g_object_get (tag, "background-rgba", &rgba, NULL); value = g_strdup_printf ("%u,%u,%u", @@ -732,7 +732,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { - gchar *value; + char *value; g_object_get (tag, "family", &value, NULL); attrib_set = add_text_attribute (attrib_set, ATK_TEXT_ATTR_FAMILY_NAME, value); } @@ -749,7 +749,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { - gchar *value; + char *value; g_object_get (tag, "language", &value, NULL); attrib_set = add_text_attribute (attrib_set, ATK_TEXT_ATTR_LANGUAGE, value); } @@ -767,7 +767,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { int weight; - gchar *value; + char *value; g_object_get (tag, "weight", &weight, NULL); value = g_strdup_printf ("%d", weight); attrib_set = add_text_attribute (attrib_set, ATK_TEXT_ATTR_WEIGHT, value); @@ -797,7 +797,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, } if (val_set) { - gchar *value; + char *value; value = g_strdup_printf ("%g", scale); attrib_set = add_text_attribute (attrib_set, ATK_TEXT_ATTR_SCALE, value); } @@ -812,7 +812,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { int size; - gchar *value; + char *value; g_object_get (tag, "size", &size, NULL); value = g_strdup_printf ("%i", size); attrib_set = add_text_attribute (attrib_set, ATK_TEXT_ATTR_SIZE, value); @@ -862,7 +862,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { int rise; - gchar *value; + char *value; g_object_get (tag, "rise", &rise, NULL); value = g_strdup_printf ("%i", rise); attrib_set = add_text_attribute (attrib_set, ATK_TEXT_ATTR_RISE, value); @@ -896,7 +896,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { int pixels; - gchar *value; + char *value; g_object_get (tag, "pixels-inside-wrap", &pixels, NULL); value = g_strdup_printf ("%i", pixels); attrib_set = add_text_attribute (attrib_set, ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP, value); @@ -914,7 +914,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { int pixels; - gchar *value; + char *value; g_object_get (tag, "pixels-below-lines", &pixels, NULL); value = g_strdup_printf ("%i", pixels); attrib_set = add_text_attribute (attrib_set, ATK_TEXT_ATTR_PIXELS_BELOW_LINES, value); @@ -932,7 +932,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { int pixels; - gchar *value; + char *value; g_object_get (tag, "pixels-above-lines", &pixels, NULL); value = g_strdup_printf ("%i", pixels); attrib_set = add_text_attribute (attrib_set, ATK_TEXT_ATTR_PIXELS_ABOVE_LINES, value); @@ -982,7 +982,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { int indent; - gchar *value; + char *value; g_object_get (tag, "indent", &indent, NULL); value = g_strdup_printf ("%i", indent); attrib_set = add_text_attribute (attrib_set, ATK_TEXT_ATTR_INDENT, value); @@ -1000,7 +1000,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { int margin; - gchar *value; + char *value; g_object_get (tag, "right-margin", &margin, NULL); value = g_strdup_printf ("%i", margin); attrib_set = add_text_attribute (attrib_set, ATK_TEXT_ATTR_RIGHT_MARGIN, value); @@ -1018,7 +1018,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, if (val_set) { int margin; - gchar *value; + char *value; g_object_get (tag, "left-margin", &margin, NULL); value = g_strdup_printf ("%i", margin); attrib_set = add_text_attribute (attrib_set, ATK_TEXT_ATTR_LEFT_MARGIN, value); @@ -1039,7 +1039,7 @@ gtk_text_view_accessible_get_default_attributes (AtkText *text) GtkTextAttributes *text_attrs; AtkAttributeSet *attributes; PangoFontDescription *font; - gchar *value; + char *value; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) @@ -1100,7 +1100,7 @@ gtk_text_view_accessible_get_default_attributes (AtkText *text) value = g_strdup_printf ("%g", text_attrs->font_scale); attributes = add_text_attribute (attributes, ATK_TEXT_ATTR_SCALE, value); - value = g_strdup ((gchar *)(text_attrs->language)); + value = g_strdup ((char *)(text_attrs->language)); attributes = add_text_attribute (attributes, ATK_TEXT_ATTR_LANGUAGE, value); value = g_strdup_printf ("%i", text_attrs->appearance.rise); @@ -1145,7 +1145,7 @@ gtk_text_view_accessible_get_n_selections (AtkText *text) return 0; } -static gchar * +static char * gtk_text_view_accessible_get_selection (AtkText *atk_text, int selection_num, int *start_pos, @@ -1155,7 +1155,7 @@ gtk_text_view_accessible_get_selection (AtkText *atk_text, GtkWidget *widget; GtkTextBuffer *buffer; GtkTextIter start, end; - gchar *text; + char *text; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_text)); if (widget == NULL) @@ -1304,7 +1304,7 @@ gtk_text_view_accessible_set_run_attributes (AtkEditableText *text, GtkTextIter end; int j; GdkRGBA *color; - gchar** RGB_vals; + char ** RGB_vals; GSList *l; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); @@ -1327,8 +1327,8 @@ gtk_text_view_accessible_set_run_attributes (AtkEditableText *text, for (l = attributes; l; l = l->next) { - gchar *name; - gchar *value; + char *name; + char *value; AtkAttribute *at; at = l->data; @@ -1512,7 +1512,7 @@ gtk_text_view_accessible_set_run_attributes (AtkEditableText *text, static void gtk_text_view_accessible_set_text_contents (AtkEditableText *text, - const gchar *string) + const char *string) { GtkTextView *view; GtkWidget *widget; @@ -1532,7 +1532,7 @@ gtk_text_view_accessible_set_text_contents (AtkEditableText *text, static void gtk_text_view_accessible_insert_text (AtkEditableText *text, - const gchar *string, + const char *string, int length, int *position) { @@ -1562,7 +1562,7 @@ gtk_text_view_accessible_copy_text (AtkEditableText *text, GtkWidget *widget; GtkTextBuffer *buffer; GtkTextIter start, end; - gchar *str; + char *str; GdkClipboard *clipboard; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); @@ -1588,7 +1588,7 @@ gtk_text_view_accessible_cut_text (AtkEditableText *text, GtkWidget *widget; GtkTextBuffer *buffer; GtkTextIter start, end; - gchar *str; + char *str; GdkClipboard *clipboard; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); @@ -1732,7 +1732,7 @@ gtk_text_view_accessible_update_cursor (GtkTextViewAccessible *accessible, static void insert_text_cb (GtkTextBuffer *buffer, GtkTextIter *iter, - gchar *text, + char *text, int len, gpointer data) { diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c index 8956dfa1bc..5566939f8e 100644 --- a/gtk/a11y/gtktreeviewaccessible.c +++ b/gtk/a11y/gtktreeviewaccessible.c @@ -828,7 +828,7 @@ gtk_tree_view_accessible_get_column_header (AtkTable *table, return get_header_from_column (tv_col); } -static const gchar * +static const char * gtk_tree_view_accessible_get_column_description (AtkTable *table, int in_col) { diff --git a/gtk/a11y/gtkwindowaccessible.c b/gtk/a11y/gtkwindowaccessible.c index 594ad6ca57..65f746e80d 100644 --- a/gtk/a11y/gtkwindowaccessible.c +++ b/gtk/a11y/gtkwindowaccessible.c @@ -71,10 +71,10 @@ on_title_changed (GObject *gobject, g_signal_emit_by_name (atk_obj, "visible-data-changed"); } -static const gchar * +static const char * gtk_window_accessible_get_name (AtkObject *accessible) { - const gchar* name; + const char * name; GtkWidget* widget; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)); diff --git a/gtk/css/gtkcsstokenizer.c b/gtk/css/gtkcsstokenizer.c index 754c84ecb1..7aa3ff25e7 100644 --- a/gtk/css/gtkcsstokenizer.c +++ b/gtk/css/gtkcsstokenizer.c @@ -31,8 +31,8 @@ struct _GtkCssTokenizer int ref_count; GBytes *bytes; - const gchar *data; - const gchar *end; + const char *data; + const char *end; GtkCssLocation position; }; diff --git a/gtk/gen-paper-names.c b/gtk/gen-paper-names.c index afec5796d8..8d9ea390b5 100644 --- a/gtk/gen-paper-names.c +++ b/gtk/gen-paper-names.c @@ -27,7 +27,7 @@ static const int n_infos = G_N_ELEMENTS (standard_names); static const int n_extra = G_N_ELEMENTS (extra_ppd_names); typedef struct { - const gchar *s; + const char *s; int len; int suffix; int offset; @@ -37,7 +37,7 @@ static NameInfo *names = NULL; static int n_names = 0; static void -add_name (const gchar *name) +add_name (const char *name) { names[n_names].s = name; names[n_names].len = strlen (name); @@ -48,7 +48,7 @@ add_name (const gchar *name) } static int -find_name (const gchar *name) +find_name (const char *name) { int i; @@ -70,12 +70,12 @@ find_name (const gchar *name) #define POINTS_PER_INCH 72 static gboolean -parse_media_size (const gchar *size, +parse_media_size (const char *size, gdouble *width_mm, gdouble *height_mm) { - const gchar *p; - gchar *e; + const char *p; + char *e; gdouble short_dim, long_dim; p = size; diff --git a/gtk/gsettings-mapping.c b/gtk/gsettings-mapping.c index d7d69b139c..7eadca3d27 100644 --- a/gtk/gsettings-mapping.c +++ b/gtk/gsettings-mapping.c @@ -330,7 +330,7 @@ g_settings_set_mapping (const GValue *value, const GVariantType *expected_type, gpointer user_data) { - gchar *type_string; + char *type_string; if (G_VALUE_HOLDS_BOOLEAN (value)) { @@ -379,7 +379,7 @@ g_settings_set_mapping (const GValue *value, { if (g_value_get_boxed (value) == NULL) return NULL; - return g_variant_new_strv ((const gchar **) g_value_get_boxed (value), + return g_variant_new_strv ((const char **) g_value_get_boxed (value), -1); } @@ -485,7 +485,7 @@ g_settings_get_mapping (GValue *value, { GEnumClass *eclass; GEnumValue *evalue; - const gchar *nick; + const char *nick; /* GParamSpecEnum holds a ref on the class so we just peek... */ eclass = g_type_class_peek (G_VALUE_TYPE (value)); @@ -514,7 +514,7 @@ g_settings_get_mapping (GValue *value, { GFlagsClass *fclass; GFlagsValue *fvalue; - const gchar *nick; + const char *nick; GVariantIter iter; guint flags = 0; diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c index 7aa62b5072..2bafb769e3 100644 --- a/gtk/gtkaboutdialog.c +++ b/gtk/gtkaboutdialog.c @@ -111,8 +111,8 @@ typedef struct { - const gchar *name; - const gchar *url; + const char *name; + const char *url; } LicenseInfo; /* LicenseInfo for each GtkLicense type; keep in the same order as the enumeration */ @@ -142,8 +142,8 @@ G_STATIC_ASSERT (G_N_ELEMENTS (gtk_license_info) - 1 == GTK_LICENSE_MPL_2_0); typedef struct { - gchar *heading; - gchar **people; + char *heading; + char **people; } CreditSection; typedef struct _GtkAboutDialogClass GtkAboutDialogClass; @@ -152,19 +152,19 @@ struct _GtkAboutDialog { GtkDialog parent_instance; - gchar *name; - gchar *version; - gchar *copyright; - gchar *comments; - gchar *website_url; - gchar *website_text; - gchar *translator_credits; - gchar *license; - gchar *system_information; + char *name; + char *version; + char *copyright; + char *comments; + char *website_url; + char *website_text; + char *translator_credits; + char *license; + char *system_information; - gchar **authors; - gchar **documenters; - gchar **artists; + char **authors; + char **documenters; + char **artists; GSList *credit_sections; @@ -209,7 +209,7 @@ struct _GtkAboutDialogClass GtkDialogClass parent_class; gboolean (*activate_link) (GtkAboutDialog *dialog, - const gchar *uri); + const char *uri); }; enum @@ -255,9 +255,9 @@ static void populate_credits_page (GtkAboutDialog static void populate_license_page (GtkAboutDialog *about); static void populate_system_page (GtkAboutDialog *about); static gboolean gtk_about_dialog_activate_link (GtkAboutDialog *about, - const gchar *uri); + const char *uri); static gboolean emit_activate_link (GtkAboutDialog *about, - const gchar *uri); + const char *uri); static gboolean text_view_key_pressed (GtkEventController *controller, guint keyval, guint keycode, @@ -630,7 +630,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass) static gboolean emit_activate_link (GtkAboutDialog *about, - const gchar *uri) + const char *uri) { gboolean handled = FALSE; @@ -704,7 +704,7 @@ update_credits_button_visibility (GtkAboutDialog *about) static void switch_page (GtkAboutDialog *about, - const gchar *name) + const char *name) { gtk_stack_set_visible_child_name (GTK_STACK (about->stack), name); @@ -855,13 +855,13 @@ gtk_about_dialog_set_property (GObject *object, gtk_about_dialog_set_logo (about, g_value_get_object (value)); break; case PROP_AUTHORS: - gtk_about_dialog_set_authors (about, (const gchar**)g_value_get_boxed (value)); + gtk_about_dialog_set_authors (about, (const char **)g_value_get_boxed (value)); break; case PROP_DOCUMENTERS: - gtk_about_dialog_set_documenters (about, (const gchar**)g_value_get_boxed (value)); + gtk_about_dialog_set_documenters (about, (const char **)g_value_get_boxed (value)); break; case PROP_ARTISTS: - gtk_about_dialog_set_artists (about, (const gchar**)g_value_get_boxed (value)); + gtk_about_dialog_set_artists (about, (const char **)g_value_get_boxed (value)); break; case PROP_TRANSLATOR_CREDITS: gtk_about_dialog_set_translator_credits (about, g_value_get_string (value)); @@ -978,7 +978,7 @@ toggle_license (GtkToggleButton *button, static gboolean gtk_about_dialog_activate_link (GtkAboutDialog *about, - const gchar *uri) + const char *uri) { gtk_show_uri (GTK_WINDOW (about), uri, GDK_CURRENT_TIME); return TRUE; @@ -991,11 +991,11 @@ update_website (GtkAboutDialog *about) if (about->website_url) { - gchar *markup; + char *markup; if (about->website_text) { - gchar *escaped; + char *escaped; escaped = g_markup_escape_text (about->website_text, -1); markup = g_strdup_printf ("%s", @@ -1029,7 +1029,7 @@ update_website (GtkAboutDialog *about) * Returns: The program name. The string is owned by the about * dialog and must not be modified. */ -const gchar * +const char * gtk_about_dialog_get_program_name (GtkAboutDialog *about) { g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL); @@ -1040,7 +1040,7 @@ gtk_about_dialog_get_program_name (GtkAboutDialog *about) static void update_name_version (GtkAboutDialog *about) { - gchar *title_string, *name_string; + char *title_string, *name_string; title_string = g_strdup_printf (_("About %s"), about->name); gtk_window_set_title (GTK_WINDOW (about), title_string); @@ -1070,9 +1070,9 @@ update_name_version (GtkAboutDialog *about) */ void gtk_about_dialog_set_program_name (GtkAboutDialog *about, - const gchar *name) + const char *name) { - gchar *tmp; + char *tmp; g_return_if_fail (GTK_IS_ABOUT_DIALOG (about)); @@ -1095,7 +1095,7 @@ gtk_about_dialog_set_program_name (GtkAboutDialog *about, * Returns: The version string. The string is owned by the about * dialog and must not be modified. */ -const gchar * +const char * gtk_about_dialog_get_version (GtkAboutDialog *about) { g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL); @@ -1112,9 +1112,9 @@ gtk_about_dialog_get_version (GtkAboutDialog *about) */ void gtk_about_dialog_set_version (GtkAboutDialog *about, - const gchar *version) + const char *version) { - gchar *tmp; + char *tmp; g_return_if_fail (GTK_IS_ABOUT_DIALOG (about)); @@ -1136,7 +1136,7 @@ gtk_about_dialog_set_version (GtkAboutDialog *about, * Returns: The copyright string. The string is owned by the about * dialog and must not be modified. */ -const gchar * +const char * gtk_about_dialog_get_copyright (GtkAboutDialog *about) { g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL); @@ -1154,9 +1154,9 @@ gtk_about_dialog_get_copyright (GtkAboutDialog *about) */ void gtk_about_dialog_set_copyright (GtkAboutDialog *about, - const gchar *copyright) + const char *copyright) { - gchar *copyright_string, *tmp; + char *copyright_string, *tmp; g_return_if_fail (GTK_IS_ABOUT_DIALOG (about)); @@ -1188,7 +1188,7 @@ gtk_about_dialog_set_copyright (GtkAboutDialog *about, * Returns: The comments. The string is owned by the about * dialog and must not be modified. */ -const gchar * +const char * gtk_about_dialog_get_comments (GtkAboutDialog *about) { g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL); @@ -1206,9 +1206,9 @@ gtk_about_dialog_get_comments (GtkAboutDialog *about) */ void gtk_about_dialog_set_comments (GtkAboutDialog *about, - const gchar *comments) + const char *comments) { - gchar *tmp; + char *tmp; g_return_if_fail (GTK_IS_ABOUT_DIALOG (about)); @@ -1238,7 +1238,7 @@ gtk_about_dialog_set_comments (GtkAboutDialog *about, * Returns: The license information. The string is owned by the about * dialog and must not be modified. */ -const gchar * +const char * gtk_about_dialog_get_license (GtkAboutDialog *about) { g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL); @@ -1257,9 +1257,9 @@ gtk_about_dialog_get_license (GtkAboutDialog *about) */ void gtk_about_dialog_set_license (GtkAboutDialog *about, - const gchar *license) + const char *license) { - gchar *tmp; + char *tmp; g_return_if_fail (GTK_IS_ABOUT_DIALOG (about)); @@ -1292,7 +1292,7 @@ gtk_about_dialog_set_license (GtkAboutDialog *about, * * Returns: the system information */ -const gchar * +const char * gtk_about_dialog_get_system_information (GtkAboutDialog *about) { g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL); @@ -1313,7 +1313,7 @@ gtk_about_dialog_get_system_information (GtkAboutDialog *about) */ void gtk_about_dialog_set_system_information (GtkAboutDialog *about, - const gchar *system_information) + const char *system_information) { g_return_if_fail (GTK_IS_ABOUT_DIALOG (about)); @@ -1374,7 +1374,7 @@ gtk_about_dialog_set_wrap_license (GtkAboutDialog *about, * Returns: The website URL. The string is owned by the about * dialog and must not be modified. */ -const gchar * +const char * gtk_about_dialog_get_website (GtkAboutDialog *about) { g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL); @@ -1391,9 +1391,9 @@ gtk_about_dialog_get_website (GtkAboutDialog *about) */ void gtk_about_dialog_set_website (GtkAboutDialog *about, - const gchar *website) + const char *website) { - gchar *tmp; + char *tmp; g_return_if_fail (GTK_IS_ABOUT_DIALOG (about)); @@ -1415,7 +1415,7 @@ gtk_about_dialog_set_website (GtkAboutDialog *about, * Returns: The label used for the website link. The string is * owned by the about dialog and must not be modified. */ -const gchar * +const char * gtk_about_dialog_get_website_label (GtkAboutDialog *about) { g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL); @@ -1432,9 +1432,9 @@ gtk_about_dialog_get_website_label (GtkAboutDialog *about) */ void gtk_about_dialog_set_website_label (GtkAboutDialog *about, - const gchar *website_label) + const char *website_label) { - gchar *tmp; + char *tmp; g_return_if_fail (GTK_IS_ABOUT_DIALOG (about)); @@ -1458,12 +1458,12 @@ gtk_about_dialog_set_website_label (GtkAboutDialog *about, * %NULL-terminated string array containing the authors. The array is * owned by the about dialog and must not be modified. */ -const gchar * const * +const char * const * gtk_about_dialog_get_authors (GtkAboutDialog *about) { g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL); - return (const gchar * const *) about->authors; + return (const char * const *) about->authors; } /** @@ -1476,14 +1476,14 @@ gtk_about_dialog_get_authors (GtkAboutDialog *about) */ void gtk_about_dialog_set_authors (GtkAboutDialog *about, - const gchar **authors) + const char **authors) { - gchar **tmp; + char **tmp; g_return_if_fail (GTK_IS_ABOUT_DIALOG (about)); tmp = about->authors; - about->authors = g_strdupv ((gchar **)authors); + about->authors = g_strdupv ((char **)authors); g_strfreev (tmp); update_credits_button_visibility (about); @@ -1502,12 +1502,12 @@ gtk_about_dialog_set_authors (GtkAboutDialog *about, * %NULL-terminated string array containing the documenters. The * array is owned by the about dialog and must not be modified. */ -const gchar * const * +const char * const * gtk_about_dialog_get_documenters (GtkAboutDialog *about) { g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL); - return (const gchar * const *)about->documenters; + return (const char * const *)about->documenters; } /** @@ -1520,14 +1520,14 @@ gtk_about_dialog_get_documenters (GtkAboutDialog *about) */ void gtk_about_dialog_set_documenters (GtkAboutDialog *about, - const gchar **documenters) + const char **documenters) { - gchar **tmp; + char **tmp; g_return_if_fail (GTK_IS_ABOUT_DIALOG (about)); tmp = about->documenters; - about->documenters = g_strdupv ((gchar **)documenters); + about->documenters = g_strdupv ((char **)documenters); g_strfreev (tmp); update_credits_button_visibility (about); @@ -1546,12 +1546,12 @@ gtk_about_dialog_set_documenters (GtkAboutDialog *about, * %NULL-terminated string array containing the artists. The array is * owned by the about dialog and must not be modified. */ -const gchar * const * +const char * const * gtk_about_dialog_get_artists (GtkAboutDialog *about) { g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL); - return (const gchar * const *)about->artists; + return (const char * const *)about->artists; } /** @@ -1564,14 +1564,14 @@ gtk_about_dialog_get_artists (GtkAboutDialog *about) */ void gtk_about_dialog_set_artists (GtkAboutDialog *about, - const gchar **artists) + const char **artists) { - gchar **tmp; + char **tmp; g_return_if_fail (GTK_IS_ABOUT_DIALOG (about)); tmp = about->artists; - about->artists = g_strdupv ((gchar **)artists); + about->artists = g_strdupv ((char **)artists); g_strfreev (tmp); update_credits_button_visibility (about); @@ -1589,7 +1589,7 @@ gtk_about_dialog_set_artists (GtkAboutDialog *about, * Returns: The translator credits string. The string is * owned by the about dialog and must not be modified. */ -const gchar * +const char * gtk_about_dialog_get_translator_credits (GtkAboutDialog *about) { g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL); @@ -1621,9 +1621,9 @@ gtk_about_dialog_get_translator_credits (GtkAboutDialog *about) */ void gtk_about_dialog_set_translator_credits (GtkAboutDialog *about, - const gchar *translator_credits) + const char *translator_credits) { - gchar *tmp; + char *tmp; g_return_if_fail (GTK_IS_ABOUT_DIALOG (about)); @@ -1696,7 +1696,7 @@ gtk_about_dialog_set_logo (GtkAboutDialog *about, * The string is owned by the dialog. If you want to keep a reference * to it, you have to call g_strdup() on it. */ -const gchar * +const char * gtk_about_dialog_get_logo_icon_name (GtkAboutDialog *about) { g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL); @@ -1716,7 +1716,7 @@ gtk_about_dialog_get_logo_icon_name (GtkAboutDialog *about) */ void gtk_about_dialog_set_logo_icon_name (GtkAboutDialog *about, - const gchar *icon_name) + const char *icon_name) { g_return_if_fail (GTK_IS_ABOUT_DIALOG (about)); @@ -1772,7 +1772,7 @@ follow_if_link (GtkAboutDialog *about, GtkTextIter *iter) { GSList *tags = NULL, *tagp = NULL; - gchar *uri = NULL; + char *uri = NULL; tags = gtk_text_iter_get_tags (iter); for (tagp = tags; tagp != NULL && !uri; tagp = tagp->next) @@ -1880,7 +1880,7 @@ set_cursor_if_appropriate (GtkAboutDialog *about, for (tagp = tags; tagp != NULL; tagp = tagp->next) { GtkTextTag *tag = tagp->data; - gchar *uri = g_object_get_data (G_OBJECT (tag), "uri"); + char *uri = g_object_get_data (G_OBJECT (tag), "uri"); if (uri != NULL) { @@ -1922,10 +1922,10 @@ text_view_motion (GtkEventControllerMotion *motion, static GtkTextBuffer * text_buffer_new (GtkAboutDialog *about, - gchar **strings) + char **strings) { - gchar **p; - gchar *q0, *q1, *q2, *r1, *r2; + char **p; + char *q0, *q1, *q2, *r1, *r2; GtkTextBuffer *buffer; GdkRGBA color; GdkRGBA link_color; @@ -1972,9 +1972,9 @@ text_buffer_new (GtkAboutDialog *about, if (q1 && q2) { GtkTextIter end; - gchar *link; - gchar *uri; - const gchar *link_type; + char *link; + char *uri; + const char *link_type; if (*q1 == '<') { @@ -2005,7 +2005,7 @@ text_buffer_new (GtkAboutDialog *about, NULL); if (strcmp (link_type, "email") == 0) { - gchar *escaped; + char *escaped; escaped = g_uri_escape_string (link, NULL, FALSE); uri = g_strconcat ("mailto:", escaped, NULL); @@ -2046,13 +2046,13 @@ static void add_credits_section (GtkAboutDialog *about, GtkGrid *grid, int *row, - gchar *title, - gchar **people) + char *title, + char **people) { GtkWidget *label; - gchar *markup; - gchar **p; - gchar *q0, *q1, *q2, *r1, *r2; + char *markup; + char **p; + char *q0, *q1, *q2, *r1, *r2; if (people == NULL) return; @@ -2102,14 +2102,14 @@ add_credits_section (GtkAboutDialog *about, if (q1 && q2) { - gchar *link; - gchar *text; - gchar *name; + char *link; + char *text; + char *name; if (*q1 == '<') { /* email */ - gchar *escaped; + char *escaped; text = g_strstrip (g_strndup (q0, q1 - q0)); name = g_markup_escape_text (text, -1); @@ -2188,7 +2188,7 @@ populate_credits_page (GtkAboutDialog *about) strcmp (about->translator_credits, "translator_credits") != 0 && strcmp (about->translator_credits, "translator-credits") != 0) { - gchar **translators; + char **translators; translators = g_strsplit (about->translator_credits, "\n", 0); add_credits_section (about, GTK_GRID (about->credits_grid), &row, _("Translated by"), translators); @@ -2213,7 +2213,7 @@ static void populate_license_page (GtkAboutDialog *about) { GtkTextBuffer *buffer; - gchar *strings[2]; + char *strings[2]; gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (about->license_view), about->wrap_license ? GTK_WRAP_WORD : GTK_WRAP_NONE); @@ -2228,7 +2228,7 @@ static void populate_system_page (GtkAboutDialog *about) { GtkTextBuffer *buffer; - gchar *strings[2]; + char *strings[2]; strings[0] = about->system_information; strings[1] = NULL; @@ -2275,7 +2275,7 @@ close_cb (GtkAboutDialog *about, */ void gtk_show_about_dialog (GtkWindow *parent, - const gchar *first_property_name, + const char *first_property_name, ...) { static GtkWidget *global_about_dialog = NULL; @@ -2349,9 +2349,9 @@ gtk_about_dialog_set_license_type (GtkAboutDialog *about, /* custom licenses use the contents of the :license property */ if (about->license_type != GTK_LICENSE_CUSTOM) { - const gchar *name; - const gchar *url; - gchar *license_string; + const char *name; + const char *url; + char *license_string; GString *str; name = _(gtk_license_info[about->license_type].name); @@ -2417,8 +2417,8 @@ gtk_about_dialog_get_license_type (GtkAboutDialog *about) */ void gtk_about_dialog_add_credit_section (GtkAboutDialog *about, - const gchar *section_name, - const gchar **people) + const char *section_name, + const char **people) { CreditSection *new_entry; @@ -2427,8 +2427,8 @@ gtk_about_dialog_add_credit_section (GtkAboutDialog *about, g_return_if_fail (people != NULL); new_entry = g_slice_new (CreditSection); - new_entry->heading = g_strdup ((gchar *)section_name); - new_entry->people = g_strdupv ((gchar **)people); + new_entry->heading = g_strdup ((char *)section_name); + new_entry->people = g_strdupv ((char **)people); about->credit_sections = g_slist_append (about->credit_sections, new_entry); update_credits_button_visibility (about); diff --git a/gtk/gtkaboutdialog.h b/gtk/gtkaboutdialog.h index 1624f4628f..76a2d187ee 100644 --- a/gtk/gtkaboutdialog.h +++ b/gtk/gtkaboutdialog.h @@ -98,33 +98,33 @@ GDK_AVAILABLE_IN_ALL GtkWidget *gtk_about_dialog_new (void); GDK_AVAILABLE_IN_ALL void gtk_show_about_dialog (GtkWindow *parent, - const gchar *first_property_name, + const char *first_property_name, ...) G_GNUC_NULL_TERMINATED; GDK_AVAILABLE_IN_ALL -const gchar * gtk_about_dialog_get_program_name (GtkAboutDialog *about); +const char * gtk_about_dialog_get_program_name (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_program_name (GtkAboutDialog *about, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL -const gchar * gtk_about_dialog_get_version (GtkAboutDialog *about); +const char * gtk_about_dialog_get_version (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_version (GtkAboutDialog *about, - const gchar *version); + const char *version); GDK_AVAILABLE_IN_ALL -const gchar * gtk_about_dialog_get_copyright (GtkAboutDialog *about); +const char * gtk_about_dialog_get_copyright (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_copyright (GtkAboutDialog *about, - const gchar *copyright); + const char *copyright); GDK_AVAILABLE_IN_ALL -const gchar * gtk_about_dialog_get_comments (GtkAboutDialog *about); +const char * gtk_about_dialog_get_comments (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_comments (GtkAboutDialog *about, - const gchar *comments); + const char *comments); GDK_AVAILABLE_IN_ALL -const gchar * gtk_about_dialog_get_license (GtkAboutDialog *about); +const char * gtk_about_dialog_get_license (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_license (GtkAboutDialog *about, - const gchar *license); + const char *license); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_license_type (GtkAboutDialog *about, GtkLicense license_type); @@ -138,54 +138,54 @@ void gtk_about_dialog_set_wrap_license (GtkAboutDialog gboolean wrap_license); GDK_AVAILABLE_IN_ALL -const gchar * gtk_about_dialog_get_system_information (GtkAboutDialog *about); +const char * gtk_about_dialog_get_system_information (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_system_information (GtkAboutDialog *about, - const gchar *system_information); + const char *system_information); GDK_AVAILABLE_IN_ALL -const gchar * gtk_about_dialog_get_website (GtkAboutDialog *about); +const char * gtk_about_dialog_get_website (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_website (GtkAboutDialog *about, - const gchar *website); + const char *website); GDK_AVAILABLE_IN_ALL -const gchar * gtk_about_dialog_get_website_label (GtkAboutDialog *about); +const char * gtk_about_dialog_get_website_label (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_website_label (GtkAboutDialog *about, - const gchar *website_label); + const char *website_label); GDK_AVAILABLE_IN_ALL -const gchar* const * gtk_about_dialog_get_authors (GtkAboutDialog *about); +const char * const * gtk_about_dialog_get_authors (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_authors (GtkAboutDialog *about, - const gchar **authors); + const char **authors); GDK_AVAILABLE_IN_ALL -const gchar* const * gtk_about_dialog_get_documenters (GtkAboutDialog *about); +const char * const * gtk_about_dialog_get_documenters (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_documenters (GtkAboutDialog *about, - const gchar **documenters); + const char **documenters); GDK_AVAILABLE_IN_ALL -const gchar* const * gtk_about_dialog_get_artists (GtkAboutDialog *about); +const char * const * gtk_about_dialog_get_artists (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_artists (GtkAboutDialog *about, - const gchar **artists); + const char **artists); GDK_AVAILABLE_IN_ALL -const gchar * gtk_about_dialog_get_translator_credits (GtkAboutDialog *about); +const char * gtk_about_dialog_get_translator_credits (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_translator_credits (GtkAboutDialog *about, - const gchar *translator_credits); + const char *translator_credits); GDK_AVAILABLE_IN_ALL GdkPaintable *gtk_about_dialog_get_logo (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_logo (GtkAboutDialog *about, GdkPaintable *logo); GDK_AVAILABLE_IN_ALL -const gchar * gtk_about_dialog_get_logo_icon_name (GtkAboutDialog *about); +const char * gtk_about_dialog_get_logo_icon_name (GtkAboutDialog *about); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_set_logo_icon_name (GtkAboutDialog *about, - const gchar *icon_name); + const char *icon_name); GDK_AVAILABLE_IN_ALL void gtk_about_dialog_add_credit_section (GtkAboutDialog *about, - const gchar *section_name, - const gchar **people); + const char *section_name, + const char **people); G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkAboutDialog, g_object_unref) diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c index 0e45b3635a..f5417dbcd0 100644 --- a/gtk/gtkaccelgroup.c +++ b/gtk/gtkaccelgroup.c @@ -114,7 +114,7 @@ gtk_accelerator_valid (guint keyval, } static inline gboolean -is_alt (const gchar *string) +is_alt (const char *string) { return ((string[0] == '<') && (string[1] == 'a' || string[1] == 'A') && @@ -124,7 +124,7 @@ is_alt (const gchar *string) } static inline gboolean -is_ctl (const gchar *string) +is_ctl (const char *string) { return ((string[0] == '<') && (string[1] == 'c' || string[1] == 'C') && @@ -134,7 +134,7 @@ is_ctl (const gchar *string) } static inline gboolean -is_ctrl (const gchar *string) +is_ctrl (const char *string) { return ((string[0] == '<') && (string[1] == 'c' || string[1] == 'C') && @@ -145,7 +145,7 @@ is_ctrl (const gchar *string) } static inline gboolean -is_shft (const gchar *string) +is_shft (const char *string) { return ((string[0] == '<') && (string[1] == 's' || string[1] == 'S') && @@ -156,7 +156,7 @@ is_shft (const gchar *string) } static inline gboolean -is_shift (const gchar *string) +is_shift (const char *string) { return ((string[0] == '<') && (string[1] == 's' || string[1] == 'S') && @@ -168,7 +168,7 @@ is_shift (const gchar *string) } static inline gboolean -is_control (const gchar *string) +is_control (const char *string) { return ((string[0] == '<') && (string[1] == 'c' || string[1] == 'C') && @@ -182,7 +182,7 @@ is_control (const gchar *string) } static inline gboolean -is_meta (const gchar *string) +is_meta (const char *string) { return ((string[0] == '<') && (string[1] == 'm' || string[1] == 'M') && @@ -193,7 +193,7 @@ is_meta (const gchar *string) } static inline gboolean -is_super (const gchar *string) +is_super (const char *string) { return ((string[0] == '<') && (string[1] == 's' || string[1] == 'S') && @@ -205,7 +205,7 @@ is_super (const gchar *string) } static inline gboolean -is_hyper (const gchar *string) +is_hyper (const char *string) { return ((string[0] == '<') && (string[1] == 'h' || string[1] == 'H') && @@ -217,7 +217,7 @@ is_hyper (const gchar *string) } static inline gboolean -is_primary (const gchar *string) +is_primary (const char *string) { return ((string[0] == '<') && (string[1] == 'p' || string[1] == 'P') && @@ -231,7 +231,7 @@ is_primary (const gchar *string) } static inline gboolean -is_keycode (const gchar *string) +is_keycode (const char *string) { return (string[0] == '0' && string[1] == 'x' && @@ -267,7 +267,7 @@ is_keycode (const gchar *string) * Returns: %TRUE if parsing succeeded */ gboolean -gtk_accelerator_parse_with_keycode (const gchar *accelerator, +gtk_accelerator_parse_with_keycode (const char *accelerator, GdkDisplay *display, guint *accelerator_key, guint **accelerator_codes, @@ -360,7 +360,7 @@ gtk_accelerator_parse_with_keycode (const gchar *accelerator, } else { - gchar last_ch; + char last_ch; last_ch = *accelerator; while (last_ch && last_ch != '>') @@ -376,7 +376,7 @@ gtk_accelerator_parse_with_keycode (const gchar *accelerator, if (len >= 4 && is_keycode (accelerator)) { char keystring[5]; - gchar *endptr; + char *endptr; int tmp_keycode; memcpy (keystring, accelerator, 4); @@ -510,7 +510,7 @@ out: * be set to 0 (zero). */ gboolean -gtk_accelerator_parse (const gchar *accelerator, +gtk_accelerator_parse (const char *accelerator, guint *accelerator_key, GdkModifierType *accelerator_mods) { @@ -532,19 +532,19 @@ gtk_accelerator_parse (const gchar *accelerator, * * Returns: a newly allocated accelerator name. */ -gchar * +char * gtk_accelerator_name_with_keycode (GdkDisplay *display, guint accelerator_key, guint keycode, GdkModifierType accelerator_mods) { - gchar *gtk_name; + char *gtk_name; gtk_name = gtk_accelerator_name (accelerator_key, accelerator_mods); if (!accelerator_key) { - gchar *name; + char *name; name = g_strdup_printf ("%s0x%02x", gtk_name, keycode); g_free (gtk_name); return name; @@ -647,19 +647,19 @@ gtk_accelerator_name (guint accelerator_key, * * Returns: a newly-allocated string representing the accelerator. */ -gchar * +char * gtk_accelerator_get_label_with_keycode (GdkDisplay *display, guint accelerator_key, guint keycode, GdkModifierType accelerator_mods) { - gchar *gtk_label; + char *gtk_label; gtk_label = gtk_accelerator_get_label (accelerator_key, accelerator_mods); if (!accelerator_key) { - gchar *label; + char *label; label = g_strdup_printf ("%s0x%02x", gtk_label, keycode); g_free (gtk_label); return label; @@ -803,7 +803,7 @@ append_separator (GString *string) * * Returns: a newly-allocated string representing the accelerator. */ -gchar* +char * gtk_accelerator_get_label (guint accelerator_key, GdkModifierType accelerator_mods) { diff --git a/gtk/gtkaccelgroup.h b/gtk/gtkaccelgroup.h index 6e38622223..54ddba5bc1 100644 --- a/gtk/gtkaccelgroup.h +++ b/gtk/gtkaccelgroup.h @@ -41,28 +41,28 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_accelerator_valid (guint keyval, GdkModifierType modifiers) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -gboolean gtk_accelerator_parse (const gchar *accelerator, +gboolean gtk_accelerator_parse (const char *accelerator, guint *accelerator_key, GdkModifierType *accelerator_mods); GDK_AVAILABLE_IN_ALL -gboolean gtk_accelerator_parse_with_keycode (const gchar *accelerator, +gboolean gtk_accelerator_parse_with_keycode (const char *accelerator, GdkDisplay *display, guint *accelerator_key, guint **accelerator_codes, GdkModifierType *accelerator_mods); GDK_AVAILABLE_IN_ALL -gchar* gtk_accelerator_name (guint accelerator_key, +char * gtk_accelerator_name (guint accelerator_key, GdkModifierType accelerator_mods); GDK_AVAILABLE_IN_ALL -gchar* gtk_accelerator_name_with_keycode (GdkDisplay *display, +char * gtk_accelerator_name_with_keycode (GdkDisplay *display, guint accelerator_key, guint keycode, GdkModifierType accelerator_mods); GDK_AVAILABLE_IN_ALL -gchar* gtk_accelerator_get_label (guint accelerator_key, +char * gtk_accelerator_get_label (guint accelerator_key, GdkModifierType accelerator_mods); GDK_AVAILABLE_IN_ALL -gchar* gtk_accelerator_get_label_with_keycode (GdkDisplay *display, +char * gtk_accelerator_get_label_with_keycode (GdkDisplay *display, guint accelerator_key, guint keycode, GdkModifierType accelerator_mods); diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c index 7b83dbad5b..2a498a907c 100644 --- a/gtk/gtkaccellabel.c +++ b/gtk/gtkaccellabel.c @@ -216,7 +216,7 @@ gtk_accel_label_init (GtkAccelLabel *accel_label) * Returns: a new #GtkAccelLabel. */ GtkWidget * -gtk_accel_label_new (const gchar *string) +gtk_accel_label_new (const char *string) { return g_object_new (GTK_TYPE_ACCEL_LABEL, "label", string, diff --git a/gtk/gtkaccellabel.h b/gtk/gtkaccellabel.h index 7177b79ceb..cf8f0998d0 100644 --- a/gtk/gtkaccellabel.h +++ b/gtk/gtkaccellabel.h @@ -44,7 +44,7 @@ typedef struct _GtkAccelLabel GtkAccelLabel; GDK_AVAILABLE_IN_ALL GType gtk_accel_label_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget *gtk_accel_label_new (const gchar *string); +GtkWidget *gtk_accel_label_new (const char *string); GDK_AVAILABLE_IN_ALL guint gtk_accel_label_get_accel_width (GtkAccelLabel *accel_label); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkactionable.c b/gtk/gtkactionable.c index 58c7d459cd..150a91055b 100644 --- a/gtk/gtkactionable.c +++ b/gtk/gtkactionable.c @@ -86,7 +86,7 @@ gtk_actionable_default_init (GtkActionableInterface *iface) * * Returns: (nullable): the action name, or %NULL if none is set **/ -const gchar * +const char * gtk_actionable_get_action_name (GtkActionable *actionable) { g_return_val_if_fail (GTK_IS_ACTIONABLE (actionable), NULL); @@ -114,7 +114,7 @@ gtk_actionable_get_action_name (GtkActionable *actionable) **/ void gtk_actionable_set_action_name (GtkActionable *actionable, - const gchar *action_name) + const char *action_name) { g_return_if_fail (GTK_IS_ACTIONABLE (actionable)); @@ -194,7 +194,7 @@ gtk_actionable_set_action_target_value (GtkActionable *actionable, **/ void gtk_actionable_set_action_target (GtkActionable *actionable, - const gchar *format_string, + const char *format_string, ...) { va_list ap; @@ -223,11 +223,11 @@ gtk_actionable_set_action_target (GtkActionable *actionable, **/ void gtk_actionable_set_detailed_action_name (GtkActionable *actionable, - const gchar *detailed_action_name) + const char *detailed_action_name) { GError *error = NULL; GVariant *target; - gchar *name; + char *name; if (detailed_action_name == NULL) { diff --git a/gtk/gtkactionable.h b/gtk/gtkactionable.h index af42e5e1d4..db82446cba 100644 --- a/gtk/gtkactionable.h +++ b/gtk/gtkactionable.h @@ -43,9 +43,9 @@ struct _GtkActionableInterface /*< public >*/ - const gchar * (* get_action_name) (GtkActionable *actionable); + const char * (* get_action_name) (GtkActionable *actionable); void (* set_action_name) (GtkActionable *actionable, - const gchar *action_name); + const char *action_name); GVariant * (* get_action_target_value) (GtkActionable *actionable); void (* set_action_target_value) (GtkActionable *actionable, GVariant *target_value); @@ -55,10 +55,10 @@ GDK_AVAILABLE_IN_ALL GType gtk_actionable_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -const gchar * gtk_actionable_get_action_name (GtkActionable *actionable); +const char * gtk_actionable_get_action_name (GtkActionable *actionable); GDK_AVAILABLE_IN_ALL void gtk_actionable_set_action_name (GtkActionable *actionable, - const gchar *action_name); + const char *action_name); GDK_AVAILABLE_IN_ALL GVariant * gtk_actionable_get_action_target_value (GtkActionable *actionable); @@ -68,12 +68,12 @@ void gtk_actionable_set_action_target_value (GtkActi GDK_AVAILABLE_IN_ALL void gtk_actionable_set_action_target (GtkActionable *actionable, - const gchar *format_string, + const char *format_string, ...); GDK_AVAILABLE_IN_ALL void gtk_actionable_set_detailed_action_name (GtkActionable *actionable, - const gchar *detailed_action_name); + const char *detailed_action_name); G_END_DECLS diff --git a/gtk/gtkactionbar.c b/gtk/gtkactionbar.c index 77a1981a3b..ae4393966a 100644 --- a/gtk/gtkactionbar.c +++ b/gtk/gtkactionbar.c @@ -191,7 +191,7 @@ static void gtk_action_bar_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { GtkActionBar *self = GTK_ACTION_BAR (buildable); diff --git a/gtk/gtkactionhelper.c b/gtk/gtkactionhelper.c index 99a0b796d5..ccc2153c33 100644 --- a/gtk/gtkactionhelper.c +++ b/gtk/gtkactionhelper.c @@ -60,7 +60,7 @@ struct _GtkActionHelper GtkActionHelperGroup *group; GtkActionMuxer *action_context; - gchar *action_name; + char *action_name; GVariant *target; @@ -301,7 +301,7 @@ gtk_action_helper_finalize (GObject *object) static void gtk_action_helper_observer_action_added (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, const GVariantType *parameter_type, gboolean enabled, GVariant *state) @@ -312,7 +312,7 @@ gtk_action_helper_observer_action_added (GtkActionObserver *observer, static void gtk_action_helper_observer_action_enabled_changed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, gboolean enabled) { gtk_action_helper_action_enabled_changed (GTK_ACTION_HELPER (observer), enabled); @@ -321,7 +321,7 @@ gtk_action_helper_observer_action_enabled_changed (GtkActionObserver *observer static void gtk_action_helper_observer_action_state_changed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, GVariant *state) { gtk_action_helper_action_state_changed (GTK_ACTION_HELPER (observer), state); @@ -330,7 +330,7 @@ gtk_action_helper_observer_action_state_changed (GtkActionObserver *observer, static void gtk_action_helper_observer_action_removed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name) + const char *action_name) { gtk_action_helper_action_removed (GTK_ACTION_HELPER (observer), TRUE); } @@ -405,7 +405,7 @@ gtk_action_helper_new (GtkActionable *widget) void gtk_action_helper_set_action_name (GtkActionHelper *helper, - const gchar *action_name) + const char *action_name) { gboolean was_enabled, was_active; const GVariantType *parameter_type; @@ -552,7 +552,7 @@ gtk_action_helper_set_action_target_value (GtkActionHelper *helper, g_object_notify (G_OBJECT (helper->widget), "action-target"); } -const gchar * +const char * gtk_action_helper_get_action_name (GtkActionHelper *helper) { if (helper == NULL) diff --git a/gtk/gtkactionhelperprivate.h b/gtk/gtkactionhelperprivate.h index 7a3b334e4a..f68ef104f9 100644 --- a/gtk/gtkactionhelperprivate.h +++ b/gtk/gtkactionhelperprivate.h @@ -39,12 +39,12 @@ GtkActionHelper * gtk_action_helper_new (GtkActi G_GNUC_INTERNAL void gtk_action_helper_set_action_name (GtkActionHelper *helper, - const gchar *action_name); + const char *action_name); G_GNUC_INTERNAL void gtk_action_helper_set_action_target_value (GtkActionHelper *helper, GVariant *action_target); G_GNUC_INTERNAL -const gchar * gtk_action_helper_get_action_name (GtkActionHelper *helper); +const char * gtk_action_helper_get_action_name (GtkActionHelper *helper); G_GNUC_INTERNAL GVariant * gtk_action_helper_get_action_target_value (GtkActionHelper *helper); diff --git a/gtk/gtkactionmuxer.c b/gtk/gtkactionmuxer.c index 2ad00251ad..d10b813a0f 100644 --- a/gtk/gtkactionmuxer.c +++ b/gtk/gtkactionmuxer.c @@ -181,14 +181,14 @@ typedef struct { GtkActionMuxer *muxer; GSList *watchers; - gchar *fullname; + char *fullname; } Action; typedef struct { GtkActionMuxer *muxer; GActionGroup *group; - gchar *prefix; + char *prefix; gulong handler_ids[4]; } Group; @@ -210,8 +210,8 @@ gtk_action_muxer_append_group_actions (const char *prefix, Group *group, GHashTable *actions) { - gchar **group_actions; - gchar **action; + char **group_actions; + char **action; group_actions = g_action_group_list_actions (group->group); for (action = group_actions; *action; action++) @@ -265,11 +265,11 @@ gtk_action_muxer_list_actions (GtkActionMuxer *muxer) static Group * gtk_action_muxer_find_group (GtkActionMuxer *muxer, - const gchar *full_name, - const gchar **action_name) + const char *full_name, + const char **action_name) { - const gchar *dot; - gchar *prefix; + const char *dot; + char *prefix; const char *name; Group *group; @@ -323,7 +323,7 @@ find_observers (GtkActionMuxer *muxer, void gtk_action_muxer_action_enabled_changed (GtkActionMuxer *muxer, - const gchar *action_name, + const char *action_name, gboolean enabled) { GtkWidgetAction *iter; @@ -355,12 +355,12 @@ gtk_action_muxer_action_enabled_changed (GtkActionMuxer *muxer, static void gtk_action_muxer_group_action_enabled_changed (GActionGroup *action_group, - const gchar *action_name, + const char *action_name, gboolean enabled, gpointer user_data) { Group *group = user_data; - gchar *fullname; + char *fullname; fullname = g_strconcat (group->prefix, ".", action_name, NULL); gtk_action_muxer_action_enabled_changed (group->muxer, fullname, enabled); @@ -369,7 +369,7 @@ gtk_action_muxer_group_action_enabled_changed (GActionGroup *action_group, void gtk_action_muxer_action_state_changed (GtkActionMuxer *muxer, - const gchar *action_name, + const char *action_name, GVariant *state) { Action *action; @@ -382,12 +382,12 @@ gtk_action_muxer_action_state_changed (GtkActionMuxer *muxer, static void gtk_action_muxer_group_action_state_changed (GActionGroup *action_group, - const gchar *action_name, + const char *action_name, GVariant *state, gpointer user_data) { Group *group = user_data; - gchar *fullname; + char *fullname; fullname = g_strconcat (group->prefix, ".", action_name, NULL); gtk_action_muxer_action_state_changed (group->muxer, fullname, state); @@ -496,7 +496,7 @@ gtk_action_muxer_action_added (GtkActionMuxer *muxer, static void gtk_action_muxer_action_added_to_group (GActionGroup *action_group, - const gchar *action_name, + const char *action_name, gpointer user_data) { Group *group = user_data; @@ -543,7 +543,7 @@ gtk_action_muxer_action_removed (GtkActionMuxer *muxer, static void gtk_action_muxer_action_removed_from_group (GActionGroup *action_group, - const gchar *action_name, + const char *action_name, gpointer user_data) { Group *group = user_data; @@ -570,8 +570,8 @@ gtk_action_muxer_action_removed_from_group (GActionGroup *action_group, static void gtk_action_muxer_primary_accel_changed (GtkActionMuxer *muxer, - const gchar *action_name, - const gchar *action_and_target) + const char *action_name, + const char *action_and_target) { Action *action; GSList *node; @@ -719,7 +719,7 @@ prop_actions_connect (GtkActionMuxer *muxer) static gboolean action_muxer_query_action (GtkActionMuxer *muxer, - const gchar *action_name, + const char *action_name, gboolean *enabled, const GVariantType **parameter_type, const GVariantType **state_type, @@ -729,7 +729,7 @@ action_muxer_query_action (GtkActionMuxer *muxer, { GtkWidgetAction *action; Group *group; - const gchar *unprefixed_name; + const char *unprefixed_name; if (muxer->widget) { @@ -785,7 +785,7 @@ action_muxer_query_action (GtkActionMuxer *muxer, gboolean gtk_action_muxer_query_action (GtkActionMuxer *muxer, - const gchar *action_name, + const char *action_name, gboolean *enabled, const GVariantType **parameter_type, const GVariantType **state_type, @@ -809,10 +809,10 @@ gtk_action_muxer_has_action (GtkActionMuxer *muxer, void gtk_action_muxer_activate_action (GtkActionMuxer *muxer, - const gchar *action_name, + const char *action_name, GVariant *parameter) { - const gchar *unprefixed_name; + const char *unprefixed_name; Group *group; if (muxer->widget) @@ -854,7 +854,7 @@ gtk_action_muxer_change_action_state (GtkActionMuxer *muxer, GVariant *state) { GtkWidgetAction *action; - const gchar *unprefixed_name; + const char *unprefixed_name; Group *group; if (muxer->widget) @@ -920,7 +920,7 @@ static void gtk_action_muxer_free_action (gpointer data); static void gtk_action_muxer_register_observer (GtkActionObservable *observable, - const gchar *name, + const char *name, GtkActionObserver *observer) { GtkActionMuxer *muxer = GTK_ACTION_MUXER (observable); @@ -972,7 +972,7 @@ gtk_action_muxer_register_observer (GtkActionObservable *observable, static void gtk_action_muxer_unregister_observer (GtkActionObservable *observable, - const gchar *name, + const char *name, GtkActionObserver *observer) { GtkActionMuxer *muxer = GTK_ACTION_MUXER (observable); @@ -1225,10 +1225,10 @@ gtk_action_muxer_class_init (GObjectClass *class) */ void gtk_action_muxer_insert (GtkActionMuxer *muxer, - const gchar *prefix, + const char *prefix, GActionGroup *action_group) { - gchar **actions; + char **actions; Group *group; int i; @@ -1272,7 +1272,7 @@ gtk_action_muxer_insert (GtkActionMuxer *muxer, */ void gtk_action_muxer_remove (GtkActionMuxer *muxer, - const gchar *prefix) + const char *prefix) { Group *group; @@ -1283,7 +1283,7 @@ gtk_action_muxer_remove (GtkActionMuxer *muxer, if (group != NULL) { - gchar **actions; + char **actions; int i; g_hash_table_steal (muxer->groups, prefix); @@ -1372,9 +1372,9 @@ gtk_action_muxer_set_primary_accel (GtkActionMuxer *muxer, gtk_action_muxer_primary_accel_changed (muxer, NULL, action_and_target); } -const gchar * +const char * gtk_action_muxer_get_primary_accel (GtkActionMuxer *muxer, - const gchar *action_and_target) + const char *action_and_target) { guint position; @@ -1388,9 +1388,9 @@ gtk_action_muxer_get_primary_accel (GtkActionMuxer *muxer, return gtk_action_muxer_get_primary_accel (muxer->parent, action_and_target); } -gchar * -gtk_print_action_and_target (const gchar *action_namespace, - const gchar *action_name, +char * +gtk_print_action_and_target (const char *action_namespace, + const char *action_name, GVariant *target) { GString *result; @@ -1415,12 +1415,12 @@ gtk_print_action_and_target (const gchar *action_namespace, return g_string_free (result, FALSE); } -gchar * -gtk_normalise_detailed_action_name (const gchar *detailed_action_name) +char * +gtk_normalise_detailed_action_name (const char *detailed_action_name) { GError *error = NULL; - gchar *action_and_target; - gchar *action_name; + char *action_and_target; + char *action_name; GVariant *target; g_action_parse_detailed_name (detailed_action_name, &action_name, &target, &error); diff --git a/gtk/gtkactionmuxerprivate.h b/gtk/gtkactionmuxerprivate.h index 19e3365672..cd1786b2c3 100644 --- a/gtk/gtkactionmuxerprivate.h +++ b/gtk/gtkactionmuxerprivate.h @@ -56,7 +56,7 @@ void gtk_action_muxer_insert (GtkActi GActionGroup *action_group); void gtk_action_muxer_remove (GtkActionMuxer *muxer, - const gchar *prefix); + const char *prefix); GActionGroup * gtk_action_muxer_find (GtkActionMuxer *muxer, const char *action_name, const char **unprefixed_name); diff --git a/gtk/gtkactionobservable.c b/gtk/gtkactionobservable.c index 914f24b052..27fb7dbd99 100644 --- a/gtk/gtkactionobservable.c +++ b/gtk/gtkactionobservable.c @@ -45,7 +45,7 @@ gtk_action_observable_default_init (GtkActionObservableInterface *iface) */ void gtk_action_observable_register_observer (GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, GtkActionObserver *observer) { g_return_if_fail (GTK_IS_ACTION_OBSERVABLE (observable)); @@ -68,7 +68,7 @@ gtk_action_observable_register_observer (GtkActionObservable *observable, */ void gtk_action_observable_unregister_observer (GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, GtkActionObserver *observer) { g_return_if_fail (GTK_IS_ACTION_OBSERVABLE (observable)); diff --git a/gtk/gtkactionobservableprivate.h b/gtk/gtkactionobservableprivate.h index d82c89729f..4ab688855a 100644 --- a/gtk/gtkactionobservableprivate.h +++ b/gtk/gtkactionobservableprivate.h @@ -40,19 +40,19 @@ struct _GtkActionObservableInterface GTypeInterface g_iface; void (* register_observer) (GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, GtkActionObserver *observer); void (* unregister_observer) (GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, GtkActionObserver *observer); }; GType gtk_action_observable_get_type (void); void gtk_action_observable_register_observer (GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, GtkActionObserver *observer); void gtk_action_observable_unregister_observer (GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, GtkActionObserver *observer); G_END_DECLS diff --git a/gtk/gtkactionobserver.c b/gtk/gtkactionobserver.c index 3a5a9abb19..ea3d2eb98e 100644 --- a/gtk/gtkactionobserver.c +++ b/gtk/gtkactionobserver.c @@ -74,7 +74,7 @@ gtk_action_observer_default_init (GtkActionObserverInterface *class) void gtk_action_observer_action_added (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, const GVariantType *parameter_type, gboolean enabled, GVariant *state) @@ -101,7 +101,7 @@ gtk_action_observer_action_added (GtkActionObserver *observer, void gtk_action_observer_action_enabled_changed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, gboolean enabled) { g_return_if_fail (GTK_IS_ACTION_OBSERVER (observer)); @@ -126,7 +126,7 @@ gtk_action_observer_action_enabled_changed (GtkActionObserver *observer, void gtk_action_observer_action_state_changed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, GVariant *state) { g_return_if_fail (GTK_IS_ACTION_OBSERVER (observer)); @@ -150,7 +150,7 @@ gtk_action_observer_action_state_changed (GtkActionObserver *observer, void gtk_action_observer_action_removed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name) + const char *action_name) { g_return_if_fail (GTK_IS_ACTION_OBSERVER (observer)); @@ -175,8 +175,8 @@ gtk_action_observer_action_removed (GtkActionObserver *observer, void gtk_action_observer_primary_accel_changed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, - const gchar *action_and_target) + const char *action_name, + const char *action_and_target) { GtkActionObserverInterface *iface; diff --git a/gtk/gtkactionobserverprivate.h b/gtk/gtkactionobserverprivate.h index a1a31cc25f..a9ea3cdb57 100644 --- a/gtk/gtkactionobserverprivate.h +++ b/gtk/gtkactionobserverprivate.h @@ -42,49 +42,49 @@ struct _GtkActionObserverInterface void (* action_added) (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, const GVariantType *parameter_type, gboolean enabled, GVariant *state); void (* action_enabled_changed) (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, gboolean enabled); void (* action_state_changed) (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, GVariant *state); void (* action_removed) (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name); + const char *action_name); void (* primary_accel_changed) (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, - const gchar *action_and_target); + const char *action_name, + const char *action_and_target); }; GType gtk_action_observer_get_type (void); void gtk_action_observer_action_added (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, const GVariantType *parameter_type, gboolean enabled, GVariant *state); void gtk_action_observer_action_enabled_changed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, gboolean enabled); void gtk_action_observer_action_state_changed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, GVariant *state); void gtk_action_observer_action_removed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name); + const char *action_name); void gtk_action_observer_primary_accel_changed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, - const gchar *action_and_target); + const char *action_name, + const char *action_and_target); G_END_DECLS diff --git a/gtk/gtkappchooser.c b/gtk/gtkappchooser.c index 35fc9cdbf2..697174d5d9 100644 --- a/gtk/gtkappchooser.c +++ b/gtk/gtkappchooser.c @@ -87,10 +87,10 @@ gtk_app_chooser_default_init (GtkAppChooserIface *iface) * * Returns: the content type of @self. Free with g_free() */ -gchar * +char * gtk_app_chooser_get_content_type (GtkAppChooser *self) { - gchar *retval = NULL; + char *retval = NULL; g_return_val_if_fail (GTK_IS_APP_CHOOSER (self), NULL); diff --git a/gtk/gtkappchooser.h b/gtk/gtkappchooser.h index 7a522550fd..21d2cbbca1 100644 --- a/gtk/gtkappchooser.h +++ b/gtk/gtkappchooser.h @@ -44,7 +44,7 @@ GType gtk_app_chooser_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GAppInfo * gtk_app_chooser_get_app_info (GtkAppChooser *self); GDK_AVAILABLE_IN_ALL -gchar * gtk_app_chooser_get_content_type (GtkAppChooser *self); +char * gtk_app_chooser_get_content_type (GtkAppChooser *self); GDK_AVAILABLE_IN_ALL void gtk_app_chooser_refresh (GtkAppChooser *self); diff --git a/gtk/gtkappchooserbutton.c b/gtk/gtkappchooserbutton.c index e86873f14d..518f2c64be 100644 --- a/gtk/gtkappchooserbutton.c +++ b/gtk/gtkappchooserbutton.c @@ -94,8 +94,8 @@ enum { static void app_chooser_iface_init (GtkAppChooserIface *iface); static void real_insert_custom_item (GtkAppChooserButton *self, - const gchar *name, - const gchar *label, + const char *name, + const char *label, GIcon *icon, gboolean custom, GtkTreeIter *iter); @@ -115,8 +115,8 @@ struct _GtkAppChooserButton { GtkWidget *combobox; GtkListStore *store; - gchar *content_type; - gchar *heading; + char *content_type; + char *heading; int last_active; gboolean show_dialog_item; gboolean show_default_item; @@ -130,7 +130,7 @@ struct _GtkAppChooserButtonClass { void (* changed) (GtkAppChooserButton *self); void (* custom_item_activated) (GtkAppChooserButton *self, - const gchar *item_name); + const char *item_name); }; G_DEFINE_TYPE_WITH_CODE (GtkAppChooserButton, gtk_app_chooser_button, GTK_TYPE_WIDGET, @@ -463,7 +463,7 @@ gtk_app_chooser_button_changed (GtkComboBox *object, { GtkAppChooserButton *self = user_data; GtkTreeIter iter; - gchar *name = NULL; + char *name = NULL; gboolean custom; GQuark name_quark; @@ -765,11 +765,11 @@ gtk_app_chooser_button_init (GtkAppChooserButton *self) static gboolean app_chooser_button_iter_from_custom_name (GtkAppChooserButton *self, - const gchar *name, + const char *name, GtkTreeIter *set_me) { GtkTreeIter iter; - gchar *custom_name = NULL; + char *custom_name = NULL; if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (self->store), &iter)) return FALSE; @@ -795,8 +795,8 @@ app_chooser_button_iter_from_custom_name (GtkAppChooserButton *self, static void real_insert_custom_item (GtkAppChooserButton *self, - const gchar *name, - const gchar *label, + const char *name, + const char *label, GIcon *icon, gboolean custom, GtkTreeIter *iter) @@ -844,7 +844,7 @@ real_insert_separator (GtkAppChooserButton *self, * Returns: a newly created #GtkAppChooserButton */ GtkWidget * -gtk_app_chooser_button_new (const gchar *content_type) +gtk_app_chooser_button_new (const char *content_type) { g_return_val_if_fail (content_type != NULL, NULL); @@ -887,8 +887,8 @@ gtk_app_chooser_button_append_separator (GtkAppChooserButton *self) */ void gtk_app_chooser_button_append_custom_item (GtkAppChooserButton *self, - const gchar *name, - const gchar *label, + const char *name, + const char *label, GIcon *icon) { GtkTreeIter iter; @@ -913,7 +913,7 @@ gtk_app_chooser_button_append_custom_item (GtkAppChooserButton *self, */ void gtk_app_chooser_button_set_active_custom_item (GtkAppChooserButton *self, - const gchar *name) + const char *name) { GtkTreeIter iter; @@ -1020,7 +1020,7 @@ gtk_app_chooser_button_set_show_default_item (GtkAppChooserButton *self, */ void gtk_app_chooser_button_set_heading (GtkAppChooserButton *self, - const gchar *heading) + const char *heading) { g_return_if_fail (GTK_IS_APP_CHOOSER_BUTTON (self)); @@ -1039,7 +1039,7 @@ gtk_app_chooser_button_set_heading (GtkAppChooserButton *self, * Returns: (nullable): the text to display at the top of the dialog, * or %NULL, in which case a default text is displayed */ -const gchar * +const char * gtk_app_chooser_button_get_heading (GtkAppChooserButton *self) { g_return_val_if_fail (GTK_IS_APP_CHOOSER_BUTTON (self), NULL); diff --git a/gtk/gtkappchooserbutton.h b/gtk/gtkappchooserbutton.h index 91083b28eb..1f8b33d11e 100644 --- a/gtk/gtkappchooserbutton.h +++ b/gtk/gtkappchooserbutton.h @@ -41,18 +41,18 @@ GDK_AVAILABLE_IN_ALL GType gtk_app_chooser_button_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget * gtk_app_chooser_button_new (const gchar *content_type); +GtkWidget * gtk_app_chooser_button_new (const char *content_type); GDK_AVAILABLE_IN_ALL void gtk_app_chooser_button_append_separator (GtkAppChooserButton *self); GDK_AVAILABLE_IN_ALL void gtk_app_chooser_button_append_custom_item (GtkAppChooserButton *self, - const gchar *name, - const gchar *label, + const char *name, + const char *label, GIcon *icon); GDK_AVAILABLE_IN_ALL void gtk_app_chooser_button_set_active_custom_item (GtkAppChooserButton *self, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL void gtk_app_chooser_button_set_show_dialog_item (GtkAppChooserButton *self, @@ -61,9 +61,9 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_app_chooser_button_get_show_dialog_item (GtkAppChooserButton *self); GDK_AVAILABLE_IN_ALL void gtk_app_chooser_button_set_heading (GtkAppChooserButton *self, - const gchar *heading); + const char *heading); GDK_AVAILABLE_IN_ALL -const gchar * +const char * gtk_app_chooser_button_get_heading (GtkAppChooserButton *self); GDK_AVAILABLE_IN_ALL void gtk_app_chooser_button_set_show_default_item (GtkAppChooserButton *self, diff --git a/gtk/gtkappchooserdialog.c b/gtk/gtkappchooserdialog.c index 3444af1174..6999eabf4f 100644 --- a/gtk/gtkappchooserdialog.c +++ b/gtk/gtkappchooserdialog.c @@ -175,13 +175,13 @@ get_extension (const char *basename) static void set_dialog_properties (GtkAppChooserDialog *self) { - gchar *name; - gchar *extension; - gchar *description; - gchar *string; + char *name; + char *extension; + char *description; + char *string; gboolean unknown; - gchar *title; - gchar *subtitle; + char *title; + char *subtitle; gboolean use_header; GtkWidget *header; @@ -381,8 +381,8 @@ gtk_app_chooser_dialog_refresh (GtkAppChooser *object) } static void -show_error_dialog (const gchar *primary, - const gchar *secondary, +show_error_dialog (const char *primary, + const char *secondary, GtkWindow *parent) { GtkWidget *message_dialog; @@ -409,7 +409,7 @@ software_button_clicked_cb (GtkButton *button, { GSubprocess *process; GError *error = NULL; - gchar *option; + char *option; if (self->content_type) option = g_strconcat ("--search=", self->content_type, NULL); @@ -432,7 +432,7 @@ software_button_clicked_cb (GtkButton *button, static void ensure_software_button (GtkAppChooserDialog *self) { - gchar *path; + char *path; path = g_find_program_in_path ("gnome-software"); if (path != NULL) @@ -705,7 +705,7 @@ gtk_app_chooser_dialog_new (GtkWindow *parent, GtkWidget * gtk_app_chooser_dialog_new_for_content_type (GtkWindow *parent, GtkDialogFlags flags, - const gchar *content_type) + const char *content_type) { GtkWidget *retval; @@ -746,7 +746,7 @@ gtk_app_chooser_dialog_get_widget (GtkAppChooserDialog *self) */ void gtk_app_chooser_dialog_set_heading (GtkAppChooserDialog *self, - const gchar *heading) + const char *heading) { g_return_if_fail (GTK_IS_APP_CHOOSER_DIALOG (self)); @@ -778,7 +778,7 @@ gtk_app_chooser_dialog_set_heading (GtkAppChooserDialog *self, * Returns: (nullable): the text to display at the top of the dialog, or %NULL, in which * case a default text is displayed */ -const gchar * +const char * gtk_app_chooser_dialog_get_heading (GtkAppChooserDialog *self) { g_return_val_if_fail (GTK_IS_APP_CHOOSER_DIALOG (self), NULL); diff --git a/gtk/gtkappchooserdialog.h b/gtk/gtkappchooserdialog.h index 45c7d8b66b..422610bcc5 100644 --- a/gtk/gtkappchooserdialog.h +++ b/gtk/gtkappchooserdialog.h @@ -50,15 +50,15 @@ GtkWidget * gtk_app_chooser_dialog_new (GtkWindow * GDK_AVAILABLE_IN_ALL GtkWidget * gtk_app_chooser_dialog_new_for_content_type (GtkWindow *parent, GtkDialogFlags flags, - const gchar *content_type); + const char *content_type); GDK_AVAILABLE_IN_ALL GtkWidget * gtk_app_chooser_dialog_get_widget (GtkAppChooserDialog *self); GDK_AVAILABLE_IN_ALL void gtk_app_chooser_dialog_set_heading (GtkAppChooserDialog *self, - const gchar *heading); + const char *heading); GDK_AVAILABLE_IN_ALL -const gchar * gtk_app_chooser_dialog_get_heading (GtkAppChooserDialog *self); +const char * gtk_app_chooser_dialog_get_heading (GtkAppChooserDialog *self); G_END_DECLS diff --git a/gtk/gtkappchooserwidget.c b/gtk/gtkappchooserwidget.c index 746fcf75d7..7c4da1d85f 100644 --- a/gtk/gtkappchooserwidget.c +++ b/gtk/gtkappchooserwidget.c @@ -81,8 +81,8 @@ struct _GtkAppChooserWidget { GtkWidget *overlay; - gchar *content_type; - gchar *default_text; + char *content_type; + char *default_text; guint show_default : 1; guint show_recommended : 1; @@ -231,12 +231,12 @@ program_list_selection_activated (GtkTreeView *view, static gboolean gtk_app_chooser_search_equal_func (GtkTreeModel *model, int column, - const gchar *key, + const char *key, GtkTreeIter *iter, gpointer user_data) { - gchar *name; - gchar *exec_name; + char *name; + char *exec_name; gboolean ret; if (key != NULL) @@ -273,7 +273,7 @@ gtk_app_chooser_sort_func (GtkTreeModel *model, gboolean a_fallback, b_fallback; gboolean a_heading, b_heading; gboolean a_default, b_default; - gchar *a_name, *b_name, *a_casefold, *b_casefold; + char *a_name, *b_name, *a_casefold, *b_casefold; int retval = 0; /* this returns: @@ -424,7 +424,7 @@ compare_apps_func (gconstpointer a, static gboolean gtk_app_chooser_widget_add_section (GtkAppChooserWidget *self, - const gchar *heading_title, + const char *heading_title, gboolean show_headings, gboolean recommended, gboolean fallback, @@ -434,7 +434,7 @@ gtk_app_chooser_widget_add_section (GtkAppChooserWidget *self, gboolean heading_added, unref_icon; GtkTreeIter iter; GAppInfo *app; - gchar *app_string, *bold_string; + char *app_string, *bold_string; GIcon *icon; GList *l; gboolean retval; @@ -512,7 +512,7 @@ gtk_app_chooser_add_default (GtkAppChooserWidget *self, { GtkTreeIter iter; GIcon *icon; - gchar *string; + char *string; gboolean unref_icon; unref_icon = FALSE; @@ -558,8 +558,8 @@ gtk_app_chooser_add_default (GtkAppChooserWidget *self, static void update_no_applications_label (GtkAppChooserWidget *self) { - gchar *text = NULL, *desc = NULL; - const gchar *string; + char *text = NULL, *desc = NULL; + const char *string; if (self->default_text == NULL) { @@ -1125,7 +1125,7 @@ gtk_app_chooser_widget_iface_init (GtkAppChooserIface *iface) * Returns: a newly created #GtkAppChooserWidget */ GtkWidget * -gtk_app_chooser_widget_new (const gchar *content_type) +gtk_app_chooser_widget_new (const char *content_type) { return g_object_new (GTK_TYPE_APP_CHOOSER_WIDGET, "content-type", content_type, @@ -1347,7 +1347,7 @@ gtk_app_chooser_widget_get_show_all (GtkAppChooserWidget *self) */ void gtk_app_chooser_widget_set_default_text (GtkAppChooserWidget *self, - const gchar *text) + const char *text) { g_return_if_fail (GTK_IS_APP_CHOOSER_WIDGET (self)); @@ -1371,7 +1371,7 @@ gtk_app_chooser_widget_set_default_text (GtkAppChooserWidget *self, * * Returns: the value of #GtkAppChooserWidget:default-text */ -const gchar * +const char * gtk_app_chooser_widget_get_default_text (GtkAppChooserWidget *self) { g_return_val_if_fail (GTK_IS_APP_CHOOSER_WIDGET (self), NULL); diff --git a/gtk/gtkappchooserwidget.h b/gtk/gtkappchooserwidget.h index c71919e494..066da1bb04 100644 --- a/gtk/gtkappchooserwidget.h +++ b/gtk/gtkappchooserwidget.h @@ -44,7 +44,7 @@ GDK_AVAILABLE_IN_ALL GType gtk_app_chooser_widget_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget * gtk_app_chooser_widget_new (const gchar *content_type); +GtkWidget * gtk_app_chooser_widget_new (const char *content_type); GDK_AVAILABLE_IN_ALL void gtk_app_chooser_widget_set_show_default (GtkAppChooserWidget *self, @@ -78,9 +78,9 @@ gboolean gtk_app_chooser_widget_get_show_all (GtkAppChooserWidget * GDK_AVAILABLE_IN_ALL void gtk_app_chooser_widget_set_default_text (GtkAppChooserWidget *self, - const gchar *text); + const char *text); GDK_AVAILABLE_IN_ALL -const gchar * gtk_app_chooser_widget_get_default_text (GtkAppChooserWidget *self); +const char * gtk_app_chooser_widget_get_default_text (GtkAppChooserWidget *self); G_END_DECLS diff --git a/gtk/gtkapplication-dbus.c b/gtk/gtkapplication-dbus.c index 99e7d0c832..d946e0594e 100644 --- a/gtk/gtkapplication-dbus.c +++ b/gtk/gtkapplication-dbus.c @@ -75,7 +75,7 @@ unregister_client (GtkApplicationImplDBus *dbus) static void send_quit_response (GtkApplicationImplDBus *dbus, gboolean will_quit, - const gchar *reason) + const char *reason) { g_debug ("Calling EndSessionResponse %d '%s'", will_quit, reason); @@ -89,8 +89,8 @@ send_quit_response (GtkApplicationImplDBus *dbus, static void client_proxy_signal (GDBusProxy *proxy, - const gchar *sender_name, - const gchar *signal_name, + const char *sender_name, + const char *signal_name, GVariant *parameters, gpointer user_data) { @@ -124,13 +124,13 @@ client_proxy_signal (GDBusProxy *proxy, static GDBusProxy* gtk_application_get_proxy_if_service_present (GDBusConnection *connection, GDBusProxyFlags flags, - const gchar *bus_name, - const gchar *object_path, - const gchar *interface, + const char *bus_name, + const char *object_path, + const char *interface, GError **error) { GDBusProxy *proxy; - gchar *owner; + char *owner; proxy = g_dbus_proxy_new_sync (connection, flags, @@ -442,8 +442,8 @@ gtk_application_impl_dbus_startup (GtkApplicationImpl *impl, if (dbus->session) { - const gchar *id; - const gchar *id2; + const char *id; + const char *id2; GValue value = G_VALUE_INIT; g_value_init (&value, G_TYPE_STRING); @@ -549,7 +549,7 @@ gtk_application_impl_dbus_window_added (GtkApplicationImpl *impl, { GtkApplicationImplDBus *dbus = (GtkApplicationImplDBus *) impl; GActionGroup *actions; - gchar *path; + char *path; guint id; if (!dbus->session || !GTK_IS_APPLICATION_WINDOW (window)) @@ -588,10 +588,10 @@ gtk_application_impl_dbus_active_window_changed (GtkApplicationImpl *impl, static void gtk_application_impl_dbus_publish_menu (GtkApplicationImplDBus *dbus, - const gchar *type, + const char *type, GMenuModel *model, guint *id, - gchar **path) + char **path) { int i; @@ -677,7 +677,7 @@ static guint gtk_application_impl_dbus_inhibit (GtkApplicationImpl *impl, GtkWindow *window, GtkApplicationInhibitFlags flags, - const gchar *reason) + const char *reason) { GtkApplicationImplDBus *dbus = (GtkApplicationImplDBus *) impl; GVariant *res; @@ -897,7 +897,7 @@ gtk_application_impl_dbus_class_init (GtkApplicationImplDBusClass *class) gobject_class->finalize = gtk_application_impl_dbus_finalize; } -gchar * +char * gtk_application_impl_dbus_get_window_path (GtkApplicationImplDBus *dbus, GtkWindow *window) { diff --git a/gtk/gtkapplication-quartz-menu.c b/gtk/gtkapplication-quartz-menu.c index 2f6402a044..61e4ad741d 100644 --- a/gtk/gtkapplication-quartz-menu.c +++ b/gtk/gtkapplication-quartz-menu.c @@ -81,7 +81,7 @@ tracker_item_changed (GObject *object, gpointer user_data) { GNSMenuItem *item = user_data; - const gchar *name = g_param_spec_get_name (pspec); + const char *name = g_param_spec_get_name (pspec); if (name != NULL) { @@ -170,7 +170,7 @@ icon_loaded (GObject *object, if (self != nil) { - const gchar *special = gtk_menu_tracker_item_get_special (aTrackerItem); + const char *special = gtk_menu_tracker_item_get_special (aTrackerItem); if (special && g_str_equal (special, "hide-this")) { @@ -229,7 +229,7 @@ icon_loaded (GObject *object, - (void)didChangeLabel { - gchar *label = _gtk_toolbar_elide_underscores (gtk_menu_tracker_item_get_label (trackerItem)); + char *label = _gtk_toolbar_elide_underscores (gtk_menu_tracker_item_get_label (trackerItem)); NSString *title = [NSString stringWithUTF8String:label ? : ""]; @@ -327,7 +327,7 @@ icon_loaded (GObject *object, - (void)didChangeAccel { - const gchar *accel = gtk_menu_tracker_item_get_accel (trackerItem); + const char *accel = gtk_menu_tracker_item_get_accel (trackerItem); if (accel != NULL) { diff --git a/gtk/gtkapplication-quartz.c b/gtk/gtkapplication-quartz.c index f80497f547..7be91424e4 100644 --- a/gtk/gtkapplication-quartz.c +++ b/gtk/gtkapplication-quartz.c @@ -154,10 +154,10 @@ gtk_application_impl_quartz_startup (GtkApplicationImpl *impl, GtkApplicationImplQuartz *quartz = (GtkApplicationImplQuartz *) impl; GSimpleActionGroup *gtkinternal; GMenuModel *app_menu; - const gchar *pref_accel[] = {"comma", NULL}; - const gchar *hide_others_accel[] = {"h", NULL}; - const gchar *hide_accel[] = {"h", NULL}; - const gchar *quit_accel[] = {"q", NULL}; + const char *pref_accel[] = {"comma", NULL}; + const char *hide_others_accel[] = {"h", NULL}; + const char *hide_accel[] = {"h", NULL}; + const char *quit_accel[] = {"q", NULL}; if (register_session) { @@ -279,7 +279,7 @@ static guint gtk_application_impl_quartz_inhibit (GtkApplicationImpl *impl, GtkWindow *window, GtkApplicationInhibitFlags flags, - const gchar *reason) + const char *reason) { GtkApplicationImplQuartz *quartz = (GtkApplicationImplQuartz *) impl; GtkApplicationQuartzInhibitor *inhibitor; diff --git a/gtk/gtkapplication-wayland.c b/gtk/gtkapplication-wayland.c index face15505c..a5731769d2 100644 --- a/gtk/gtkapplication-wayland.c +++ b/gtk/gtkapplication-wayland.c @@ -36,7 +36,7 @@ typedef struct guint (*dbus_inhibit) (GtkApplicationImpl *impl, GtkWindow *window, GtkApplicationInhibitFlags flags, - const gchar *reason); + const char *reason); void (*dbus_uninhibit) (GtkApplicationImpl *impl, guint cookie); } GtkApplicationImplWaylandClass; @@ -74,7 +74,7 @@ gtk_application_impl_wayland_handle_window_realize (GtkApplicationImpl *impl, GTK_APPLICATION_IMPL_CLASS (gtk_application_impl_wayland_parent_class); GtkApplicationImplDBus *dbus = (GtkApplicationImplDBus *) impl; GdkSurface *gdk_surface; - gchar *window_path; + char *window_path; gdk_surface = gtk_native_get_surface (GTK_NATIVE (window)); @@ -107,7 +107,7 @@ static guint gtk_application_impl_wayland_inhibit (GtkApplicationImpl *impl, GtkWindow *window, GtkApplicationInhibitFlags flags, - const gchar *reason) + const char *reason) { GtkApplicationImplWayland *wayland = (GtkApplicationImplWayland *) impl; GdkSurface *surface; diff --git a/gtk/gtkapplication-x11.c b/gtk/gtkapplication-x11.c index 933b160b25..f834c78e04 100644 --- a/gtk/gtkapplication-x11.c +++ b/gtk/gtkapplication-x11.c @@ -41,7 +41,7 @@ gtk_application_impl_x11_handle_window_realize (GtkApplicationImpl *impl, { GtkApplicationImplDBus *dbus = (GtkApplicationImplDBus *) impl; GdkSurface *gdk_surface; - gchar *window_path; + char *window_path; gdk_surface = gtk_native_get_surface (GTK_NATIVE (window)); diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c index d736e34a8b..62e83fe7ac 100644 --- a/gtk/gtkapplication.c +++ b/gtk/gtkapplication.c @@ -156,7 +156,7 @@ typedef struct gboolean screensaver_active; GtkActionMuxer *muxer; GtkBuilder *menus_builder; - gchar *help_overlay_path; + char *help_overlay_path; guint profiler_id; } GtkApplicationPrivate; @@ -191,7 +191,7 @@ static void gtk_application_load_resources (GtkApplication *application) { GtkApplicationPrivate *priv = gtk_application_get_instance_private (application); - const gchar *base_path; + const char *base_path; base_path = g_application_get_resource_base_path (G_APPLICATION (application)); @@ -201,7 +201,7 @@ gtk_application_load_resources (GtkApplication *application) /* Expand the icon search path */ { GtkIconTheme *default_theme; - gchar *iconspath; + char *iconspath; default_theme = gtk_icon_theme_get_for_display (gdk_display_get_default ()); iconspath = g_strconcat (base_path, "/icons/", NULL); @@ -211,7 +211,7 @@ gtk_application_load_resources (GtkApplication *application) /* Load the menus */ { - gchar *menuspath; + char *menuspath; menuspath = g_strconcat (base_path, "/gtk/menus.ui", NULL); if (g_resources_get_info (menuspath, G_RESOURCE_LOOKUP_FLAGS_NONE, NULL, NULL, NULL)) @@ -230,12 +230,12 @@ gtk_application_load_resources (GtkApplication *application) /* Help overlay */ { - gchar *path; + char *path; path = g_strconcat (base_path, "/gtk/help-overlay.ui", NULL); if (g_resources_get_info (path, G_RESOURCE_LOOKUP_FLAGS_NONE, NULL, NULL, NULL)) { - const gchar * const accels[] = { "question", NULL }; + const char * const accels[] = { "question", NULL }; priv->help_overlay_path = path; gtk_application_set_accels_for_action (application, "win.show-help-overlay", accels); @@ -295,7 +295,7 @@ gtk_application_shutdown (GApplication *g_application) static gboolean gtk_application_local_command_line (GApplication *application, - gchar ***arguments, + char ***arguments, int *exit_status) { return G_APPLICATION_CLASS (gtk_application_parent_class)->local_command_line (application, arguments, exit_status); @@ -317,7 +317,7 @@ gtk_application_add_platform_data (GApplication *application, display = gdk_display_get_default (); if (display) { - const gchar *startup_id; + const char *startup_id; startup_id = gdk_display_get_startup_notification_id (display); if (startup_id && g_utf8_validate (startup_id, -1, NULL)) @@ -504,7 +504,7 @@ gtk_application_finalize (GObject *object) #ifdef G_OS_UNIX -static const gchar org_gnome_Sysprof3_Profiler_xml[] = +static const char org_gnome_Sysprof3_Profiler_xml[] = "" "" "" @@ -521,10 +521,10 @@ static GDBusInterfaceInfo *org_gnome_Sysprof3_Profiler; static void sysprof_profiler_method_call (GDBusConnection *connection, - const gchar *sender, - const gchar *object_path, - const gchar *interface_name, - const gchar *method_name, + const char *sender, + const char *object_path, + const char *interface_name, + const char *method_name, GVariant *parameters, GDBusMethodInvocation *invocation, gpointer user_data) @@ -797,7 +797,7 @@ gtk_application_class_init (GtkApplicationClass *class) * Returns: a new #GtkApplication instance */ GtkApplication * -gtk_application_new (const gchar *application_id, +gtk_application_new (const char *application_id, GApplicationFlags flags) { g_return_val_if_fail (application_id == NULL || g_application_id_is_valid (application_id), NULL); @@ -1084,7 +1084,7 @@ guint gtk_application_inhibit (GtkApplication *application, GtkWindow *window, GtkApplicationInhibitFlags flags, - const gchar *reason) + const char *reason) { GtkApplicationPrivate *priv = gtk_application_get_instance_private (application); @@ -1146,7 +1146,7 @@ gtk_application_get_application_accels (GtkApplication *application) * Returns: (transfer full): a %NULL-terminated array of strings, * free with g_strfreev() when done */ -gchar ** +char ** gtk_application_list_action_descriptions (GtkApplication *application) { GtkApplicationPrivate *priv = gtk_application_get_instance_private (application); @@ -1176,11 +1176,11 @@ gtk_application_list_action_descriptions (GtkApplication *application) */ void gtk_application_set_accels_for_action (GtkApplication *application, - const gchar *detailed_action_name, - const gchar * const *accels) + const char *detailed_action_name, + const char * const *accels) { GtkApplicationPrivate *priv = gtk_application_get_instance_private (application); - gchar *action_and_target; + char *action_and_target; g_return_if_fail (GTK_IS_APPLICATION (application)); g_return_if_fail (detailed_action_name != NULL); @@ -1209,9 +1209,9 @@ gtk_application_set_accels_for_action (GtkApplication *application, * Returns: (transfer full): accelerators for @detailed_action_name, as * a %NULL-terminated array. Free with g_strfreev() when no longer needed */ -gchar ** +char ** gtk_application_get_accels_for_action (GtkApplication *application, - const gchar *detailed_action_name) + const char *detailed_action_name) { GtkApplicationPrivate *priv = gtk_application_get_instance_private (application); @@ -1245,9 +1245,9 @@ gtk_application_get_accels_for_action (GtkApplication *application, * * Returns: (transfer full): a %NULL-terminated array of actions for @accel */ -gchar ** +char ** gtk_application_get_actions_for_accel (GtkApplication *application, - const gchar *accel) + const char *accel) { GtkApplicationPrivate *priv = gtk_application_get_instance_private (application); @@ -1269,7 +1269,7 @@ gtk_application_get_action_muxer (GtkApplication *application) void gtk_application_insert_action_group (GtkApplication *application, - const gchar *name, + const char *name, GActionGroup *action_group) { GtkApplicationPrivate *priv = gtk_application_get_instance_private (application); @@ -1311,7 +1311,7 @@ gtk_application_handle_window_map (GtkApplication *application, */ GMenu * gtk_application_get_menu_by_id (GtkApplication *application, - const gchar *id) + const char *id) { GtkApplicationPrivate *priv = gtk_application_get_instance_private (application); GObject *object; diff --git a/gtk/gtkapplication.h b/gtk/gtkapplication.h index a749adfd2a..56e51a18a6 100644 --- a/gtk/gtkapplication.h +++ b/gtk/gtkapplication.h @@ -72,7 +72,7 @@ GDK_AVAILABLE_IN_ALL GType gtk_application_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkApplication * gtk_application_new (const gchar *application_id, +GtkApplication * gtk_application_new (const char *application_id, GApplicationFlags flags); GDK_AVAILABLE_IN_ALL @@ -103,7 +103,7 @@ GDK_AVAILABLE_IN_ALL guint gtk_application_inhibit (GtkApplication *application, GtkWindow *window, GtkApplicationInhibitFlags flags, - const gchar *reason); + const char *reason); GDK_AVAILABLE_IN_ALL void gtk_application_uninhibit (GtkApplication *application, guint cookie); @@ -116,24 +116,24 @@ GDK_AVAILABLE_IN_ALL GtkWindow * gtk_application_get_active_window (GtkApplication *application); GDK_AVAILABLE_IN_ALL -gchar ** gtk_application_list_action_descriptions (GtkApplication *application); +char ** gtk_application_list_action_descriptions (GtkApplication *application); GDK_AVAILABLE_IN_ALL -gchar ** gtk_application_get_accels_for_action (GtkApplication *application, - const gchar *detailed_action_name); +char ** gtk_application_get_accels_for_action (GtkApplication *application, + const char *detailed_action_name); GDK_AVAILABLE_IN_ALL -gchar ** gtk_application_get_actions_for_accel (GtkApplication *application, - const gchar *accel); +char ** gtk_application_get_actions_for_accel (GtkApplication *application, + const char *accel); GDK_AVAILABLE_IN_ALL void gtk_application_set_accels_for_action (GtkApplication *application, - const gchar *detailed_action_name, - const gchar * const *accels); + const char *detailed_action_name, + const char * const *accels); GDK_AVAILABLE_IN_ALL GMenu * gtk_application_get_menu_by_id (GtkApplication *application, - const gchar *id); + const char *id); G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkApplication, g_object_unref) diff --git a/gtk/gtkapplicationaccels.c b/gtk/gtkapplicationaccels.c index cdbaafe3cb..8ac33f8526 100644 --- a/gtk/gtkapplicationaccels.c +++ b/gtk/gtkapplicationaccels.c @@ -70,10 +70,10 @@ gtk_application_accels_new (void) void gtk_application_accels_set_accels_for_action (GtkApplicationAccels *accels, - const gchar *detailed_action_name, - const gchar * const *accelerators) + const char *detailed_action_name, + const char * const *accelerators) { - gchar *action_name; + char *action_name; GVariant *target; GtkShortcut *shortcut; GtkShortcutTrigger *trigger = NULL; @@ -173,9 +173,9 @@ append_accelerators (GPtrArray *accels, } } -gchar ** +char ** gtk_application_accels_get_accels_for_action (GtkApplicationAccels *accels, - const gchar *detailed_action_name) + const char *detailed_action_name) { GPtrArray *result; char *action_name; @@ -190,7 +190,7 @@ gtk_application_accels_get_accels_for_action (GtkApplicationAccels *accels, g_critical ("Error parsing action name: %s", error->message); g_error_free (error); g_ptr_array_add (result, NULL); - return (gchar **) g_ptr_array_free (result, FALSE); + return (char **) g_ptr_array_free (result, FALSE); } for (i = 0; i < g_list_model_get_n_items (accels->shortcuts); i++) @@ -222,7 +222,7 @@ gtk_application_accels_get_accels_for_action (GtkApplicationAccels *accels, if (target) g_variant_unref (target); g_ptr_array_add (result, NULL); - return (gchar **) g_ptr_array_free (result, FALSE); + return (char **) g_ptr_array_free (result, FALSE); } static gboolean @@ -262,9 +262,9 @@ get_detailed_name_for_shortcut (GtkShortcut *shortcut) gtk_shortcut_get_arguments (shortcut)); } -gchar ** +char ** gtk_application_accels_get_actions_for_accel (GtkApplicationAccels *accels, - const gchar *accel) + const char *accel) { GPtrArray *result; guint key, modifiers; @@ -297,10 +297,10 @@ gtk_application_accels_get_actions_for_accel (GtkApplicationAccels *accels, } g_ptr_array_add (result, NULL); - return (gchar **) g_ptr_array_free (result, FALSE); + return (char **) g_ptr_array_free (result, FALSE); } -gchar ** +char ** gtk_application_accels_list_action_descriptions (GtkApplicationAccels *accels) { GPtrArray *result; @@ -321,7 +321,7 @@ gtk_application_accels_list_action_descriptions (GtkApplicationAccels *accels) } g_ptr_array_add (result, NULL); - return (gchar **) g_ptr_array_free (result, FALSE); + return (char **) g_ptr_array_free (result, FALSE); } GListModel * diff --git a/gtk/gtkapplicationaccelsprivate.h b/gtk/gtkapplicationaccelsprivate.h index fbde7da368..a33f7618b9 100644 --- a/gtk/gtkapplicationaccelsprivate.h +++ b/gtk/gtkapplicationaccelsprivate.h @@ -36,16 +36,16 @@ GtkApplicationAccels * gtk_application_accels_new (void); void gtk_application_accels_set_accels_for_action (GtkApplicationAccels *accels, - const gchar *detailed_action_name, - const gchar * const *accelerators); + const char *detailed_action_name, + const char * const *accelerators); -gchar ** gtk_application_accels_get_accels_for_action (GtkApplicationAccels *accels, - const gchar *detailed_action_name); +char ** gtk_application_accels_get_accels_for_action (GtkApplicationAccels *accels, + const char *detailed_action_name); -gchar ** gtk_application_accels_get_actions_for_accel (GtkApplicationAccels *accels, - const gchar *accel); +char ** gtk_application_accels_get_actions_for_accel (GtkApplicationAccels *accels, + const char *accel); -gchar ** gtk_application_accels_list_action_descriptions (GtkApplicationAccels *accels); +char ** gtk_application_accels_list_action_descriptions (GtkApplicationAccels *accels); GListModel * gtk_application_accels_get_shortcuts (GtkApplicationAccels *accels); diff --git a/gtk/gtkapplicationimpl.c b/gtk/gtkapplicationimpl.c index c72514d0af..fa9475905d 100644 --- a/gtk/gtkapplicationimpl.c +++ b/gtk/gtkapplicationimpl.c @@ -135,7 +135,7 @@ guint gtk_application_impl_inhibit (GtkApplicationImpl *impl, GtkWindow *window, GtkApplicationInhibitFlags flags, - const gchar *reason) + const char *reason) { return GTK_APPLICATION_IMPL_GET_CLASS (impl)->inhibit (impl, window, flags, reason); } diff --git a/gtk/gtkapplicationprivate.h b/gtk/gtkapplicationprivate.h index 24ef7c4a40..8288c2b093 100644 --- a/gtk/gtkapplicationprivate.h +++ b/gtk/gtkapplicationprivate.h @@ -40,7 +40,7 @@ GtkActionMuxer * gtk_application_get_parent_muxer_for_window (GtkWind GtkActionMuxer * gtk_application_get_action_muxer (GtkApplication *application); void gtk_application_insert_action_group (GtkApplication *application, - const gchar *name, + const char *name, GActionGroup *action_group); GtkApplicationAccels * gtk_application_get_application_accels (GtkApplication *application); @@ -93,7 +93,7 @@ typedef struct guint (* inhibit) (GtkApplicationImpl *impl, GtkWindow *window, GtkApplicationInhibitFlags flags, - const gchar *reason); + const char *reason); void (* uninhibit) (GtkApplicationImpl *impl, guint cookie); gboolean (* is_inhibited) (GtkApplicationImpl *impl, @@ -118,20 +118,20 @@ typedef struct GDBusConnection *session; - const gchar *application_id; - const gchar *unique_name; - const gchar *object_path; + const char *application_id; + const char *unique_name; + const char *object_path; - gchar *app_menu_path; + char *app_menu_path; guint app_menu_id; - gchar *menubar_path; + char *menubar_path; guint menubar_id; /* Session management... */ GDBusProxy *sm_proxy; GDBusProxy *client_proxy; - gchar *client_path; + char *client_path; GDBusProxy *ss_proxy; /* Portal support */ @@ -181,13 +181,13 @@ void gtk_application_impl_set_menubar (GtkAppl guint gtk_application_impl_inhibit (GtkApplicationImpl *impl, GtkWindow *window, GtkApplicationInhibitFlags flags, - const gchar *reason); + const char *reason); void gtk_application_impl_uninhibit (GtkApplicationImpl *impl, guint cookie); gboolean gtk_application_impl_is_inhibited (GtkApplicationImpl *impl, GtkApplicationInhibitFlags flags); -gchar * gtk_application_impl_dbus_get_window_path (GtkApplicationImplDBus *dbus, +char * gtk_application_impl_dbus_get_window_path (GtkApplicationImplDBus *dbus, GtkWindow *window); gboolean gtk_application_impl_prefers_app_menu (GtkApplicationImpl *impl); diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c index bc711301e2..eff8257e62 100644 --- a/gtk/gtkapplicationwindow.c +++ b/gtk/gtkapplicationwindow.c @@ -119,7 +119,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkApplicationWindowActions, gtk_application_window_act static void gtk_application_window_actions_activate_action_full (GRemoteActionGroup *remote, - const gchar *action_name, + const char *action_name, GVariant *parameter, GVariant *platform_data) { @@ -137,7 +137,7 @@ gtk_application_window_actions_activate_action_full (GRemoteActionGroup *remote, static void gtk_application_window_actions_change_action_state_full (GRemoteActionGroup *remote, - const gchar *action_name, + const char *action_name, GVariant *value, GVariant *platform_data) { @@ -278,7 +278,7 @@ gtk_application_window_shell_shows_menubar_changed (GObject *object, gtk_application_window_update_menubar (window); } -static gchar ** +static char ** gtk_application_window_list_actions (GActionGroup *group) { GtkApplicationWindow *window = GTK_APPLICATION_WINDOW (group); @@ -293,7 +293,7 @@ gtk_application_window_list_actions (GActionGroup *group) static gboolean gtk_application_window_query_action (GActionGroup *group, - const gchar *action_name, + const char *action_name, gboolean *enabled, const GVariantType **parameter_type, const GVariantType **state_type, @@ -312,7 +312,7 @@ gtk_application_window_query_action (GActionGroup *group, static void gtk_application_window_activate_action (GActionGroup *group, - const gchar *action_name, + const char *action_name, GVariant *parameter) { GtkApplicationWindow *window = GTK_APPLICATION_WINDOW (group); @@ -326,7 +326,7 @@ gtk_application_window_activate_action (GActionGroup *group, static void gtk_application_window_change_action_state (GActionGroup *group, - const gchar *action_name, + const char *action_name, GVariant *state) { GtkApplicationWindow *window = GTK_APPLICATION_WINDOW (group); @@ -340,7 +340,7 @@ gtk_application_window_change_action_state (GActionGroup *group, static GAction * gtk_application_window_lookup_action (GActionMap *action_map, - const gchar *action_name) + const char *action_name) { GtkApplicationWindow *window = GTK_APPLICATION_WINDOW (action_map); GtkApplicationWindowPrivate *priv = gtk_application_window_get_instance_private (window); @@ -366,7 +366,7 @@ gtk_application_window_add_action (GActionMap *action_map, static void gtk_application_window_remove_action (GActionMap *action_map, - const gchar *action_name) + const char *action_name) { GtkApplicationWindow *window = GTK_APPLICATION_WINDOW (action_map); GtkApplicationWindowPrivate *priv = gtk_application_window_get_instance_private (window); diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c index af8365a1c5..558f5bda5f 100644 --- a/gtk/gtkassistant.c +++ b/gtk/gtkassistant.c @@ -96,7 +96,7 @@ struct _GtkAssistantPage guint complete : 1; guint complete_set : 1; - gchar *title; + char *title; GtkWidget *page; GtkWidget *regular_title; @@ -178,13 +178,13 @@ static void gtk_assistant_buildable_add_child (GtkBuildable *bu static gboolean gtk_assistant_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); static void gtk_assistant_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data); static GList* find_page (GtkAssistant *assistant, @@ -1881,7 +1881,7 @@ gtk_assistant_remove_action_widget (GtkAssistant *assistant, void gtk_assistant_set_page_title (GtkAssistant *assistant, GtkWidget *page, - const gchar *title) + const char *title) { GtkAssistantPage *page_info; GList *child; @@ -1907,7 +1907,7 @@ gtk_assistant_set_page_title (GtkAssistant *assistant, * * Returns: the title for @page */ -const gchar* +const char * gtk_assistant_get_page_title (GtkAssistant *assistant, GtkWidget *page) { @@ -2122,7 +2122,7 @@ gtk_assistant_accessible_ref_child (AtkObject *accessible, GtkWidget *widget, *child; int n_pages; AtkObject *obj; - const gchar *title; + const char *title; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)); if (widget == NULL) @@ -2211,7 +2211,7 @@ gboolean gtk_assistant_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data) { @@ -2223,7 +2223,7 @@ static void gtk_assistant_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data) { parent_buildable_iface->custom_finished (buildable, builder, child, diff --git a/gtk/gtkassistant.h b/gtk/gtkassistant.h index 753703f93c..6037acb3d1 100644 --- a/gtk/gtkassistant.h +++ b/gtk/gtkassistant.h @@ -144,9 +144,9 @@ GtkAssistantPageType gtk_assistant_get_page_type (GtkAssistant GDK_AVAILABLE_IN_ALL void gtk_assistant_set_page_title (GtkAssistant *assistant, GtkWidget *page, - const gchar *title); + const char *title); GDK_AVAILABLE_IN_ALL -const gchar * gtk_assistant_get_page_title (GtkAssistant *assistant, +const char * gtk_assistant_get_page_title (GtkAssistant *assistant, GtkWidget *page); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkbookmarklist.c b/gtk/gtkbookmarklist.c index 537389e316..f900a94246 100644 --- a/gtk/gtkbookmarklist.c +++ b/gtk/gtkbookmarklist.c @@ -355,7 +355,7 @@ gtk_bookmark_list_start_loading (GtkBookmarkList *self) for (i = 0; i < len; i++) { - const gchar *uri = uris[i]; + const char *uri = uris[i]; GFile *file; /* add this item */ diff --git a/gtk/gtkbookmarksmanager.c b/gtk/gtkbookmarksmanager.c index 42ec6b1296..4fce669113 100644 --- a/gtk/gtkbookmarksmanager.c +++ b/gtk/gtkbookmarksmanager.c @@ -43,7 +43,7 @@ _gtk_bookmark_free (gpointer data) static void set_error_bookmark_doesnt_exist (GFile *file, GError **error) { - gchar *uri = g_file_get_uri (file); + char *uri = g_file_get_uri (file); g_set_error (error, GTK_FILE_CHOOSER_ERROR, @@ -58,7 +58,7 @@ static GFile * get_legacy_bookmarks_file (void) { GFile *file; - gchar *filename; + char *filename; filename = g_build_filename (g_get_home_dir (), ".gtk-bookmarks", NULL); file = g_file_new_for_path (filename); @@ -71,7 +71,7 @@ static GFile * get_bookmarks_file (void) { GFile *file; - gchar *filename; + char *filename; /* Use gtk-3.0's bookmarks file as the format didn't change. * Add the 3.0 file format to get_legacy_bookmarks_file() when @@ -87,7 +87,7 @@ get_bookmarks_file (void) static GSList * parse_bookmarks (const char *contents) { - gchar **lines, *space; + char **lines, *space; GSList *bookmarks = NULL; int i; @@ -124,7 +124,7 @@ parse_bookmarks (const char *contents) static GSList * read_bookmarks (GFile *file) { - gchar *contents; + char *contents; GSList *bookmarks = NULL; if (!g_file_load_contents (file, NULL, &contents, @@ -184,7 +184,7 @@ save_bookmarks (GFile *bookmarks_file, for (l = bookmarks; l; l = l->next) { GtkBookmark *bookmark = l->data; - gchar *uri; + char *uri; uri = g_file_get_uri (bookmark->file); if (!uri) @@ -393,7 +393,7 @@ _gtk_bookmarks_manager_insert_bookmark (GtkBookmarksManager *manager, if (link) { - gchar *uri; + char *uri; bookmark = link->data; uri = g_file_get_uri (bookmark->file); @@ -508,12 +508,12 @@ _gtk_bookmarks_manager_reorder_bookmark (GtkBookmarksManager *manager, return TRUE; } -gchar * +char * _gtk_bookmarks_manager_get_bookmark_label (GtkBookmarksManager *manager, GFile *file) { GSList *bookmarks; - gchar *label = NULL; + char *label = NULL; g_return_val_if_fail (manager != NULL, NULL); g_return_val_if_fail (file != NULL, NULL); @@ -540,7 +540,7 @@ _gtk_bookmarks_manager_get_bookmark_label (GtkBookmarksManager *manager, gboolean _gtk_bookmarks_manager_set_bookmark_label (GtkBookmarksManager *manager, GFile *file, - const gchar *label, + const char *label, GError **error) { GFile *bookmarks_file; @@ -580,7 +580,7 @@ _gtk_bookmarks_manager_get_xdg_type (GtkBookmarksManager *manager, GSList *link; gboolean match; GFile *location; - const gchar *path; + const char *path; GUserDirectory dir; GtkBookmark *bookmark; diff --git a/gtk/gtkbookmarksmanagerprivate.h b/gtk/gtkbookmarksmanagerprivate.h index e61c713a46..7333f771a5 100644 --- a/gtk/gtkbookmarksmanagerprivate.h +++ b/gtk/gtkbookmarksmanagerprivate.h @@ -43,7 +43,7 @@ typedef struct typedef struct { GFile *file; - gchar *label; + char *label; } GtkBookmark; GtkBookmarksManager *_gtk_bookmarks_manager_new (GtkBookmarksChangedFunc changed_func, @@ -71,12 +71,12 @@ gboolean _gtk_bookmarks_manager_reorder_bookmark (GtkBookmarksManager *manager, gboolean _gtk_bookmarks_manager_has_bookmark (GtkBookmarksManager *manager, GFile *file); -gchar * _gtk_bookmarks_manager_get_bookmark_label (GtkBookmarksManager *manager, +char * _gtk_bookmarks_manager_get_bookmark_label (GtkBookmarksManager *manager, GFile *file); gboolean _gtk_bookmarks_manager_set_bookmark_label (GtkBookmarksManager *manager, GFile *file, - const gchar *label, + const char *label, GError **error); gboolean _gtk_bookmarks_manager_get_is_builtin (GtkBookmarksManager *manager, diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c index 4e6a228cb3..11d430ffab 100644 --- a/gtk/gtkbox.c +++ b/gtk/gtkbox.c @@ -296,7 +296,7 @@ static void gtk_box_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) gtk_box_append (GTK_BOX (buildable), GTK_WIDGET (child)); diff --git a/gtk/gtkbuildable.c b/gtk/gtkbuildable.c index 7211c3b300..85bf0485d0 100644 --- a/gtk/gtkbuildable.c +++ b/gtk/gtkbuildable.c @@ -57,7 +57,7 @@ gtk_buildable_default_init (GtkBuildableInterface *iface) **/ void gtk_buildable_set_name (GtkBuildable *buildable, - const gchar *name) + const char *name) { GtkBuildableIface *iface; @@ -87,7 +87,7 @@ gtk_buildable_set_name (GtkBuildable *buildable, * * Returns: the name set with gtk_buildable_set_name() **/ -const gchar * +const char * gtk_buildable_get_name (GtkBuildable *buildable) { GtkBuildableIface *iface; @@ -99,7 +99,7 @@ gtk_buildable_get_name (GtkBuildable *buildable) if (iface->get_name) return (* iface->get_name) (buildable); else - return (const gchar*)g_object_get_data (G_OBJECT (buildable), + return (const char *)g_object_get_data (G_OBJECT (buildable), "gtk-builder-name"); } @@ -117,7 +117,7 @@ void gtk_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { GtkBuildableIface *iface; @@ -142,7 +142,7 @@ gtk_buildable_add_child (GtkBuildable *buildable, void gtk_buildable_set_buildable_property (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *name, + const char *name, const GValue *value) { GtkBuildableIface *iface; @@ -200,7 +200,7 @@ gtk_buildable_parser_finished (GtkBuildable *buildable, GObject * gtk_buildable_construct_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *name) + const char *name) { GtkBuildableIface *iface; @@ -233,7 +233,7 @@ gboolean gtk_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data) { @@ -265,7 +265,7 @@ void gtk_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data) { GtkBuildableIface *iface; @@ -294,7 +294,7 @@ void gtk_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data) { GtkBuildableIface *iface; @@ -320,7 +320,7 @@ gtk_buildable_custom_finished (GtkBuildable *buildable, GObject * gtk_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *childname) + const char *childname) { GtkBuildableIface *iface; diff --git a/gtk/gtkbuildable.h b/gtk/gtkbuildable.h index 560fe9dcce..7450103f57 100644 --- a/gtk/gtkbuildable.h +++ b/gtk/gtkbuildable.h @@ -43,22 +43,22 @@ struct _GtkBuildableParser { /* Called for open tags */ void (*start_element) (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **attribute_names, - const gchar **attribute_values, + const char *element_name, + const char **attribute_names, + const char **attribute_values, gpointer user_data, GError **error); /* Called for close tags */ void (*end_element) (GtkBuildableParseContext *context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error); /* Called for character data */ /* text is not nul-terminated */ void (*text) (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error); @@ -127,41 +127,41 @@ struct _GtkBuildableIface /* virtual table */ void (* set_name) (GtkBuildable *buildable, - const gchar *name); - const gchar * (* get_name) (GtkBuildable *buildable); + const char *name); + const char * (* get_name) (GtkBuildable *buildable); void (* add_child) (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type); + const char *type); void (* set_buildable_property) (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *name, + const char *name, const GValue *value); GObject * (* construct_child) (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *name); + const char *name); gboolean (* custom_tag_start) (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); void (* custom_tag_end) (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data); void (* custom_finished) (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data); void (* parser_finished) (GtkBuildable *buildable, GtkBuilder *builder); GObject * (* get_internal_child) (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *childname); + const char *childname); }; @@ -170,41 +170,41 @@ GType gtk_buildable_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL void gtk_buildable_set_name (GtkBuildable *buildable, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL -const gchar * gtk_buildable_get_name (GtkBuildable *buildable); +const char * gtk_buildable_get_name (GtkBuildable *buildable); GDK_AVAILABLE_IN_ALL void gtk_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type); + const char *type); GDK_AVAILABLE_IN_ALL void gtk_buildable_set_buildable_property (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *name, + const char *name, const GValue *value); GDK_AVAILABLE_IN_ALL GObject * gtk_buildable_construct_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL gboolean gtk_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); GDK_AVAILABLE_IN_ALL void gtk_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data); GDK_AVAILABLE_IN_ALL void gtk_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data); GDK_AVAILABLE_IN_ALL void gtk_buildable_parser_finished (GtkBuildable *buildable, @@ -212,7 +212,7 @@ void gtk_buildable_parser_finished (GtkBuildable *buildable, GDK_AVAILABLE_IN_ALL GObject * gtk_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *childname); + const char *childname); GDK_AVAILABLE_IN_ALL void gtk_buildable_parse_context_push (GtkBuildableParseContext *context, diff --git a/gtk/gtkbuilder-menus.c b/gtk/gtkbuilder-menus.c index 14d54cc832..aca07e3f2e 100644 --- a/gtk/gtkbuilder-menus.c +++ b/gtk/gtkbuilder-menus.c @@ -38,12 +38,12 @@ typedef struct struct frame frame; /* attributes */ - gchar *attribute; + char *attribute; GVariantType *type; GString *string; /* translation */ - gchar *context; + char *context; gboolean translatable; } GtkBuilderMenuState; @@ -81,9 +81,9 @@ gtk_builder_menu_pop_frame (GtkBuilderMenuState *state) static void gtk_builder_menu_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **attribute_names, - const gchar **attribute_values, + const char *element_name, + const char **attribute_names, + const char **attribute_values, gpointer user_data, GError **error) { @@ -115,7 +115,7 @@ gtk_builder_menu_start_element (GtkBuildableParseContext *context, else if (g_str_equal (element_name, "submenu")) { - const gchar *id; + const char *id; if (COLLECT (STRING | OPTIONAL, "id", &id)) { @@ -136,7 +136,7 @@ gtk_builder_menu_start_element (GtkBuildableParseContext *context, else if (g_str_equal (element_name, "section")) { - const gchar *id; + const char *id; if (COLLECT (STRING | OPTIONAL, "id", &id)) { @@ -161,9 +161,9 @@ gtk_builder_menu_start_element (GtkBuildableParseContext *context, /* Can have '' or '' here. */ if (g_str_equal (element_name, "attribute")) { - const gchar *typestr; - const gchar *name; - const gchar *ctxt; + const char *typestr; + const char *name; + const char *ctxt; if (COLLECT (STRING, "name", &name, OPTIONAL | BOOLEAN, "translatable", &state->translatable, @@ -192,8 +192,8 @@ gtk_builder_menu_start_element (GtkBuildableParseContext *context, if (g_str_equal (element_name, "link")) { - const gchar *name; - const gchar *id; + const char *name; + const char *id; if (COLLECT (STRING, "name", &name, STRING | OPTIONAL, "id", &id)) @@ -222,7 +222,7 @@ gtk_builder_menu_start_element (GtkBuildableParseContext *context, g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT, _("Element <%s> not allowed inside <%s>"), element_name, - (const gchar *) g_ptr_array_index (element_stack, element_stack->len - 2)); + (const char *) g_ptr_array_index (element_stack, element_stack->len - 2)); else g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT, @@ -232,7 +232,7 @@ gtk_builder_menu_start_element (GtkBuildableParseContext *context, static void gtk_builder_menu_end_element (GtkBuildableParseContext *context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error) { @@ -243,7 +243,7 @@ gtk_builder_menu_end_element (GtkBuildableParseContext *context, if (state->string) { GVariant *value; - gchar *text; + char *text; text = g_string_free (state->string, FALSE); state->string = NULL; @@ -251,7 +251,7 @@ gtk_builder_menu_end_element (GtkBuildableParseContext *context, /* do the translation if necessary */ if (state->translatable) { - const gchar *translated; + const char *translated; if (state->context) translated = g_dpgettext2 (state->parser_data->domain, state->context, text); @@ -299,7 +299,7 @@ gtk_builder_menu_end_element (GtkBuildableParseContext *context, static void gtk_builder_menu_text (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) @@ -359,13 +359,13 @@ static GtkBuildableParser gtk_builder_menu_subparser = void _gtk_builder_menu_start (ParserData *parser_data, - const gchar *element_name, - const gchar **attribute_names, - const gchar **attribute_values, + const char *element_name, + const char **attribute_names, + const char **attribute_values, GError **error) { GtkBuilderMenuState *state; - gchar *id; + char *id; state = g_slice_new0 (GtkBuilderMenuState); state->parser_data = parser_data; diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index 705bc52ec4..7dd1035442 100644 --- a/gtk/gtkbuilder.c +++ b/gtk/gtkbuilder.c @@ -260,13 +260,13 @@ struct _GtkBuilderClass typedef struct { - gchar *domain; + char *domain; GHashTable *objects; GSList *delayed_properties; GSList *signals; GSList *bindings; - gchar *filename; - gchar *resource_prefix; + char *filename; + char *resource_prefix; GType template_type; GObject *current_object; GtkBuilderScope *scope; @@ -447,9 +447,9 @@ gtk_builder_get_property (GObject *object, typedef struct { - gchar *object; + char *object; GParamSpec *pspec; - gchar *value; + char *value; int line; int col; } DelayedProperty; @@ -529,7 +529,7 @@ object_properties_get_value (const ObjectProperties *self, static void gtk_builder_get_parameters (GtkBuilder *builder, GType object_type, - const gchar *object_name, + const char *object_name, GSList *properties, GParamFlags filter_flags, ObjectProperties *parameters, @@ -625,7 +625,7 @@ gtk_builder_get_parameters (GtkBuilder *builder, } } -static const gchar * +static const char * object_get_name (GObject *object) { if (GTK_IS_BUILDABLE (object)) @@ -637,7 +637,7 @@ object_get_name (GObject *object) static GObject * gtk_builder_get_internal_child (GtkBuilder *builder, ObjectInfo *info, - const gchar *childname, + const char *childname, GError **error) { GObject *obj = NULL; @@ -673,7 +673,7 @@ gtk_builder_get_internal_child (GtkBuilder *builder, static inline void object_set_name (GObject *object, - const gchar *name) + const char *name) { if (GTK_IS_BUILDABLE (object)) gtk_buildable_set_name (GTK_BUILDABLE (object), name); @@ -683,7 +683,7 @@ object_set_name (GObject *object, void _gtk_builder_add_object (GtkBuilder *builder, - const gchar *id, + const char *id, GObject *object) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); @@ -825,7 +825,7 @@ _gtk_builder_construct (GtkBuilder *builder, info->parent->tag_type == TAG_CHILD && ((ChildInfo*)info->parent)->internal_child != NULL) { - gchar *childname = ((ChildInfo*)info->parent)->internal_child; + char *childname = ((ChildInfo*)info->parent)->internal_child; obj = gtk_builder_get_internal_child (builder, info, childname, error); if (!obj) { @@ -890,7 +890,7 @@ _gtk_builder_construct (GtkBuilder *builder, #ifdef G_ENABLE_DEBUG if (GTK_DEBUG_CHECK (BUILDER)) { - gchar *str = g_strdup_value_contents (value); + char *str = g_strdup_value_contents (value); g_message ("set %s: %s = %s", info->id, name, str); g_free (str); } @@ -957,7 +957,7 @@ _gtk_builder_apply_properties (GtkBuilder *builder, #ifdef G_ENABLE_DEBUG if (GTK_DEBUG_CHECK (BUILDER)) { - gchar *str = g_strdup_value_contents (value); + char *str = g_strdup_value_contents (value); g_message ("set %s: %s = %s", info->id, name, str); g_free (str); } @@ -1193,11 +1193,11 @@ gtk_builder_new (void) **/ gboolean gtk_builder_add_from_file (GtkBuilder *builder, - const gchar *filename, + const char *filename, GError **error) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); - gchar *buffer; + char *buffer; gsize length; GError *tmp_error; @@ -1257,12 +1257,12 @@ gtk_builder_add_from_file (GtkBuilder *builder, **/ gboolean gtk_builder_add_objects_from_file (GtkBuilder *builder, - const gchar *filename, + const char *filename, const char **object_ids, GError **error) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); - gchar *buffer; + char *buffer; gsize length; GError *tmp_error; @@ -1322,7 +1322,7 @@ gboolean gtk_builder_extend_with_template (GtkBuilder *builder, GObject *object, GType template_type, - const gchar *buffer, + const char *buffer, gssize length, GError **error) { @@ -1384,7 +1384,7 @@ gtk_builder_extend_with_template (GtkBuilder *builder, **/ gboolean gtk_builder_add_from_resource (GtkBuilder *builder, - const gchar *resource_path, + const char *resource_path, GError **error) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); @@ -1458,7 +1458,7 @@ gtk_builder_add_from_resource (GtkBuilder *builder, **/ gboolean gtk_builder_add_objects_from_resource (GtkBuilder *builder, - const gchar *resource_path, + const char *resource_path, const char **object_ids, GError **error) { @@ -1534,7 +1534,7 @@ gtk_builder_add_objects_from_resource (GtkBuilder *builder, **/ gboolean gtk_builder_add_from_string (GtkBuilder *builder, - const gchar *buffer, + const char *buffer, gssize length, GError **error) { @@ -1588,7 +1588,7 @@ gtk_builder_add_from_string (GtkBuilder *builder, **/ gboolean gtk_builder_add_objects_from_string (GtkBuilder *builder, - const gchar *buffer, + const char *buffer, gssize length, const char **object_ids, GError **error) @@ -1635,7 +1635,7 @@ gtk_builder_add_objects_from_string (GtkBuilder *builder, **/ GObject * gtk_builder_get_object (GtkBuilder *builder, - const gchar *name) + const char *name) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); @@ -1684,10 +1684,10 @@ gtk_builder_get_objects (GtkBuilder *builder) **/ void gtk_builder_set_translation_domain (GtkBuilder *builder, - const gchar *domain) + const char *domain) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); - gchar *new_domain; + char *new_domain; g_return_if_fail (GTK_IS_BUILDER (builder)); @@ -1708,7 +1708,7 @@ gtk_builder_set_translation_domain (GtkBuilder *builder, * in case it was never set or explicitly unset via gtk_builder_set_translation_domain(). * This string is owned by the builder object and must not be modified or freed. **/ -const gchar * +const char * gtk_builder_get_translation_domain (GtkBuilder *builder) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); @@ -1729,7 +1729,7 @@ gtk_builder_get_translation_domain (GtkBuilder *builder) **/ void gtk_builder_expose_object (GtkBuilder *builder, - const gchar *name, + const char *name, GObject *object) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); @@ -1946,7 +1946,7 @@ _gtk_builder_finish (GtkBuilder *builder, gboolean gtk_builder_value_from_string (GtkBuilder *builder, GParamSpec *pspec, - const gchar *string, + const char *string, GValue *value, GError **error) { @@ -2021,7 +2021,7 @@ gtk_builder_value_from_string (GtkBuilder *builder, gboolean gtk_builder_value_from_string_type (GtkBuilder *builder, GType type, - const gchar *string, + const char *string, GValue *value, GError **error) { @@ -2058,7 +2058,7 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, case G_TYPE_INT64: { gint64 l; - gchar *endptr = NULL; + char *endptr = NULL; errno = 0; l = g_ascii_strtoll (string, &endptr, 0); @@ -2085,7 +2085,7 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, case G_TYPE_UINT64: { guint64 ul; - gchar *endptr = NULL; + char *endptr = NULL; errno = 0; ul = g_ascii_strtoull (string, &endptr, 0); if (errno || endptr == string) @@ -2133,7 +2133,7 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, case G_TYPE_DOUBLE: { gdouble d; - gchar *endptr = NULL; + char *endptr = NULL; errno = 0; d = g_ascii_strtod (string, &endptr); if (errno || endptr == string) @@ -2201,7 +2201,7 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, } else if (G_VALUE_HOLDS (value, G_TYPE_STRV)) { - gchar **vector = g_strsplit (string, "\n", 0); + char **vector = g_strsplit (string, "\n", 0); g_value_take_boxed (value, vector); } else if (G_VALUE_HOLDS (value, G_TYPE_BYTES)) @@ -2224,7 +2224,7 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, G_VALUE_HOLDS (value, GDK_TYPE_PAINTABLE) || G_VALUE_HOLDS (value, GDK_TYPE_TEXTURE)) { - gchar *filename; + char *filename; GError *tmp_error = NULL; GdkPixbuf *pixbuf = NULL; GObject *object; @@ -2407,13 +2407,13 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, gboolean _gtk_builder_enum_from_string (GType type, - const gchar *string, + const char *string, int *enum_value, GError **error) { GEnumClass *eclass; GEnumValue *ev; - gchar *endptr; + char *endptr; int value; gboolean ret; @@ -2455,16 +2455,16 @@ _gtk_builder_enum_from_string (GType type, gboolean _gtk_builder_flags_from_string (GType type, GFlagsValue *aliases, - const gchar *string, + const char *string, guint *flags_value, GError **error) { GFlagsClass *fclass; - gchar *endptr, *prevptr; + char *endptr, *prevptr; guint i, j, k, value; - gchar *flagstr; + char *flagstr; GFlagsValue *fv; - const gchar *flag; + const char *flag; gunichar ch; gboolean eos, ret; @@ -2572,7 +2572,7 @@ _gtk_builder_flags_from_string (GType type, } gboolean -_gtk_builder_boolean_from_string (const gchar *string, +_gtk_builder_boolean_from_string (const char *string, gboolean *value, GError **error) { @@ -2580,7 +2580,7 @@ _gtk_builder_boolean_from_string (const gchar *string, goto error; else if (string[1] == '\0') { - gchar c; + char c; c = string[0]; if (c == '1' || @@ -2631,7 +2631,7 @@ error: */ GType gtk_builder_get_type_from_name (GtkBuilder *builder, - const gchar *type_name) + const char *type_name) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); GType type; @@ -2655,8 +2655,8 @@ gtk_builder_error_quark (void) return g_quark_from_static_string ("gtk-builder-error-quark"); } -gchar * -_gtk_builder_get_resource_path (GtkBuilder *builder, const gchar *string) +char * +_gtk_builder_get_resource_path (GtkBuilder *builder, const char *string) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); @@ -2670,13 +2670,13 @@ _gtk_builder_get_resource_path (GtkBuilder *builder, const gchar *string) return g_build_path ("/", priv->resource_prefix, string, NULL); } -gchar * +char * _gtk_builder_get_absolute_filename (GtkBuilder *builder, - const gchar *string) + const char *string) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); - gchar *filename; - gchar *dirname = NULL; + char *filename; + char *dirname = NULL; if (g_path_is_absolute (string)) return g_strdup (string); @@ -2759,7 +2759,7 @@ gtk_builder_create_closure (GtkBuilder *builder, * Returns: a #GtkBuilder containing the described interface **/ GtkBuilder * -gtk_builder_new_from_file (const gchar *filename) +gtk_builder_new_from_file (const char *filename) { GError *error = NULL; GtkBuilder *builder; @@ -2784,7 +2784,7 @@ gtk_builder_new_from_file (const gchar *filename) * Returns: a #GtkBuilder containing the described interface **/ GtkBuilder * -gtk_builder_new_from_resource (const gchar *resource_path) +gtk_builder_new_from_resource (const char *resource_path) { GError *error = NULL; GtkBuilder *builder; @@ -2814,7 +2814,7 @@ gtk_builder_new_from_resource (const gchar *resource_path) * Returns: a #GtkBuilder containing the interface described by @string **/ GtkBuilder * -gtk_builder_new_from_string (const gchar *string, +gtk_builder_new_from_string (const char *string, gssize length) { GError *error = NULL; @@ -2869,8 +2869,8 @@ _gtk_builder_prefix_error (GtkBuilder *builder, void _gtk_builder_error_unhandled_tag (GtkBuilder *builder, GtkBuildableParseContext *context, - const gchar *object, - const gchar *element_name, + const char *object, + const char *element_name, GError **error) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); @@ -2902,14 +2902,14 @@ _gtk_builder_error_unhandled_tag (GtkBuilder *builder, gboolean _gtk_builder_check_parent (GtkBuilder *builder, GtkBuildableParseContext *context, - const gchar *parent_name, + const char *parent_name, GError **error) { GtkBuilderPrivate *priv = gtk_builder_get_instance_private (builder); GPtrArray *stack; int line, col; - const gchar *parent; - const gchar *element; + const char *parent; + const char *element; stack = gtk_buildable_parse_context_get_element_stack (context); @@ -2932,7 +2932,7 @@ _gtk_builder_check_parent (GtkBuilder *builder, GObject * gtk_builder_lookup_object (GtkBuilder *builder, - const gchar *name, + const char *name, int line, int col, GError **error) @@ -2969,7 +2969,7 @@ gtk_builder_lookup_object (GtkBuilder *builder, */ GObject * _gtk_builder_lookup_object (GtkBuilder *builder, - const gchar *name, + const char *name, int line, int col) { diff --git a/gtk/gtkbuilder.h b/gtk/gtkbuilder.h index 724c4f499c..34c37bf315 100644 --- a/gtk/gtkbuilder.h +++ b/gtk/gtkbuilder.h @@ -100,41 +100,41 @@ GtkBuilder* gtk_builder_new (void); GDK_AVAILABLE_IN_ALL gboolean gtk_builder_add_from_file (GtkBuilder *builder, - const gchar *filename, + const char *filename, GError **error); GDK_AVAILABLE_IN_ALL gboolean gtk_builder_add_from_resource (GtkBuilder *builder, - const gchar *resource_path, + const char *resource_path, GError **error); GDK_AVAILABLE_IN_ALL gboolean gtk_builder_add_from_string (GtkBuilder *builder, - const gchar *buffer, + const char *buffer, gssize length, GError **error); GDK_AVAILABLE_IN_ALL gboolean gtk_builder_add_objects_from_file (GtkBuilder *builder, - const gchar *filename, + const char *filename, const char **object_ids, GError **error); GDK_AVAILABLE_IN_ALL gboolean gtk_builder_add_objects_from_resource(GtkBuilder *builder, - const gchar *resource_path, + const char *resource_path, const char **object_ids, GError **error); GDK_AVAILABLE_IN_ALL gboolean gtk_builder_add_objects_from_string (GtkBuilder *builder, - const gchar *buffer, + const char *buffer, gssize length, const char **object_ids, GError **error); GDK_AVAILABLE_IN_ALL GObject* gtk_builder_get_object (GtkBuilder *builder, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL GSList* gtk_builder_get_objects (GtkBuilder *builder); GDK_AVAILABLE_IN_ALL void gtk_builder_expose_object (GtkBuilder *builder, - const gchar *name, + const char *name, GObject *object); GDK_AVAILABLE_IN_ALL GObject * gtk_builder_get_current_object (GtkBuilder *builder); @@ -143,9 +143,9 @@ void gtk_builder_set_current_object (GtkBuilder *builder, GObject *current_object); GDK_AVAILABLE_IN_ALL void gtk_builder_set_translation_domain (GtkBuilder *builder, - const gchar *domain); + const char *domain); GDK_AVAILABLE_IN_ALL -const gchar* gtk_builder_get_translation_domain (GtkBuilder *builder); +const char * gtk_builder_get_translation_domain (GtkBuilder *builder); GDK_AVAILABLE_IN_ALL GtkBuilderScope *gtk_builder_get_scope (GtkBuilder *builder); GDK_AVAILABLE_IN_ALL @@ -158,21 +158,21 @@ GType gtk_builder_get_type_from_name (GtkBuilder *builder, GDK_AVAILABLE_IN_ALL gboolean gtk_builder_value_from_string (GtkBuilder *builder, GParamSpec *pspec, - const gchar *string, + const char *string, GValue *value, GError **error); GDK_AVAILABLE_IN_ALL gboolean gtk_builder_value_from_string_type (GtkBuilder *builder, GType type, - const gchar *string, + const char *string, GValue *value, GError **error); GDK_AVAILABLE_IN_ALL -GtkBuilder * gtk_builder_new_from_file (const gchar *filename); +GtkBuilder * gtk_builder_new_from_file (const char *filename); GDK_AVAILABLE_IN_ALL -GtkBuilder * gtk_builder_new_from_resource (const gchar *resource_path); +GtkBuilder * gtk_builder_new_from_resource (const char *resource_path); GDK_AVAILABLE_IN_ALL -GtkBuilder * gtk_builder_new_from_string (const gchar *string, +GtkBuilder * gtk_builder_new_from_string (const char *string, gssize length); GDK_AVAILABLE_IN_ALL @@ -199,7 +199,7 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_builder_extend_with_template (GtkBuilder *builder, GObject *object, GType template_type, - const gchar *buffer, + const char *buffer, gssize length, GError **error); diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c index 345cfb0f30..e222813e68 100644 --- a/gtk/gtkbuilderparser.c +++ b/gtk/gtkbuilderparser.c @@ -70,9 +70,9 @@ possibly_finish_subparser (GtkBuildableParseContext *context) static void proxy_start_element (GMarkupParseContext *gm_context, - const gchar *element_name, - const gchar **attribute_names, - const gchar **attribute_values, + const char *element_name, + const char **attribute_names, + const char **attribute_values, gpointer user_data, GError **error) { @@ -89,7 +89,7 @@ proxy_start_element (GMarkupParseContext *gm_context, static void proxy_end_element (GMarkupParseContext *gm_context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error) { @@ -105,7 +105,7 @@ proxy_end_element (GMarkupParseContext *gm_context, static void proxy_text (GMarkupParseContext *gm_context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) @@ -172,7 +172,7 @@ gtk_buildable_parse_context_free (GtkBuildableParseContext *context) static gboolean gtk_buildable_parse_context_parse (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gssize text_len, GError **error) { @@ -393,8 +393,8 @@ state_pop (ParserData *data) static void error_missing_attribute (ParserData *data, - const gchar *tag, - const gchar *attribute, + const char *tag, + const char *attribute, GError **error) { int line, col; @@ -410,8 +410,8 @@ error_missing_attribute (ParserData *data, static void error_invalid_tag (ParserData *data, - const gchar *tag, - const gchar *expected, + const char *tag, + const char *expected, GError **error) { int line, col; @@ -434,7 +434,7 @@ error_invalid_tag (ParserData *data, static void error_unhandled_tag (ParserData *data, - const gchar *tag, + const char *tag, GError **error) { int line, col; @@ -487,15 +487,15 @@ builder_construct (ParserData *data, static void parse_requires (ParserData *data, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, GError **error) { RequiresInfo *req_info; - const gchar *library = NULL; - const gchar *version = NULL; - gchar **split; + const char *library = NULL; + const char *version = NULL; + char **split; int version_major = 0; int version_minor = 0; @@ -530,7 +530,7 @@ parse_requires (ParserData *data, } static gboolean -is_requested_object (const gchar *object, +is_requested_object (const char *object, ParserData *data) { int i; @@ -547,19 +547,19 @@ is_requested_object (const gchar *object, static void parse_object (GtkBuildableParseContext *context, ParserData *data, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, GError **error) { ObjectInfo *object_info; ChildInfo* child_info; GType object_type = G_TYPE_INVALID; - const gchar *object_class = NULL; - const gchar *constructor = NULL; - const gchar *type_func = NULL; - const gchar *object_id = NULL; - gchar *internal_id = NULL; + const char *object_class = NULL; + const char *constructor = NULL; + const char *type_func = NULL; + const char *object_id = NULL; + char *internal_id = NULL; int line; child_info = state_peek_info (data, ChildInfo); @@ -680,14 +680,14 @@ parse_object (GtkBuildableParseContext *context, static void parse_template (GtkBuildableParseContext *context, ParserData *data, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, GError **error) { ObjectInfo *object_info; - const gchar *object_class = NULL; - const gchar *parent_class = NULL; + const char *object_class = NULL; + const char *parent_class = NULL; int line; GType template_type; GType parsed_type; @@ -796,16 +796,16 @@ free_object_info (ObjectInfo *info) static void parse_child (ParserData *data, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, GError **error) { ObjectInfo* object_info; ChildInfo *child_info; - const gchar *type = NULL; - const gchar *internal_child = NULL; + const char *type = NULL; + const char *internal_child = NULL; object_info = state_peek_info (data, ObjectInfo); if (!object_info || @@ -845,17 +845,17 @@ free_child_info (ChildInfo *info) static void parse_property (ParserData *data, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, GError **error) { PropertyInfo *info; - const gchar *name = NULL; - const gchar *context = NULL; - const gchar *bind_source = NULL; - const gchar *bind_property = NULL; - const gchar *bind_flags_str = NULL; + const char *name = NULL; + const char *context = NULL; + const char *bind_source = NULL; + const char *bind_property = NULL; + const char *bind_flags_str = NULL; GBindingFlags bind_flags = G_BINDING_DEFAULT; gboolean translatable = FALSE; ObjectInfo *object_info; @@ -948,9 +948,9 @@ parse_property (ParserData *data, static void parse_binding (ParserData *data, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, GError **error) { BindingExpressionInfo *info; @@ -1111,9 +1111,9 @@ check_expression_parent (ParserData *data) static void parse_constant_expression (ParserData *data, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, GError **error) { ExpressionInfo *info; @@ -1161,9 +1161,9 @@ parse_constant_expression (ParserData *data, static void parse_closure_expression (ParserData *data, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, GError **error) { ExpressionInfo *info; @@ -1223,9 +1223,9 @@ parse_closure_expression (ParserData *data, static void parse_lookup_expression (ParserData *data, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, GError **error) { ExpressionInfo *info; @@ -1445,15 +1445,15 @@ expression_info_construct (GtkBuilder *builder, static void parse_signal (ParserData *data, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, GError **error) { SignalInfo *info; - const gchar *name; - const gchar *handler = NULL; - const gchar *object = NULL; + const char *name; + const char *handler = NULL; + const char *object = NULL; gboolean after = FALSE; gboolean swapped = -1; ObjectInfo *object_info; @@ -1555,12 +1555,12 @@ free_requires_info (RequiresInfo *info, static void parse_interface (ParserData *data, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, GError **error) { - const gchar *domain = NULL; + const char *domain = NULL; if (!g_markup_collect_attributes (element_name, names, values, error, G_MARKUP_COLLECT_STRING|G_MARKUP_COLLECT_OPTIONAL, "domain", &domain, @@ -1587,7 +1587,7 @@ parse_interface (ParserData *data, static SubParser * create_subparser (GObject *object, GObject *child, - const gchar *element_name, + const char *element_name, GtkBuildableParser *parser, gpointer user_data) { @@ -1613,9 +1613,9 @@ free_subparser (SubParser *subparser) static gboolean subparser_start (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, ParserData *data, GError **error) { @@ -1638,7 +1638,7 @@ subparser_start (GtkBuildableParseContext *context, static void subparser_end (GtkBuildableParseContext *context, - const gchar *element_name, + const char *element_name, ParserData *data, GError **error) { @@ -1673,9 +1673,9 @@ subparser_end (GtkBuildableParseContext *context, static gboolean parse_custom (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, ParserData *data, GError **error) { @@ -1738,9 +1738,9 @@ parse_custom (GtkBuildableParseContext *context, static void start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -1815,12 +1815,12 @@ start_element (GtkBuildableParseContext *context, error_unhandled_tag (data, element_name, error); } -const gchar * -_gtk_builder_parser_translate (const gchar *domain, - const gchar *context, - const gchar *text) +const char * +_gtk_builder_parser_translate (const char *domain, + const char *context, + const char *text) { - const gchar *s; + const char *s; if (context) s = g_dpgettext2 (domain, context, text); @@ -1832,7 +1832,7 @@ _gtk_builder_parser_translate (const gchar *domain, static void end_element (GtkBuildableParseContext *context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error) { @@ -1865,7 +1865,7 @@ end_element (GtkBuildableParseContext *context, if (prop_info->translatable && prop_info->text->len) { - const gchar *translated; + const char *translated; translated = _gtk_builder_parser_translate (data->domain, prop_info->context, @@ -2054,7 +2054,7 @@ end_element (GtkBuildableParseContext *context, /* text is not nul-terminated */ static void text (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) @@ -2159,13 +2159,13 @@ static const GtkBuildableParser parser = { void _gtk_builder_parser_parse_buffer (GtkBuilder *builder, - const gchar *filename, - const gchar *buffer, + const char *filename, + const char *buffer, gssize length, const char **requested_objs, GError **error) { - const gchar* domain; + const char * domain; ParserData data; GSList *l; gint64 before = g_get_monotonic_time (); diff --git a/gtk/gtkbuilderprecompile.c b/gtk/gtkbuilderprecompile.c index 647d478114..9360dc1606 100644 --- a/gtk/gtkbuilderprecompile.c +++ b/gtk/gtkbuilderprecompile.c @@ -119,9 +119,9 @@ typedef struct { static void record_start_element (GMarkupParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -147,7 +147,7 @@ record_start_element (GMarkupParseContext *context, static void record_end_element (GMarkupParseContext *context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error) { @@ -158,7 +158,7 @@ record_end_element (GMarkupParseContext *context, static void record_text (GMarkupParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) @@ -303,7 +303,7 @@ marshal_tree (GString *marshaled, * returns: A #GByte with the precompiled data **/ GBytes * -_gtk_buildable_parser_precompile (const gchar *text, +_gtk_buildable_parser_precompile (const char *text, gssize text_len, GError **error) { @@ -424,15 +424,15 @@ replay_start_element (GtkBuildableParseContext *context, { const char *element_name; guint32 i, n_attrs; - const gchar **attr_names; - const gchar **attr_values; + const char **attr_names; + const char **attr_values; GError *tmp_error = NULL; element_name = demarshal_string (tree, strings); n_attrs = demarshal_uint32 (tree); - attr_names = g_newa (const gchar *, n_attrs + 1); - attr_values = g_newa (const gchar *, n_attrs + 1); + attr_names = g_newa (const char *, n_attrs + 1); + attr_values = g_newa (const char *, n_attrs + 1); for (i = 0; i < n_attrs; i++) { attr_names[i] = demarshal_string (tree, strings); @@ -505,7 +505,7 @@ replay_text (GtkBuildableParseContext *context, } gboolean -_gtk_buildable_parser_is_precompiled (const gchar *data, +_gtk_buildable_parser_is_precompiled (const char *data, gssize data_len) { return @@ -518,7 +518,7 @@ _gtk_buildable_parser_is_precompiled (const gchar *data, gboolean _gtk_buildable_parser_replay_precompiled (GtkBuildableParseContext *context, - const gchar *data, + const char *data, gssize data_len, GError **error) { diff --git a/gtk/gtkbuilderprivate.h b/gtk/gtkbuilderprivate.h index a401f69a33..87287d4e78 100644 --- a/gtk/gtkbuilderprivate.h +++ b/gtk/gtkbuilderprivate.h @@ -44,8 +44,8 @@ typedef struct { guint tag_type; GType type; GObjectClass *oclass; - gchar *id; - gchar *constructor; + char *id; + char *constructor; GSList *properties; GSList *signals; GSList *bindings; @@ -59,8 +59,8 @@ typedef struct { GSList *packing_properties; GObject *object; CommonInfo *parent; - gchar *type; - gchar *internal_child; + char *type; + char *internal_child; gboolean added; } ChildInfo; @@ -71,7 +71,7 @@ typedef struct { GString *text; gboolean translatable:1; gboolean bound:1; - gchar *context; + char *context; int line; int col; } PropertyInfo; @@ -108,12 +108,12 @@ struct _ExpressionInfo { typedef struct { guint tag_type; - gchar *object_name; + char *object_name; guint id; GQuark detail; - gchar *handler; + char *handler; GConnectFlags flags; - gchar *connect_object_name; + char *connect_object_name; } SignalInfo; typedef struct @@ -121,8 +121,8 @@ typedef struct guint tag_type; GObject *target; GParamSpec *target_pspec; - gchar *source; - gchar *source_property; + char *source; + char *source_property; GBindingFlags flags; int line; int col; @@ -141,7 +141,7 @@ typedef struct typedef struct { guint tag_type; - gchar *library; + char *library; int major; int minor; } RequiresInfo; @@ -162,21 +162,21 @@ struct _GtkBuildableParseContext { typedef struct { GtkBuildableParser *parser; - gchar *tagname; - const gchar *start; + char *tagname; + const char *start; gpointer data; GObject *object; GObject *child; } SubParser; typedef struct { - const gchar *last_element; + const char *last_element; GtkBuilder *builder; - gchar *domain; + char *domain; GSList *stack; SubParser *subparser; GtkBuildableParseContext ctx; - const gchar *filename; + const char *filename; GSList *finalizers; GSList *custom_finalizers; @@ -193,18 +193,18 @@ typedef struct { typedef GType (*GTypeGetFunc) (void); /* Things only GtkBuilder should use */ -GBytes * _gtk_buildable_parser_precompile (const gchar *text, +GBytes * _gtk_buildable_parser_precompile (const char *text, gssize text_len, GError **error); -gboolean _gtk_buildable_parser_is_precompiled (const gchar *data, +gboolean _gtk_buildable_parser_is_precompiled (const char *data, gssize data_len); gboolean _gtk_buildable_parser_replay_precompiled (GtkBuildableParseContext *context, - const gchar *data, + const char *data, gssize data_len, GError **error); void _gtk_builder_parser_parse_buffer (GtkBuilder *builder, - const gchar *filename, - const gchar *buffer, + const char *filename, + const char *buffer, gssize length, const char **requested_objs, GError **error); @@ -215,7 +215,7 @@ void _gtk_builder_apply_properties (GtkBuilder *builder, ObjectInfo *info, GError **error); void _gtk_builder_add_object (GtkBuilder *builder, - const gchar *id, + const char *id, GObject *object); void _gtk_builder_add (GtkBuilder *builder, ChildInfo *child_info); @@ -233,11 +233,11 @@ GtkExpression * expression_info_construct (GtkBuilder *builder, GError **error); /* Internal API which might be made public at some point */ -gboolean _gtk_builder_boolean_from_string (const gchar *string, +gboolean _gtk_builder_boolean_from_string (const char *string, gboolean *value, GError **error); gboolean _gtk_builder_enum_from_string (GType type, - const gchar *string, + const char *string, int *enum_value, GError **error); gboolean _gtk_builder_flags_from_string (GType type, @@ -245,18 +245,18 @@ gboolean _gtk_builder_flags_from_string (GType type, const char *string, guint *value, GError **error); -const gchar * _gtk_builder_parser_translate (const gchar *domain, - const gchar *context, - const gchar *text); -gchar * _gtk_builder_get_resource_path (GtkBuilder *builder, - const gchar *string); -gchar * _gtk_builder_get_absolute_filename (GtkBuilder *builder, - const gchar *string); +const char * _gtk_builder_parser_translate (const char *domain, + const char *context, + const char *text); +char * _gtk_builder_get_resource_path (GtkBuilder *builder, + const char *string); +char * _gtk_builder_get_absolute_filename (GtkBuilder *builder, + const char *string); void _gtk_builder_menu_start (ParserData *parser_data, - const gchar *element_name, - const gchar **attribute_names, - const gchar **attribute_values, + const char *element_name, + const char **attribute_names, + const char **attribute_values, GError **error); void _gtk_builder_menu_end (ParserData *parser_data); @@ -267,20 +267,20 @@ void _gtk_builder_prefix_error (GtkBuilder *builder, GError **error); void _gtk_builder_error_unhandled_tag (GtkBuilder *builder, GtkBuildableParseContext *context, - const gchar *object, - const gchar *element_name, + const char *object, + const char *element_name, GError **error); gboolean _gtk_builder_check_parent (GtkBuilder *builder, GtkBuildableParseContext *context, - const gchar *parent_name, + const char *parent_name, GError **error); GObject *gtk_builder_lookup_object (GtkBuilder *builder, - const gchar *name, + const char *name, int line, int col, GError **error); GObject *_gtk_builder_lookup_object (GtkBuilder *builder, - const gchar *name, + const char *name, int line, int col); gboolean _gtk_builder_lookup_failed (GtkBuilder *builder, diff --git a/gtk/gtkbuilderscope.c b/gtk/gtkbuilderscope.c index 4b121568a2..5612dbdfbe 100644 --- a/gtk/gtkbuilderscope.c +++ b/gtk/gtkbuilderscope.c @@ -192,8 +192,8 @@ gtk_builder_cscope_get_module (GtkBuilderCScope *self) * * Keep in sync with testsuite/gtk/typename.c ! */ -static gchar * -type_name_mangle (const gchar *name, +static char * +type_name_mangle (const char *name, gboolean split_first_cap) { GString *symbol_name = g_string_new (""); @@ -218,7 +218,7 @@ type_name_mangle (const gchar *name, static GType gtk_builder_cscope_resolve_type_lazily (GtkBuilderCScope *self, - const gchar *name) + const char *name) { GModule *module; GType (*func) (void); @@ -435,7 +435,7 @@ gtk_builder_cscope_new (void) */ void gtk_builder_cscope_add_callback_symbol (GtkBuilderCScope *self, - const gchar *callback_name, + const char *callback_name, GCallback callback_symbol) { GtkBuilderCScopePrivate *priv = gtk_builder_cscope_get_instance_private (self); @@ -463,12 +463,12 @@ gtk_builder_cscope_add_callback_symbol (GtkBuilderCScope *self, */ void gtk_builder_cscope_add_callback_symbols (GtkBuilderCScope *self, - const gchar *first_callback_name, + const char *first_callback_name, GCallback first_callback_symbol, ...) { va_list var_args; - const gchar *callback_name; + const char *callback_name; GCallback callback_symbol; g_return_if_fail (GTK_IS_BUILDER_CSCOPE (self)); @@ -484,7 +484,7 @@ gtk_builder_cscope_add_callback_symbols (GtkBuilderCScope *self, gtk_builder_cscope_add_callback_symbol (self, callback_name, callback_symbol); - callback_name = va_arg (var_args, const gchar*); + callback_name = va_arg (var_args, const char *); if (callback_name) callback_symbol = va_arg (var_args, GCallback); @@ -506,7 +506,7 @@ gtk_builder_cscope_add_callback_symbols (GtkBuilderCScope *self, */ GCallback gtk_builder_cscope_lookup_callback_symbol (GtkBuilderCScope *self, - const gchar *callback_name) + const char *callback_name) { GtkBuilderCScopePrivate *priv = gtk_builder_cscope_get_instance_private (self); diff --git a/gtk/gtkbuilderscope.h b/gtk/gtkbuilderscope.h index 723e1dd766..23f44fd485 100644 --- a/gtk/gtkbuilderscope.h +++ b/gtk/gtkbuilderscope.h @@ -107,16 +107,16 @@ GDK_AVAILABLE_IN_ALL GtkBuilderScope * gtk_builder_cscope_new (void); GDK_AVAILABLE_IN_ALL void gtk_builder_cscope_add_callback_symbol (GtkBuilderCScope *self, - const gchar *callback_name, + const char *callback_name, GCallback callback_symbol); GDK_AVAILABLE_IN_ALL void gtk_builder_cscope_add_callback_symbols (GtkBuilderCScope *self, - const gchar *first_callback_name, + const char *first_callback_name, GCallback first_callback_symbol, ...) G_GNUC_NULL_TERMINATED; GDK_AVAILABLE_IN_ALL GCallback gtk_builder_cscope_lookup_callback_symbol(GtkBuilderCScope *self, - const gchar *callback_name); + const char *callback_name); G_END_DECLS diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 2cb79cc483..a5c1700017 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -470,7 +470,7 @@ gtk_button_dispose (GObject *object) static void gtk_button_set_action_name (GtkActionable *actionable, - const gchar *action_name) + const char *action_name) { GtkButton *button = GTK_BUTTON (actionable); GtkButtonPrivate *priv = gtk_button_get_instance_private (button); @@ -573,7 +573,7 @@ gtk_button_get_property (GObject *object, } } -static const gchar * +static const char * gtk_button_get_action_name (GtkActionable *actionable) { GtkButton *button = GTK_BUTTON (actionable); @@ -606,7 +606,7 @@ static void gtk_button_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) gtk_button_set_child (GTK_BUTTON (buildable), GTK_WIDGET (child)); @@ -646,7 +646,7 @@ gtk_button_new (void) * Returns: The newly created #GtkButton widget. */ GtkWidget* -gtk_button_new_with_label (const gchar *label) +gtk_button_new_with_label (const char *label) { return g_object_new (GTK_TYPE_BUTTON, "label", label, NULL); } @@ -664,7 +664,7 @@ gtk_button_new_with_label (const gchar *label) * Returns: a new #GtkButton displaying the themed icon */ GtkWidget* -gtk_button_new_from_icon_name (const gchar *icon_name) +gtk_button_new_from_icon_name (const char *icon_name) { GtkWidget *button; @@ -690,7 +690,7 @@ gtk_button_new_from_icon_name (const gchar *icon_name) * Returns: a new #GtkButton */ GtkWidget* -gtk_button_new_with_mnemonic (const gchar *label) +gtk_button_new_with_mnemonic (const char *label) { return g_object_new (GTK_TYPE_BUTTON, "label", label, "use-underline", TRUE, NULL); } @@ -824,7 +824,7 @@ gtk_button_finish_activate (GtkButton *button, */ void gtk_button_set_label (GtkButton *button, - const gchar *label) + const char *label) { GtkButtonPrivate *priv = gtk_button_get_instance_private (button); GtkWidget *child; @@ -874,7 +874,7 @@ gtk_button_set_label (GtkButton *button, * Returns: (nullable): The text of the label widget. This string is owned * by the widget and must not be modified or freed. */ -const gchar * +const char * gtk_button_get_label (GtkButton *button) { GtkButtonPrivate *priv = gtk_button_get_instance_private (button); diff --git a/gtk/gtkbutton.h b/gtk/gtkbutton.h index fd4b54122f..f7e992fd62 100644 --- a/gtk/gtkbutton.h +++ b/gtk/gtkbutton.h @@ -79,11 +79,11 @@ GType gtk_button_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkWidget* gtk_button_new (void); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_button_new_with_label (const gchar *label); +GtkWidget* gtk_button_new_with_label (const char *label); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_button_new_from_icon_name (const gchar *icon_name); +GtkWidget* gtk_button_new_from_icon_name (const char *icon_name); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_button_new_with_mnemonic (const gchar *label); +GtkWidget* gtk_button_new_with_mnemonic (const char *label); GDK_AVAILABLE_IN_ALL void gtk_button_set_has_frame (GtkButton *button, @@ -92,9 +92,9 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_button_get_has_frame (GtkButton *button); GDK_AVAILABLE_IN_ALL void gtk_button_set_label (GtkButton *button, - const gchar *label); + const char *label); GDK_AVAILABLE_IN_ALL -const gchar * gtk_button_get_label (GtkButton *button); +const char * gtk_button_get_label (GtkButton *button); GDK_AVAILABLE_IN_ALL void gtk_button_set_use_underline (GtkButton *button, gboolean use_underline); diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 0c727174d1..353d8358f7 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -529,7 +529,7 @@ gtk_calendar_drag_prepare (GtkDragSource *source, GtkCalendar *calendar) { GDate *date; - gchar str[128]; + char str[128]; date = g_date_new_dmy (g_date_time_get_day_of_month (calendar->date), g_date_time_get_month (calendar->date), @@ -559,14 +559,14 @@ gtk_calendar_init (GtkCalendar *calendar) char buffer[255]; time_t tmp_time; #endif - gchar *year_before; + char *year_before; #ifdef HAVE__NL_TIME_FIRST_WEEKDAY union { unsigned int word; char *string; } langinfo; int week_1stday = 0; int first_weekday = 1; guint week_origin; #else - gchar *week_start; + char *week_start; #endif int min_year_width; GDateTime *now; diff --git a/gtk/gtkcellarea.c b/gtk/gtkcellarea.c index 8eb34534cf..d59aa41295 100644 --- a/gtk/gtkcellarea.c +++ b/gtk/gtkcellarea.c @@ -449,7 +449,7 @@ static void gtk_cell_area_pack_default (GtkCellLayout static void gtk_cell_area_clear (GtkCellLayout *cell_layout); static void gtk_cell_area_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *renderer, - const gchar *attribute, + const char *attribute, int column); static void gtk_cell_area_set_cell_data_func (GtkCellLayout *cell_layout, GtkCellRenderer *cell, @@ -469,7 +469,7 @@ static void gtk_cell_area_buildable_init (GtkBuildableIface static void gtk_cell_area_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data); /* Used in foreach loop to check if a child renderer is present */ @@ -506,7 +506,7 @@ typedef struct { /* Attribute/Cell metadata */ typedef struct { - const gchar *attribute; + const char *attribute; int column; } CellAttribute; @@ -524,11 +524,11 @@ static CellInfo *cell_info_new (GtkCellLayoutDataFunc func, GDestroyNotify destroy); static void cell_info_free (CellInfo *info); static CellAttribute *cell_attribute_new (GtkCellRenderer *renderer, - const gchar *attribute, + const char *attribute, int column); static void cell_attribute_free (CellAttribute *attribute); static int cell_attribute_find (CellAttribute *cell_attribute, - const gchar *attribute); + const char *attribute); /* Internal functions/signal emissions */ static void gtk_cell_area_add_editable (GtkCellArea *area, @@ -567,7 +567,7 @@ struct _GtkCellAreaPrivate /* Current path is saved as a side-effect * of gtk_cell_area_apply_attributes() */ - gchar *current_path; + char *current_path; /* Current cell being edited and editable widget used */ GtkCellEditable *edit_widget; @@ -849,7 +849,7 @@ cell_info_free (CellInfo *info) static CellAttribute * cell_attribute_new (GtkCellRenderer *renderer, - const gchar *attribute, + const char *attribute, int column) { GParamSpec *pspec; @@ -882,7 +882,7 @@ cell_attribute_free (CellAttribute *attribute) /* GCompareFunc for g_slist_find_custom() */ static int cell_attribute_find (CellAttribute *cell_attribute, - const gchar *attribute) + const char *attribute) { return g_strcmp0 (cell_attribute->attribute, attribute); } @@ -1492,7 +1492,7 @@ gtk_cell_area_clear (GtkCellLayout *cell_layout) static void gtk_cell_area_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *renderer, - const gchar *attribute, + const char *attribute, int column) { gtk_cell_area_attribute_connect (GTK_CELL_AREA (cell_layout), @@ -1579,7 +1579,7 @@ static void gtk_cell_area_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data) { /* Just ignore the boolean return from here */ @@ -2154,7 +2154,7 @@ gtk_cell_area_get_preferred_width_for_height (GtkCellArea *area, void gtk_cell_area_attribute_connect (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *attribute, + const char *attribute, int column) { GtkCellAreaPrivate *priv = gtk_cell_area_get_instance_private (area); @@ -2220,7 +2220,7 @@ gtk_cell_area_attribute_connect (GtkCellArea *area, void gtk_cell_area_attribute_disconnect (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *attribute) + const char *attribute) { GtkCellAreaPrivate *priv = gtk_cell_area_get_instance_private (area); CellInfo *info; @@ -2263,7 +2263,7 @@ gtk_cell_area_attribute_disconnect (GtkCellArea *area, int gtk_cell_area_attribute_get_column (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *attribute) + const char *attribute) { GtkCellAreaPrivate *priv = gtk_cell_area_get_instance_private (area); CellInfo *info; @@ -2327,7 +2327,7 @@ gtk_cell_area_apply_attributes (GtkCellArea *area, * attributes applied to @area. This string belongs to the area and * should not be freed. */ -const gchar * +const char * gtk_cell_area_get_current_path_string (GtkCellArea *area) { GtkCellAreaPrivate *priv = gtk_cell_area_get_instance_private (area); @@ -2388,7 +2388,7 @@ gtk_cell_area_class_install_cell_property (GtkCellAreaClass *aclass, */ GParamSpec* gtk_cell_area_class_find_cell_property (GtkCellAreaClass *aclass, - const gchar *property_name) + const char *property_name) { g_return_val_if_fail (GTK_IS_CELL_AREA_CLASS (aclass), NULL); g_return_val_if_fail (property_name != NULL, NULL); @@ -2442,7 +2442,7 @@ gtk_cell_area_class_list_cell_properties (GtkCellAreaClass *aclass, void gtk_cell_area_add_with_properties (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *first_prop_name, + const char *first_prop_name, ...) { GtkCellAreaClass *class; @@ -2480,7 +2480,7 @@ gtk_cell_area_add_with_properties (GtkCellArea *area, void gtk_cell_area_cell_set (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *first_prop_name, + const char *first_prop_name, ...) { va_list var_args; @@ -2506,7 +2506,7 @@ gtk_cell_area_cell_set (GtkCellArea *area, void gtk_cell_area_cell_get (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *first_prop_name, + const char *first_prop_name, ...) { va_list var_args; @@ -2548,7 +2548,7 @@ area_set_cell_property (GtkCellArea *area, G_VALUE_TYPE_NAME (value)); else if (g_param_value_validate (pspec, &tmp_value) && !(pspec->flags & G_PARAM_LAX_VALIDATION)) { - gchar *contents = g_strdup_value_contents (value); + char *contents = g_strdup_value_contents (value); g_warning ("value \"%s\" of type '%s' is invalid for property '%s' of type '%s'", contents, @@ -2577,10 +2577,10 @@ area_set_cell_property (GtkCellArea *area, void gtk_cell_area_cell_set_valist (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *first_property_name, + const char *first_property_name, va_list var_args) { - const gchar *name; + const char *name; g_return_if_fail (GTK_IS_CELL_AREA (area)); g_return_if_fail (GTK_IS_CELL_RENDERER (renderer)); @@ -2589,7 +2589,7 @@ gtk_cell_area_cell_set_valist (GtkCellArea *area, while (name) { GValue value = G_VALUE_INIT; - gchar *error = NULL; + char *error = NULL; GParamSpec *pspec = g_param_spec_pool_lookup (cell_property_pool, name, G_OBJECT_TYPE (area), TRUE); @@ -2620,7 +2620,7 @@ gtk_cell_area_cell_set_valist (GtkCellArea *area, } area_set_cell_property (area, renderer, pspec, &value); g_value_unset (&value); - name = va_arg (var_args, gchar*); + name = va_arg (var_args, char *); } } @@ -2637,10 +2637,10 @@ gtk_cell_area_cell_set_valist (GtkCellArea *area, void gtk_cell_area_cell_get_valist (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *first_property_name, + const char *first_property_name, va_list var_args) { - const gchar *name; + const char *name; g_return_if_fail (GTK_IS_CELL_AREA (area)); g_return_if_fail (GTK_IS_CELL_RENDERER (renderer)); @@ -2650,7 +2650,7 @@ gtk_cell_area_cell_get_valist (GtkCellArea *area, { GValue value = G_VALUE_INIT; GParamSpec *pspec; - gchar *error; + char *error; pspec = g_param_spec_pool_lookup (cell_property_pool, name, G_OBJECT_TYPE (area), TRUE); @@ -2678,7 +2678,7 @@ gtk_cell_area_cell_get_valist (GtkCellArea *area, break; } g_value_unset (&value); - name = va_arg (var_args, gchar*); + name = va_arg (var_args, char *); } } @@ -2694,7 +2694,7 @@ gtk_cell_area_cell_get_valist (GtkCellArea *area, void gtk_cell_area_cell_set_property (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *property_name, + const char *property_name, const GValue *value) { GParamSpec *pspec; @@ -2730,7 +2730,7 @@ gtk_cell_area_cell_set_property (GtkCellArea *area, void gtk_cell_area_cell_get_property (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *property_name, + const char *property_name, GValue *value) { GParamSpec *pspec; diff --git a/gtk/gtkcellarea.h b/gtk/gtkcellarea.h index eecb6b3e36..b97baa8ced 100644 --- a/gtk/gtkcellarea.h +++ b/gtk/gtkcellarea.h @@ -358,7 +358,7 @@ void gtk_cell_area_get_preferred_width_for_height (GtkCellArea int *minimum_width, int *natural_width); GDK_AVAILABLE_IN_ALL -const gchar * gtk_cell_area_get_current_path_string (GtkCellArea *area); +const char * gtk_cell_area_get_current_path_string (GtkCellArea *area); /* Attributes */ @@ -371,16 +371,16 @@ void gtk_cell_area_apply_attributes (GtkCellArea GDK_AVAILABLE_IN_ALL void gtk_cell_area_attribute_connect (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *attribute, + const char *attribute, int column); GDK_AVAILABLE_IN_ALL void gtk_cell_area_attribute_disconnect (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *attribute); + const char *attribute); GDK_AVAILABLE_IN_ALL int gtk_cell_area_attribute_get_column (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *attribute); + const char *attribute); /* Cell Properties */ @@ -390,44 +390,44 @@ void gtk_cell_area_class_install_cell_property (GtkCellAreaC GParamSpec *pspec); GDK_AVAILABLE_IN_ALL GParamSpec* gtk_cell_area_class_find_cell_property (GtkCellAreaClass *aclass, - const gchar *property_name); + const char *property_name); GDK_AVAILABLE_IN_ALL GParamSpec** gtk_cell_area_class_list_cell_properties (GtkCellAreaClass *aclass, guint *n_properties); GDK_AVAILABLE_IN_ALL void gtk_cell_area_add_with_properties (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *first_prop_name, + const char *first_prop_name, ...) G_GNUC_NULL_TERMINATED; GDK_AVAILABLE_IN_ALL void gtk_cell_area_cell_set (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *first_prop_name, + const char *first_prop_name, ...) G_GNUC_NULL_TERMINATED; GDK_AVAILABLE_IN_ALL void gtk_cell_area_cell_get (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *first_prop_name, + const char *first_prop_name, ...) G_GNUC_NULL_TERMINATED; GDK_AVAILABLE_IN_ALL void gtk_cell_area_cell_set_valist (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *first_property_name, + const char *first_property_name, va_list var_args); GDK_AVAILABLE_IN_ALL void gtk_cell_area_cell_get_valist (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *first_property_name, + const char *first_property_name, va_list var_args); GDK_AVAILABLE_IN_ALL void gtk_cell_area_cell_set_property (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *property_name, + const char *property_name, const GValue *value); GDK_AVAILABLE_IN_ALL void gtk_cell_area_cell_get_property (GtkCellArea *area, GtkCellRenderer *renderer, - const gchar *property_name, + const char *property_name, GValue *value); /* Focus */ diff --git a/gtk/gtkcelllayout.c b/gtk/gtkcelllayout.c index b146f42da9..a4f8750680 100644 --- a/gtk/gtkcelllayout.c +++ b/gtk/gtkcelllayout.c @@ -148,7 +148,7 @@ static void gtk_cell_layout_default_pack_end (GtkCellLayout static void gtk_cell_layout_default_clear (GtkCellLayout *cell_layout); static void gtk_cell_layout_default_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *cell, - const gchar *attribute, + const char *attribute, int column); static void gtk_cell_layout_default_set_cell_data_func (GtkCellLayout *cell_layout, GtkCellRenderer *cell, @@ -241,7 +241,7 @@ gtk_cell_layout_default_clear (GtkCellLayout *cell_layout) static void gtk_cell_layout_default_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *cell, - const gchar *attribute, + const char *attribute, int column) { GtkCellLayoutIface *iface; @@ -413,10 +413,10 @@ gtk_cell_layout_set_attributesv (GtkCellLayout *cell_layout, GtkCellRenderer *cell, va_list args) { - gchar *attribute; + char *attribute; int column; - attribute = va_arg (args, gchar *); + attribute = va_arg (args, char *); gtk_cell_layout_clear_attributes (cell_layout, cell); @@ -426,7 +426,7 @@ gtk_cell_layout_set_attributesv (GtkCellLayout *cell_layout, gtk_cell_layout_add_attribute (cell_layout, cell, attribute, column); - attribute = va_arg (args, gchar *); + attribute = va_arg (args, char *); } } @@ -474,7 +474,7 @@ gtk_cell_layout_set_attributes (GtkCellLayout *cell_layout, void gtk_cell_layout_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *cell, - const gchar *attribute, + const char *attribute, int column) { g_return_if_fail (GTK_IS_CELL_LAYOUT (cell_layout)); @@ -604,15 +604,15 @@ typedef struct { GtkCellLayout *cell_layout; GtkCellRenderer *renderer; GtkBuilder *builder; - gchar *attr_name; + char *attr_name; GString *string; } AttributesSubParserData; static void attributes_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -620,7 +620,7 @@ attributes_start_element (GtkBuildableParseContext *context, if (strcmp (element_name, "attribute") == 0) { - const gchar *name; + const char *name; if (!_gtk_builder_check_parent (data->builder, context, "attributes", error)) return; @@ -655,7 +655,7 @@ attributes_start_element (GtkBuildableParseContext *context, static void attributes_text_element (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) @@ -668,7 +668,7 @@ attributes_text_element (GtkBuildableParseContext *context, static void attributes_end_element (GtkBuildableParseContext *context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error) { @@ -708,8 +708,8 @@ static void gtk_cell_layout_buildable_set_cell_property (GtkCellArea *area, GtkBuilder *builder, GtkCellRenderer *cell, - gchar *name, - const gchar *value) + char *name, + const char *value) { GParamSpec *pspec; GValue gvalue = G_VALUE_INIT; @@ -744,16 +744,16 @@ typedef struct { GtkCellLayout *cell_layout; GtkCellRenderer *renderer; GString *string; - gchar *cell_prop_name; - gchar *context; + char *cell_prop_name; + char *context; gboolean translatable; } CellPackingSubParserData; static void cell_packing_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -761,9 +761,9 @@ cell_packing_start_element (GtkBuildableParseContext *context, if (strcmp (element_name, "property") == 0) { - const gchar *name; + const char *name; gboolean translatable = FALSE; - const gchar *ctx = NULL; + const char *ctx = NULL; if (!_gtk_builder_check_parent (data->builder, context, "cell-packing", error)) return; @@ -803,7 +803,7 @@ cell_packing_start_element (GtkBuildableParseContext *context, static void cell_packing_text_element (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) @@ -816,7 +816,7 @@ cell_packing_text_element (GtkBuildableParseContext *context, static void cell_packing_end_element (GtkBuildableParseContext *context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error) { @@ -830,8 +830,8 @@ cell_packing_end_element (GtkBuildableParseContext *context, /* translate the string */ if (data->string->len && data->translatable) { - const gchar *translated; - const gchar* domain; + const char *translated; + const char * domain; domain = gtk_builder_get_translation_domain (data->builder); @@ -872,7 +872,7 @@ gboolean _gtk_cell_layout_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data) { @@ -917,7 +917,7 @@ gboolean _gtk_cell_layout_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer *data) { AttributesSubParserData *attr_data; @@ -947,7 +947,7 @@ void _gtk_cell_layout_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { g_return_if_fail (GTK_IS_CELL_LAYOUT (buildable)); g_return_if_fail (GTK_IS_CELL_RENDERER (child)); diff --git a/gtk/gtkcelllayout.h b/gtk/gtkcelllayout.h index 4eab78ab22..5ec03ddf6a 100644 --- a/gtk/gtkcelllayout.h +++ b/gtk/gtkcelllayout.h @@ -91,7 +91,7 @@ struct _GtkCellLayoutIface void (* clear) (GtkCellLayout *cell_layout); void (* add_attribute) (GtkCellLayout *cell_layout, GtkCellRenderer *cell, - const gchar *attribute, + const char *attribute, int column); void (* set_cell_data_func) (GtkCellLayout *cell_layout, GtkCellRenderer *cell, @@ -129,7 +129,7 @@ void gtk_cell_layout_set_attributes (GtkCellLayout *cell_layout, GDK_AVAILABLE_IN_ALL void gtk_cell_layout_add_attribute (GtkCellLayout *cell_layout, GtkCellRenderer *cell, - const gchar *attribute, + const char *attribute, int column); GDK_AVAILABLE_IN_ALL void gtk_cell_layout_set_cell_data_func (GtkCellLayout *cell_layout, @@ -150,18 +150,18 @@ GtkCellArea *gtk_cell_layout_get_area (GtkCellLayout *cell_layout); gboolean _gtk_cell_layout_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); gboolean _gtk_cell_layout_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer *data); void _gtk_cell_layout_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type); + const char *type); G_END_DECLS diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c index df98722ec4..ae7bdf863d 100644 --- a/gtk/gtkcellrenderer.c +++ b/gtk/gtkcellrenderer.c @@ -258,7 +258,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class) * static void * text_editing_started (GtkCellRenderer *cell, * GtkCellEditable *editable, - * const gchar *path, + * const char *path, * gpointer data) * { * if (GTK_IS_ENTRY (editable)) @@ -769,7 +769,7 @@ gboolean gtk_cell_renderer_activate (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags) @@ -816,7 +816,7 @@ GtkCellEditable * gtk_cell_renderer_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags) diff --git a/gtk/gtkcellrenderer.h b/gtk/gtkcellrenderer.h index 6fb00ec9fc..cc30e5fac7 100644 --- a/gtk/gtkcellrenderer.h +++ b/gtk/gtkcellrenderer.h @@ -154,14 +154,14 @@ struct _GtkCellRendererClass gboolean (* activate) (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags); GtkCellEditable * (* start_editing) (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags); @@ -170,7 +170,7 @@ struct _GtkCellRendererClass void (* editing_canceled) (GtkCellRenderer *cell); void (* editing_started) (GtkCellRenderer *cell, GtkCellEditable *editable, - const gchar *path); + const char *path); /*< private >*/ @@ -228,7 +228,7 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_cell_renderer_activate (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags); @@ -236,7 +236,7 @@ GDK_AVAILABLE_IN_ALL GtkCellEditable *gtk_cell_renderer_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags); diff --git a/gtk/gtkcellrendereraccel.c b/gtk/gtkcellrendereraccel.c index 451924fd0b..600f59f3d1 100644 --- a/gtk/gtkcellrendereraccel.c +++ b/gtk/gtkcellrendereraccel.c @@ -62,17 +62,17 @@ static GtkCellEditable * gtk_cell_renderer_accel_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags); -static gchar *convert_keysym_state_to_string (GtkCellRendererAccel *accel, +static char *convert_keysym_state_to_string (GtkCellRendererAccel *accel, guint keysym, GdkModifierType mask, guint keycode); static GtkWidget *gtk_cell_editable_widget_new (GtkCellRenderer *cell, GtkCellRendererAccelMode mode, - const gchar *path); + const char *path); enum { ACCEL_EDITED, @@ -102,13 +102,13 @@ struct _GtkCellRendererAccelClass GtkCellRendererTextClass parent_class; void (* accel_edited) (GtkCellRendererAccel *accel, - const gchar *path_string, + const char *path_string, guint accel_key, GdkModifierType accel_mods, guint hardware_keycode); void (* accel_cleared) (GtkCellRendererAccel *accel, - const gchar *path_string); + const char *path_string); /* Padding for future expansion */ void (*_gtk_reserved0) (void); @@ -133,7 +133,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (GtkCellRendererAccel, gtk_cell_renderer_accel, GTK_T static void gtk_cell_renderer_accel_init (GtkCellRendererAccel *cell_accel) { - gchar *text; + char *text; text = convert_keysym_state_to_string (cell_accel, 0, 0, 0); g_object_set (cell_accel, "text", text, NULL); @@ -282,7 +282,7 @@ gtk_cell_renderer_accel_new (void) return g_object_new (GTK_TYPE_CELL_RENDERER_ACCEL, NULL); } -static gchar * +static char * convert_keysym_state_to_string (GtkCellRendererAccel *accel, guint keysym, GdkModifierType mask, @@ -310,7 +310,7 @@ convert_keysym_state_to_string (GtkCellRendererAccel *accel, } else { - gchar *name; + char *name; name = gtk_accelerator_get_label_with_keycode (NULL, keysym, keycode, mask); if (name == NULL) @@ -416,7 +416,7 @@ gtk_cell_renderer_accel_set_property (GObject *object, if (changed) { - gchar *text; + char *text; text = convert_keysym_state_to_string (accel, priv->accel_key, priv->accel_mods, priv->keycode); g_object_set (accel, "text", text, NULL); @@ -456,7 +456,7 @@ static GtkCellEditable * gtk_cell_renderer_accel_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags) @@ -488,7 +488,7 @@ struct _GtkCellEditableWidget gboolean editing_canceled; GtkCellRendererAccelMode accel_mode; - gchar *path; + char *path; GtkCellRenderer *cell; GtkWidget *label; }; @@ -710,7 +710,7 @@ gtk_cell_editable_widget_init (GtkCellEditableWidget *box) static GtkWidget * gtk_cell_editable_widget_new (GtkCellRenderer *cell, GtkCellRendererAccelMode mode, - const gchar *path) + const char *path) { GtkCellEditableWidget *box; diff --git a/gtk/gtkcellrenderercombo.c b/gtk/gtkcellrenderercombo.c index 8272857e44..b8e9daca8b 100644 --- a/gtk/gtkcellrenderercombo.c +++ b/gtk/gtkcellrenderercombo.c @@ -89,7 +89,7 @@ static void gtk_cell_renderer_combo_set_property (GObject *object, static GtkCellEditable *gtk_cell_renderer_combo_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags); @@ -347,8 +347,8 @@ gtk_cell_renderer_combo_editing_done (GtkCellEditable *combo, { GtkCellRendererCombo *cell = GTK_CELL_RENDERER_COMBO (data); GtkCellRendererComboPrivate *priv = gtk_cell_renderer_combo_get_instance_private (cell); - const gchar *path; - gchar *new_text = NULL; + const char *path; + char *new_text = NULL; GtkTreeModel *model; GtkTreeIter iter; GtkEntry *entry; @@ -416,7 +416,7 @@ find_text (GtkTreeModel *model, { SearchData *search_data = (SearchData *)data; GtkCellRendererComboPrivate *priv = gtk_cell_renderer_combo_get_instance_private (search_data->cell); - gchar *text, *cell_text; + char *text, *cell_text; gtk_tree_model_get (model, iter, priv->text_column, &text, -1); g_object_get (GTK_CELL_RENDERER_TEXT (search_data->cell), @@ -438,7 +438,7 @@ static GtkCellEditable * gtk_cell_renderer_combo_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags) @@ -448,7 +448,7 @@ gtk_cell_renderer_combo_start_editing (GtkCellRenderer *cell, GtkWidget *combo; SearchData search_data; gboolean editable; - gchar *text; + char *text; g_object_get (cell, "editable", &editable, NULL); if (editable == FALSE) diff --git a/gtk/gtkcellrendererprogress.c b/gtk/gtkcellrendererprogress.c index 831f5ad2e0..5f7ab16e56 100644 --- a/gtk/gtkcellrendererprogress.c +++ b/gtk/gtkcellrendererprogress.c @@ -74,8 +74,8 @@ struct _GtkCellRendererProgressClass struct _GtkCellRendererProgressPrivate { int value; - gchar *text; - gchar *label; + char *text; + char *label; int min_h; int min_w; int pulse; @@ -98,12 +98,12 @@ static void gtk_cell_renderer_progress_set_property (GObject *ob static void gtk_cell_renderer_progress_set_value (GtkCellRendererProgress *cellprogress, int value); static void gtk_cell_renderer_progress_set_text (GtkCellRendererProgress *cellprogress, - const gchar *text); + const char *text); static void gtk_cell_renderer_progress_set_pulse (GtkCellRendererProgress *cellprogress, int pulse); static void compute_dimensions (GtkCellRenderer *cell, GtkWidget *widget, - const gchar *text, + const char *text, int *width, int *height); static void gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell, @@ -368,7 +368,7 @@ static void recompute_label (GtkCellRendererProgress *cellprogress) { GtkCellRendererProgressPrivate *priv = gtk_cell_renderer_progress_get_instance_private (cellprogress); - gchar *label; + char *label; if (priv->text) label = g_strdup (priv->text); @@ -397,10 +397,10 @@ gtk_cell_renderer_progress_set_value (GtkCellRendererProgress *cellprogress, static void gtk_cell_renderer_progress_set_text (GtkCellRendererProgress *cellprogress, - const gchar *text) + const char *text) { GtkCellRendererProgressPrivate *priv = gtk_cell_renderer_progress_get_instance_private (cellprogress); - gchar *new_text; + char *new_text; new_text = g_strdup (text); g_free (priv->text); @@ -431,7 +431,7 @@ gtk_cell_renderer_progress_set_pulse (GtkCellRendererProgress *cellprogress, static void compute_dimensions (GtkCellRenderer *cell, GtkWidget *widget, - const gchar *text, + const char *text, int *width, int *height) { @@ -465,7 +465,7 @@ gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell, GtkCellRendererProgress *cellprogress = GTK_CELL_RENDERER_PROGRESS (cell); GtkCellRendererProgressPrivate *priv = gtk_cell_renderer_progress_get_instance_private (cellprogress); int w, h; - gchar *text; + char *text; if (priv->min_w < 0) { diff --git a/gtk/gtkcellrendererspin.c b/gtk/gtkcellrendererspin.c index 43ee161458..2c5caa0724 100644 --- a/gtk/gtkcellrendererspin.c +++ b/gtk/gtkcellrendererspin.c @@ -92,7 +92,7 @@ static gboolean gtk_cell_renderer_spin_key_pressed (GtkEventControllerKey *contr static GtkCellEditable * gtk_cell_renderer_spin_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags); @@ -252,8 +252,8 @@ gtk_cell_renderer_spin_focus_changed (GtkWidget *widget, GParamSpec *pspec, gpointer data) { - const gchar *path; - const gchar *new_text; + const char *path; + const char *new_text; gboolean canceled; if (gtk_widget_has_focus (widget)) @@ -325,7 +325,7 @@ static GtkCellEditable * gtk_cell_renderer_spin_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags) @@ -334,7 +334,7 @@ gtk_cell_renderer_spin_start_editing (GtkCellRenderer *cell, GtkCellRendererText *cell_text = GTK_CELL_RENDERER_TEXT (cell); GtkEventController *key_controller; gboolean editable; - gchar *text; + char *text; g_object_get (cell_text, "editable", &editable, NULL); if (!editable) diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index 8e905ab9e8..45bf9fb4a6 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -69,7 +69,7 @@ static void gtk_cell_renderer_text_snapshot (GtkCellRenderer *cell, static GtkCellEditable *gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags); @@ -178,8 +178,8 @@ struct _GtkCellRendererTextPrivate PangoUnderline underline_style; PangoWrapMode wrap_mode; - gchar *text; - gchar *placeholder_text; + char *text; + char *placeholder_text; gdouble font_scale; @@ -1073,8 +1073,8 @@ gtk_cell_renderer_text_set_property (GObject *object, break; case PROP_MARKUP: { - const gchar *str; - gchar *text = NULL; + const char *str; + char *text = NULL; GError *error = NULL; PangoAttrList *attrs = NULL; @@ -1143,7 +1143,7 @@ gtk_cell_renderer_text_set_property (GObject *object, case PROP_FONT: { PangoFontDescription *font_desc = NULL; - const gchar *name; + const char *name; name = g_value_get_string (value); @@ -1754,8 +1754,8 @@ gtk_cell_renderer_text_editing_done (GtkCellEditable *entry, { GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (data); GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext); - const gchar *path; - const gchar *new_text; + const char *path; + const char *new_text; gboolean canceled; g_clear_object (&priv->entry); @@ -1805,7 +1805,7 @@ static GtkCellEditable * gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags) diff --git a/gtk/gtkcellrenderertext.h b/gtk/gtkcellrenderertext.h index d1198aeeb0..c709bb9f6c 100644 --- a/gtk/gtkcellrenderertext.h +++ b/gtk/gtkcellrenderertext.h @@ -49,8 +49,8 @@ struct _GtkCellRendererTextClass GtkCellRendererClass parent_class; void (* edited) (GtkCellRendererText *cell_renderer_text, - const gchar *path, - const gchar *new_text); + const char *path, + const char *new_text); /*< private >*/ diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c index 2b580e4871..472d1c33cc 100644 --- a/gtk/gtkcellrenderertoggle.c +++ b/gtk/gtkcellrenderertoggle.c @@ -69,7 +69,7 @@ static void gtk_cell_renderer_toggle_snapshot (GtkCellRenderer *cel static gboolean gtk_cell_renderer_toggle_activate (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags); @@ -482,7 +482,7 @@ static int gtk_cell_renderer_toggle_activate (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, - const gchar *path, + const char *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags) diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c index d072ef6f13..1188c7bfc9 100644 --- a/gtk/gtkcellview.c +++ b/gtk/gtkcellview.c @@ -90,13 +90,13 @@ static void gtk_cell_view_buildable_init (GtkBuildableIface static gboolean gtk_cell_view_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); static void gtk_cell_view_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data); static GtkSizeRequestMode gtk_cell_view_get_request_mode (GtkWidget *widget); @@ -289,7 +289,7 @@ static void gtk_cell_view_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_CELL_RENDERER (child)) _gtk_cell_layout_buildable_add_child (buildable, builder, child, type); @@ -750,7 +750,7 @@ static gboolean gtk_cell_view_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data) { @@ -767,7 +767,7 @@ static void gtk_cell_view_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data) { if (_gtk_cell_layout_buildable_custom_tag_end (buildable, builder, child, tagname, @@ -870,7 +870,7 @@ gtk_cell_view_new_with_context (GtkCellArea *area, * Returns: A newly created #GtkCellView widget. */ GtkWidget * -gtk_cell_view_new_with_text (const gchar *text) +gtk_cell_view_new_with_text (const char *text) { GtkCellView *cellview; GtkCellRenderer *renderer; @@ -901,7 +901,7 @@ gtk_cell_view_new_with_text (const gchar *text) * Returns: A newly created #GtkCellView widget. */ GtkWidget * -gtk_cell_view_new_with_markup (const gchar *markup) +gtk_cell_view_new_with_markup (const char *markup) { GtkCellView *cellview; GtkCellRenderer *renderer; diff --git a/gtk/gtkcellview.h b/gtk/gtkcellview.h index ebfef56a3c..1cb1adf8d7 100644 --- a/gtk/gtkcellview.h +++ b/gtk/gtkcellview.h @@ -44,9 +44,9 @@ GDK_AVAILABLE_IN_ALL GtkWidget *gtk_cell_view_new_with_context (GtkCellArea *area, GtkCellAreaContext *context); GDK_AVAILABLE_IN_ALL -GtkWidget *gtk_cell_view_new_with_text (const gchar *text); +GtkWidget *gtk_cell_view_new_with_text (const char *text); GDK_AVAILABLE_IN_ALL -GtkWidget *gtk_cell_view_new_with_markup (const gchar *markup); +GtkWidget *gtk_cell_view_new_with_markup (const char *markup); GDK_AVAILABLE_IN_ALL GtkWidget *gtk_cell_view_new_with_texture (GdkTexture *texture); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkcenterbox.c b/gtk/gtkcenterbox.c index e3536be6d9..3751ea5db3 100644 --- a/gtk/gtkcenterbox.c +++ b/gtk/gtkcenterbox.c @@ -97,7 +97,7 @@ static void gtk_center_box_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (g_strcmp0 (type, "start") == 0) gtk_center_box_set_start_widget (GTK_CENTER_BOX (buildable), GTK_WIDGET (child)); diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c index dc762d48f1..3799bc1b1e 100644 --- a/gtk/gtkcheckbutton.c +++ b/gtk/gtkcheckbutton.c @@ -283,7 +283,7 @@ gtk_check_button_new (void) * Returns: a #GtkWidget. */ GtkWidget* -gtk_check_button_new_with_label (const gchar *label) +gtk_check_button_new_with_label (const char *label) { return g_object_new (GTK_TYPE_CHECK_BUTTON, "label", label, NULL); } @@ -300,7 +300,7 @@ gtk_check_button_new_with_label (const gchar *label) * Returns: a new #GtkCheckButton */ GtkWidget* -gtk_check_button_new_with_mnemonic (const gchar *label) +gtk_check_button_new_with_mnemonic (const char *label) { return g_object_new (GTK_TYPE_CHECK_BUTTON, "label", label, diff --git a/gtk/gtkcheckbutton.h b/gtk/gtkcheckbutton.h index 9a7ed350f7..2fd23b33c6 100644 --- a/gtk/gtkcheckbutton.h +++ b/gtk/gtkcheckbutton.h @@ -66,9 +66,9 @@ GType gtk_check_button_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkWidget* gtk_check_button_new (void); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_check_button_new_with_label (const gchar *label); +GtkWidget* gtk_check_button_new_with_label (const char *label); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_check_button_new_with_mnemonic (const gchar *label); +GtkWidget* gtk_check_button_new_with_mnemonic (const char *label); GDK_AVAILABLE_IN_ALL void gtk_check_button_set_draw_indicator (GtkCheckButton *check_button, gboolean draw_indicator); diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index 28f6de6f7e..f117d8bef7 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -72,7 +72,7 @@ struct _GtkColorButton { GtkWidget *swatch; /* Widget where we draw the color sample */ GtkWidget *cs_dialog; /* Color selection dialog */ - gchar *title; /* Title for the color selection window */ + char *title; /* Title for the color selection window */ GdkRGBA rgba; guint use_alpha : 1; /* Use alpha or not */ @@ -491,9 +491,9 @@ set_use_alpha (GtkColorButton *button, */ void gtk_color_button_set_title (GtkColorButton *button, - const gchar *title) + const char *title) { - gchar *old_title; + char *old_title; g_return_if_fail (GTK_IS_COLOR_BUTTON (button)); @@ -515,7 +515,7 @@ gtk_color_button_set_title (GtkColorButton *button, * * Returns: An internal string, do not free the return value */ -const gchar * +const char * gtk_color_button_get_title (GtkColorButton *button) { g_return_val_if_fail (GTK_IS_COLOR_BUTTON (button), NULL); diff --git a/gtk/gtkcolorbutton.h b/gtk/gtkcolorbutton.h index f8b7e6883c..dfc0fea348 100644 --- a/gtk/gtkcolorbutton.h +++ b/gtk/gtkcolorbutton.h @@ -54,9 +54,9 @@ GDK_AVAILABLE_IN_ALL GtkWidget * gtk_color_button_new_with_rgba (const GdkRGBA *rgba); GDK_AVAILABLE_IN_ALL void gtk_color_button_set_title (GtkColorButton *button, - const gchar *title); + const char *title); GDK_AVAILABLE_IN_ALL -const gchar *gtk_color_button_get_title (GtkColorButton *button); +const char *gtk_color_button_get_title (GtkColorButton *button); GDK_AVAILABLE_IN_ALL gboolean gtk_color_button_get_modal (GtkColorButton *button); diff --git a/gtk/gtkcolorchooserdialog.c b/gtk/gtkcolorchooserdialog.c index 5dd68c6532..a6273cdd09 100644 --- a/gtk/gtkcolorchooserdialog.c +++ b/gtk/gtkcolorchooserdialog.c @@ -277,7 +277,7 @@ gtk_color_chooser_dialog_iface_init (GtkColorChooserInterface *iface) * Returns: a new #GtkColorChooserDialog */ GtkWidget * -gtk_color_chooser_dialog_new (const gchar *title, +gtk_color_chooser_dialog_new (const char *title, GtkWindow *parent) { return g_object_new (GTK_TYPE_COLOR_CHOOSER_DIALOG, diff --git a/gtk/gtkcolorchooserdialog.h b/gtk/gtkcolorchooserdialog.h index b4a16d083b..b971b95819 100644 --- a/gtk/gtkcolorchooserdialog.h +++ b/gtk/gtkcolorchooserdialog.h @@ -36,7 +36,7 @@ GDK_AVAILABLE_IN_ALL GType gtk_color_chooser_dialog_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget * gtk_color_chooser_dialog_new (const gchar *title, +GtkWidget * gtk_color_chooser_dialog_new (const char *title, GtkWindow *parent); G_END_DECLS diff --git a/gtk/gtkcolorchooserwidget.c b/gtk/gtkcolorchooserwidget.c index 12c2aa85aa..0b7f36d0db 100644 --- a/gtk/gtkcolorchooserwidget.c +++ b/gtk/gtkcolorchooserwidget.c @@ -274,7 +274,7 @@ scale_round (gdouble value, gdouble scale) return (guint)value; } -static gchar * +static char * accessible_color_name (GdkRGBA *color) { if (color->alpha < 1.0) @@ -322,7 +322,7 @@ add_palette (GtkColorChooserWidget *cc, int colors_per_line, int n_colors, GdkRGBA *colors, - const gchar **names) + const char **names) { GtkWidget *grid; GtkWidget *p; @@ -363,7 +363,7 @@ add_palette (GtkColorChooserWidget *cc, } else { - gchar *text, *name; + char *text, *name; name = accessible_color_name (&colors[i]); text = g_strdup_printf (_("Color: %s"), name); @@ -411,7 +411,7 @@ remove_default_palette (GtkColorChooserWidget *cc) static void add_default_palette (GtkColorChooserWidget *cc) { - const gchar *default_colors[9][3] = { + const char *default_colors[9][3] = { { "#ef2929", "#cc0000", "#a40000" }, /* Scarlet Red */ { "#fcaf3e", "#f57900", "#ce5c00" }, /* Orange */ { "#fce94f", "#edd400", "#c4a000" }, /* Butter */ @@ -422,7 +422,7 @@ add_default_palette (GtkColorChooserWidget *cc) { "#888a85", "#555753", "#2e3436" }, /* Aluminum 1 */ { "#eeeeec", "#d3d7cf", "#babdb6" } /* Aluminum 2 */ }; - const gchar *color_names[] = { + const char *color_names[] = { NC_("Color name", "Light Scarlet Red"), NC_("Color name", "Scarlet Red"), NC_("Color name", "Dark Scarlet Red"), @@ -451,7 +451,7 @@ add_default_palette (GtkColorChooserWidget *cc) NC_("Color name", "Aluminum 2"), NC_("Color name", "Dark Aluminum 2") }; - const gchar *default_grays[9] = { + const char *default_grays[9] = { "#000000", /* black */ "#2e3436", /* very dark gray */ "#555753", /* darker gray */ @@ -462,7 +462,7 @@ add_default_palette (GtkColorChooserWidget *cc) "#f3f3f3", /* very light gray */ "#ffffff" /* white */ }; - const gchar *gray_names[] = { + const char *gray_names[] = { NC_("Color name", "Black"), NC_("Color name", "Very Dark Gray"), NC_("Color name", "Darker Gray"), @@ -544,7 +544,7 @@ gtk_color_chooser_widget_init (GtkColorChooserWidget *cc) GVariantIter iter; gboolean selected; AtkObject *atk_obj; - gchar *text, *name; + char *text, *name; cc->use_alpha = TRUE; diff --git a/gtk/gtkcoloreditor.c b/gtk/gtkcoloreditor.c index f170fb4a73..46c89ca4ef 100644 --- a/gtk/gtkcoloreditor.c +++ b/gtk/gtkcoloreditor.c @@ -107,7 +107,7 @@ static void entry_set_rgba (GtkColorEditor *editor, const GdkRGBA *color) { - gchar *text; + char *text; text = g_strdup_printf ("#%02X%02X%02X", scale_round (color->red, 255), @@ -123,7 +123,7 @@ entry_apply (GtkWidget *entry, GtkColorEditor *editor) { GdkRGBA color; - gchar *text; + char *text; if (!editor->text_changed) return; diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c index 6926bad8b7..ad6ef4deb6 100644 --- a/gtk/gtkcolorswatch.c +++ b/gtk/gtkcolorswatch.c @@ -60,7 +60,7 @@ struct _GtkColorSwatch GdkRGBA color; gdouble radius[4]; - gchar *icon; + char *icon; guint has_color : 1; guint use_alpha : 1; guint selectable : 1; @@ -627,7 +627,7 @@ gtk_color_swatch_get_rgba (GtkColorSwatch *swatch, void gtk_color_swatch_set_icon (GtkColorSwatch *swatch, - const gchar *icon) + const char *icon) { swatch->icon = g_strdup (icon); update_icon (swatch); diff --git a/gtk/gtkcolorswatchprivate.h b/gtk/gtkcolorswatchprivate.h index af28f97f5c..fa8bac76f6 100644 --- a/gtk/gtkcolorswatchprivate.h +++ b/gtk/gtkcolorswatchprivate.h @@ -43,7 +43,7 @@ void gtk_color_swatch_set_hsva (GtkColorSwatch *swatch, void gtk_color_swatch_set_can_drop (GtkColorSwatch *swatch, gboolean can_drop); void gtk_color_swatch_set_icon (GtkColorSwatch *swatch, - const gchar *icon); + const char *icon); void gtk_color_swatch_set_use_alpha (GtkColorSwatch *swatch, gboolean use_alpha); void gtk_color_swatch_set_selectable (GtkColorSwatch *swatch, diff --git a/gtk/gtkcolumnview.c b/gtk/gtkcolumnview.c index 79b725b21c..b7a5b1bbe1 100644 --- a/gtk/gtkcolumnview.c +++ b/gtk/gtkcolumnview.c @@ -170,7 +170,7 @@ static void gtk_column_view_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_COLUMN_VIEW_COLUMN (child)) { diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 046d48e1ca..0874726b17 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -258,7 +258,7 @@ static void gtk_combo_box_model_row_changed (GtkTreeModel *model, gpointer data); static void gtk_combo_box_menu_activate (GtkWidget *menu, - const gchar *path, + const char *path, GtkComboBox *combo_box); static void gtk_combo_box_update_sensitivity (GtkComboBox *combo_box); static gboolean gtk_combo_box_menu_key (GtkEventControllerKey *key, @@ -284,8 +284,8 @@ static void gtk_combo_box_entry_contents_changed (GtkEntry *e gpointer user_data); static void gtk_combo_box_entry_active_changed (GtkComboBox *combo_box, gpointer user_data); -static gchar *gtk_combo_box_format_entry_text (GtkComboBox *combo_box, - const gchar *path); +static char *gtk_combo_box_format_entry_text (GtkComboBox *combo_box, + const char *path); /* GtkBuildable method implementation */ static GtkBuildableIface *parent_buildable_iface; @@ -294,21 +294,21 @@ static void gtk_combo_box_buildable_init (GtkBuildableIface static void gtk_combo_box_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type); + const char *type); static gboolean gtk_combo_box_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); static void gtk_combo_box_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data); static GObject *gtk_combo_box_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *childname); + const char *childname); @@ -515,9 +515,9 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass) * Here's an example signal handler which fetches data from the model and * displays it in the entry. * |[ - * static gchar* + * static char * * format_entry_text_callback (GtkComboBox *combo, - * const gchar *path, + * const char *path, * gpointer user_data) * { * GtkTreeIter iter; @@ -1691,7 +1691,7 @@ gtk_combo_box_scroll_controller_scroll (GtkEventControllerScroll *scroll, /* callbacks */ static void gtk_combo_box_menu_activate (GtkWidget *menu, - const gchar *path, + const char *path, GtkComboBox *combo_box) { GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); @@ -2315,8 +2315,8 @@ gtk_combo_box_entry_active_changed (GtkComboBox *combo_box, if (entry) { GtkTreePath *path; - gchar *path_str; - gchar *text = NULL; + char *path_str; + char *text = NULL; model = gtk_combo_box_get_model (combo_box); path = gtk_tree_model_get_path (model, &iter); @@ -2343,14 +2343,14 @@ gtk_combo_box_entry_active_changed (GtkComboBox *combo_box, } } -static gchar * +static char * gtk_combo_box_format_entry_text (GtkComboBox *combo_box, - const gchar *path) + const char *path) { GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); GtkTreeModel *model; GtkTreeIter iter; - gchar *text = NULL; + char *text = NULL; if (priv->text_column >= 0) { @@ -2735,7 +2735,7 @@ static void gtk_combo_box_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_CELL_RENDERER (child)) _gtk_cell_layout_buildable_add_child (buildable, builder, child, type); @@ -2749,7 +2749,7 @@ static gboolean gtk_combo_box_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data) { @@ -2765,7 +2765,7 @@ static void gtk_combo_box_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data) { if (!_gtk_cell_layout_buildable_custom_tag_end (buildable, builder, child, tagname, data)) @@ -2775,7 +2775,7 @@ gtk_combo_box_buildable_custom_tag_end (GtkBuildable *buildable, static GObject * gtk_combo_box_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *childname) + const char *childname) { GtkComboBox *combo_box = GTK_COMBO_BOX (buildable); GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); @@ -2852,7 +2852,7 @@ gtk_combo_box_get_id_column (GtkComboBox *combo_box) * * Returns: (nullable): the ID of the active row, or %NULL **/ -const gchar * +const char * gtk_combo_box_get_active_id (GtkComboBox *combo_box) { GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); @@ -2873,8 +2873,8 @@ gtk_combo_box_get_active_id (GtkComboBox *combo_box) if (gtk_combo_box_get_active_iter (combo_box, &iter)) { - const gchar *interned; - gchar *id; + const char *interned; + char *id; gtk_tree_model_get (model, &iter, column, &id, -1); interned = g_intern_string (id); @@ -2904,7 +2904,7 @@ gtk_combo_box_get_active_id (GtkComboBox *combo_box) **/ gboolean gtk_combo_box_set_active_id (GtkComboBox *combo_box, - const gchar *active_id) + const char *active_id) { GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); GtkTreeModel *model; @@ -2931,7 +2931,7 @@ gtk_combo_box_set_active_id (GtkComboBox *combo_box, if (gtk_tree_model_get_iter_first (model, &iter)) do { - gchar *id; + char *id; gtk_tree_model_get (model, &iter, column, &id, -1); if (id != NULL) diff --git a/gtk/gtkcombobox.h b/gtk/gtkcombobox.h index 7247672b4b..c47a53ca2b 100644 --- a/gtk/gtkcombobox.h +++ b/gtk/gtkcombobox.h @@ -58,8 +58,8 @@ struct _GtkComboBoxClass /* signals */ void (* changed) (GtkComboBox *combo_box); - gchar *(* format_entry_text) (GtkComboBox *combo_box, - const gchar *path); + char *(* format_entry_text) (GtkComboBox *combo_box, + const char *path); /*< private >*/ @@ -144,10 +144,10 @@ GDK_AVAILABLE_IN_ALL void gtk_combo_box_set_id_column (GtkComboBox *combo_box, int id_column); GDK_AVAILABLE_IN_ALL -const gchar * gtk_combo_box_get_active_id (GtkComboBox *combo_box); +const char * gtk_combo_box_get_active_id (GtkComboBox *combo_box); GDK_AVAILABLE_IN_ALL gboolean gtk_combo_box_set_active_id (GtkComboBox *combo_box, - const gchar *active_id); + const char *active_id); GDK_AVAILABLE_IN_ALL void gtk_combo_box_set_child (GtkComboBox *combo_box, diff --git a/gtk/gtkcomboboxtext.c b/gtk/gtkcomboboxtext.c index 0578f8336d..0da6fe3210 100644 --- a/gtk/gtkcomboboxtext.c +++ b/gtk/gtkcomboboxtext.c @@ -104,14 +104,14 @@ static void gtk_combo_box_text_buildable_interface_init (GtkBuildableIface static gboolean gtk_combo_box_text_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); static void gtk_combo_box_text_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data); @@ -174,12 +174,12 @@ gtk_combo_box_text_buildable_interface_init (GtkBuildableIface *iface) typedef struct { GtkBuilder *builder; GObject *object; - const gchar *domain; - gchar *id; + const char *domain; + char *id; GString *string; - gchar *context; + char *context; guint translatable : 1; guint is_text : 1; @@ -187,9 +187,9 @@ typedef struct { static void item_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -207,9 +207,9 @@ item_start_element (GtkBuildableParseContext *context, } else if (strcmp (element_name, "item") == 0) { - const gchar *id = NULL; + const char *id = NULL; gboolean translatable = FALSE; - const gchar *msg_context = NULL; + const char *msg_context = NULL; if (!_gtk_builder_check_parent (data->builder, context, "items", error)) return; @@ -240,7 +240,7 @@ item_start_element (GtkBuildableParseContext *context, static void item_text (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) @@ -253,7 +253,7 @@ item_text (GtkBuildableParseContext *context, static void item_end_element (GtkBuildableParseContext *context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error) { @@ -264,7 +264,7 @@ item_end_element (GtkBuildableParseContext *context, { if (data->translatable) { - const gchar *translated; + const char *translated; translated = _gtk_builder_parser_translate (data->domain, data->context, @@ -293,7 +293,7 @@ static gboolean gtk_combo_box_text_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *parser_data) { @@ -324,7 +324,7 @@ static void gtk_combo_box_text_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data) { ItemParserData *data; @@ -386,7 +386,7 @@ gtk_combo_box_text_new_with_entry (void) */ void gtk_combo_box_text_append_text (GtkComboBoxText *combo_box, - const gchar *text) + const char *text) { gtk_combo_box_text_insert (combo_box, -1, NULL, text); } @@ -403,7 +403,7 @@ gtk_combo_box_text_append_text (GtkComboBoxText *combo_box, */ void gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box, - const gchar *text) + const char *text) { gtk_combo_box_text_insert (combo_box, 0, NULL, text); } @@ -424,7 +424,7 @@ gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box, void gtk_combo_box_text_insert_text (GtkComboBoxText *combo_box, int position, - const gchar *text) + const char *text) { gtk_combo_box_text_insert (combo_box, position, NULL, text); } @@ -443,8 +443,8 @@ gtk_combo_box_text_insert_text (GtkComboBoxText *combo_box, */ void gtk_combo_box_text_append (GtkComboBoxText *combo_box, - const gchar *id, - const gchar *text) + const char *id, + const char *text) { gtk_combo_box_text_insert (combo_box, -1, id, text); } @@ -463,8 +463,8 @@ gtk_combo_box_text_append (GtkComboBoxText *combo_box, */ void gtk_combo_box_text_prepend (GtkComboBoxText *combo_box, - const gchar *id, - const gchar *text) + const char *id, + const char *text) { gtk_combo_box_text_insert (combo_box, 0, id, text); } @@ -486,8 +486,8 @@ gtk_combo_box_text_prepend (GtkComboBoxText *combo_box, void gtk_combo_box_text_insert (GtkComboBoxText *combo_box, int position, - const gchar *id, - const gchar *text) + const char *id, + const char *text) { GtkListStore *store; GtkTreeIter iter; @@ -582,11 +582,11 @@ gtk_combo_box_text_remove_all (GtkComboBoxText *combo_box) * Returns: (nullable) (transfer full): a newly allocated string containing the * currently active text. Must be freed with g_free(). */ -gchar * +char * gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box) { GtkTreeIter iter; - gchar *text = NULL; + char *text = NULL; g_return_val_if_fail (GTK_IS_COMBO_BOX_TEXT (combo_box), NULL); diff --git a/gtk/gtkcomboboxtext.h b/gtk/gtkcomboboxtext.h index e25478404a..33c4b18cc3 100644 --- a/gtk/gtkcomboboxtext.h +++ b/gtk/gtkcomboboxtext.h @@ -41,35 +41,35 @@ GDK_AVAILABLE_IN_ALL GtkWidget* gtk_combo_box_text_new_with_entry (void); GDK_AVAILABLE_IN_ALL void gtk_combo_box_text_append_text (GtkComboBoxText *combo_box, - const gchar *text); + const char *text); GDK_AVAILABLE_IN_ALL void gtk_combo_box_text_insert_text (GtkComboBoxText *combo_box, int position, - const gchar *text); + const char *text); GDK_AVAILABLE_IN_ALL void gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box, - const gchar *text); + const char *text); GDK_AVAILABLE_IN_ALL void gtk_combo_box_text_remove (GtkComboBoxText *combo_box, int position); GDK_AVAILABLE_IN_ALL void gtk_combo_box_text_remove_all (GtkComboBoxText *combo_box); GDK_AVAILABLE_IN_ALL -gchar *gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box); +char *gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box); GDK_AVAILABLE_IN_ALL void gtk_combo_box_text_insert (GtkComboBoxText *combo_box, int position, - const gchar *id, - const gchar *text); + const char *id, + const char *text); GDK_AVAILABLE_IN_ALL void gtk_combo_box_text_append (GtkComboBoxText *combo_box, - const gchar *id, - const gchar *text); + const char *id, + const char *text); GDK_AVAILABLE_IN_ALL void gtk_combo_box_text_prepend (GtkComboBoxText *combo_box, - const gchar *id, - const gchar *text); + const char *id, + const char *text); G_END_DECLS diff --git a/gtk/gtkcomposetable.c b/gtk/gtkcomposetable.c index 4ae96c2350..250b3a7790 100644 --- a/gtk/gtkcomposetable.c +++ b/gtk/gtkcomposetable.c @@ -35,7 +35,7 @@ typedef struct { gunichar *sequence; gunichar value[2]; - gchar *comment; + char *comment; } GtkComposeData; @@ -54,7 +54,7 @@ gtk_compose_list_element_free (GtkComposeData *compose_data, gpointer data) } static gboolean -is_codepoint (const gchar *str) +is_codepoint (const char *str) { int i; @@ -73,10 +73,10 @@ is_codepoint (const gchar *str) static gboolean parse_compose_value (GtkComposeData *compose_data, - const gchar *val, - const gchar *line) + const char *val, + const char *line) { - gchar **words = g_strsplit (val, "\"", 3); + char **words = g_strsplit (val, "\"", 3); gunichar uch; if (g_strv_length (words) < 3) @@ -133,10 +133,10 @@ fail: static gboolean parse_compose_sequence (GtkComposeData *compose_data, - const gchar *seq, - const gchar *line) + const char *seq, + const char *line) { - gchar **words = g_strsplit (seq, "<", -1); + char **words = g_strsplit (seq, "<", -1); int i; int n = 0; @@ -148,9 +148,9 @@ parse_compose_sequence (GtkComposeData *compose_data, for (i = 1; words[i] != NULL; i++) { - gchar *start = words[i]; - gchar *end = strchr (words[i], '>'); - gchar *match; + char *start = words[i]; + char *end = strchr (words[i], '>'); + char *match; gunichar codepoint; if (words[i][0] == '\0') @@ -205,9 +205,9 @@ fail: static void parse_compose_line (GList **compose_list, - const gchar *line) + const char *line) { - gchar **components = NULL; + char **components = NULL; GtkComposeData *compose_data = NULL; if (line[0] == '\0' || line[0] == '#') @@ -245,10 +245,10 @@ fail: } static GList * -gtk_compose_list_parse_file (const gchar *compose_file) +gtk_compose_list_parse_file (const char *compose_file) { - gchar *contents = NULL; - gchar **lines = NULL; + char *contents = NULL; + char **lines = NULL; gsize length = 0; GError *error = NULL; GList *compose_list = NULL; @@ -447,8 +447,8 @@ gtk_compose_list_print (GList *compose_list, int total_size = 0; gunichar upper; gunichar lower; - const gchar *comment; - const gchar *keyval; + const char *comment; + const char *keyval; for (list = compose_list; list != NULL; list = list->next) { @@ -510,12 +510,12 @@ gtk_compose_table_data_hash (gconstpointer v, int length) return h; } -static gchar * +static char * gtk_compose_hash_get_cache_path (guint32 hash) { - gchar *basename = NULL; - gchar *dir = NULL; - gchar *path = NULL; + char *basename = NULL; + char *dir = NULL; + char *path = NULL; basename = g_strdup_printf ("%08x.cache", hash); @@ -534,14 +534,14 @@ gtk_compose_hash_get_cache_path (guint32 hash) return path; } -static gchar * +static char * gtk_compose_table_serialize (GtkComposeTable *compose_table, gsize *count) { - gchar *p, *contents; + char *p, *contents; gsize length, total_length; guint16 bytes; - const gchar *header = GTK_COMPOSE_TABLE_MAGIC; + const char *header = GTK_COMPOSE_TABLE_MAGIC; const guint16 version = GTK_COMPOSE_TABLE_VERSION; guint16 max_seq_len = compose_table->max_seq_len; guint16 index_stride = max_seq_len + 2; @@ -605,12 +605,12 @@ gtk_compose_table_find (gconstpointer data1, } static GtkComposeTable * -gtk_compose_table_load_cache (const gchar *compose_file) +gtk_compose_table_load_cache (const char *compose_file) { guint32 hash; - gchar *path = NULL; - gchar *contents = NULL; - gchar *p; + char *path = NULL; + char *contents = NULL; + char *p; GStatBuf original_buf; GStatBuf cache_buf; gsize total_length; @@ -717,8 +717,8 @@ out_load_cache: static void gtk_compose_table_save_cache (GtkComposeTable *compose_table) { - gchar *path = NULL; - gchar *contents = NULL; + char *path = NULL; + char *contents = NULL; GError *error = NULL; gsize length = 0; @@ -790,7 +790,7 @@ gtk_compose_table_new_with_list (GList *compose_list, } GtkComposeTable * -gtk_compose_table_new_with_file (const gchar *compose_file) +gtk_compose_table_new_with_file (const char *compose_file) { GList *compose_list = NULL; GtkComposeTable *compose_table; @@ -870,7 +870,7 @@ gtk_compose_table_list_add_array (GSList *compose_tables, GSList * gtk_compose_table_list_add_file (GSList *compose_tables, - const gchar *compose_file) + const char *compose_file) { guint32 hash; GtkComposeTable *compose_table; diff --git a/gtk/gtkcomposetable.h b/gtk/gtkcomposetable.h index b29a22718a..885ec6306d 100644 --- a/gtk/gtkcomposetable.h +++ b/gtk/gtkcomposetable.h @@ -42,13 +42,13 @@ struct _GtkComposeTableCompact int n_index_stride; }; -GtkComposeTable * gtk_compose_table_new_with_file (const gchar *compose_file); +GtkComposeTable * gtk_compose_table_new_with_file (const char *compose_file); GSList *gtk_compose_table_list_add_array (GSList *compose_tables, const guint16 *data, int max_seq_len, int n_seqs); GSList *gtk_compose_table_list_add_file (GSList *compose_tables, - const gchar *compose_file); + const char *compose_file); G_END_DECLS diff --git a/gtk/gtkcsscolorvalue.c b/gtk/gtkcsscolorvalue.c index cd80e2db2f..cf38ca11fd 100644 --- a/gtk/gtkcsscolorvalue.c +++ b/gtk/gtkcsscolorvalue.c @@ -43,7 +43,7 @@ struct _GtkCssValue union { - gchar *name; + char *name; GdkRGBA rgba; struct @@ -522,7 +522,7 @@ _gtk_css_color_value_new_literal (const GdkRGBA *color) } GtkCssValue * -_gtk_css_color_value_new_name (const gchar *name) +_gtk_css_color_value_new_name (const char *name) { GtkCssValue *value; diff --git a/gtk/gtkcsscolorvalueprivate.h b/gtk/gtkcsscolorvalueprivate.h index 15c6a0055e..793b3d8978 100644 --- a/gtk/gtkcsscolorvalueprivate.h +++ b/gtk/gtkcsscolorvalueprivate.h @@ -27,7 +27,7 @@ G_BEGIN_DECLS GtkCssValue * gtk_css_color_value_new_transparent (void) G_GNUC_PURE; 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_name (const gchar *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, gdouble factor) G_GNUC_PURE; GtkCssValue * _gtk_css_color_value_new_alpha (GtkCssValue *color, diff --git a/gtk/gtkcssimageradial.c b/gtk/gtkcssimageradial.c index 46e6da1584..3e263bf902 100644 --- a/gtk/gtkcssimageradial.c +++ b/gtk/gtkcssimageradial.c @@ -448,7 +448,7 @@ gtk_css_image_radial_print (GtkCssImage *image, { GtkCssImageRadial *radial = GTK_CSS_IMAGE_RADIAL (image); guint i; - const gchar *names[] = { + const char *names[] = { NULL, "closest-side", "farthest-side", diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 54e899bb89..8b4e710b93 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -122,7 +122,7 @@ struct _GtkCssProviderPrivate GArray *rulesets; GtkCssSelectorTree *tree; GResource *resource; - gchar *path; + char *path; }; enum { @@ -1090,7 +1090,7 @@ gtk_css_provider_load_internal (GtkCssProvider *self, **/ void gtk_css_provider_load_from_data (GtkCssProvider *css_provider, - const gchar *data, + const char *data, gssize length) { GBytes *bytes; @@ -1144,7 +1144,7 @@ gtk_css_provider_load_from_file (GtkCssProvider *css_provider, **/ void gtk_css_provider_load_from_path (GtkCssProvider *css_provider, - const gchar *path) + const char *path) { GFile *file; @@ -1171,10 +1171,10 @@ gtk_css_provider_load_from_path (GtkCssProvider *css_provider, */ void gtk_css_provider_load_from_resource (GtkCssProvider *css_provider, - const gchar *resource_path) + const char *resource_path) { GFile *file; - gchar *uri, *escaped; + char *uri, *escaped; g_return_if_fail (GTK_IS_CSS_PROVIDER (css_provider)); g_return_if_fail (resource_path != NULL); @@ -1192,10 +1192,10 @@ gtk_css_provider_load_from_resource (GtkCssProvider *css_provider, g_object_unref (file); } -gchar * +char * _gtk_get_theme_dir (void) { - const gchar *var; + const char *var; var = g_getenv ("GTK_DATA_PREFIX"); if (var == NULL) @@ -1206,7 +1206,7 @@ _gtk_get_theme_dir (void) /* Return the path that this providers gtk.css was loaded from, * if it is part of a theme, otherwise NULL. */ -const gchar * +const char * _gtk_css_provider_get_theme_dir (GtkCssProvider *provider) { GtkCssProviderPrivate *priv = gtk_css_provider_get_instance_private (provider); @@ -1228,17 +1228,17 @@ _gtk_css_provider_get_theme_dir (GtkCssProvider *provider) * $dir/$subdir/gtk-4.0/gtk-$variant.css * and return the first found file. */ -static gchar * -_gtk_css_find_theme_dir (const gchar *dir, - const gchar *subdir, - const gchar *name, - const gchar *variant) +static char * +_gtk_css_find_theme_dir (const char *dir, + const char *subdir, + const char *name, + const char *variant) { - gchar *file; - gchar *base; - gchar *subsubdir; + char *file; + char *base; + char *subsubdir; int i; - gchar *path; + char *path; if (variant) file = g_strconcat ("gtk-", variant, ".css", NULL); @@ -1271,11 +1271,11 @@ _gtk_css_find_theme_dir (const gchar *dir, #undef MINOR -static gchar * -_gtk_css_find_theme (const gchar *name, - const gchar *variant) +static char * +_gtk_css_find_theme (const char *name, + const char *variant) { - gchar *path; + char *path; const char *const *dirs; int i; char *dir; @@ -1321,11 +1321,11 @@ _gtk_css_find_theme (const gchar *name, **/ void gtk_css_provider_load_named (GtkCssProvider *provider, - const gchar *name, - const gchar *variant) + const char *name, + const char *variant) { - gchar *path; - gchar *resource_path; + char *path; + char *resource_path; g_return_if_fail (GTK_IS_CSS_PROVIDER (provider)); g_return_if_fail (name != NULL); diff --git a/gtk/gtkcssprovider.h b/gtk/gtkcssprovider.h index 01d26bf326..921185bbb6 100644 --- a/gtk/gtkcssprovider.h +++ b/gtk/gtkcssprovider.h @@ -48,18 +48,18 @@ char * gtk_css_provider_to_string (GtkCssProvider *provider); GDK_AVAILABLE_IN_ALL void gtk_css_provider_load_from_data (GtkCssProvider *css_provider, - const gchar *data, + const char *data, gssize length); GDK_AVAILABLE_IN_ALL void gtk_css_provider_load_from_file (GtkCssProvider *css_provider, GFile *file); GDK_AVAILABLE_IN_ALL void gtk_css_provider_load_from_path (GtkCssProvider *css_provider, - const gchar *path); + const char *path); GDK_AVAILABLE_IN_ALL void gtk_css_provider_load_from_resource (GtkCssProvider *css_provider, - const gchar *resource_path); + const char *resource_path); GDK_AVAILABLE_IN_ALL void gtk_css_provider_load_named (GtkCssProvider *provider, diff --git a/gtk/gtkcssproviderprivate.h b/gtk/gtkcssproviderprivate.h index e345d00120..ac71cf0566 100644 --- a/gtk/gtkcssproviderprivate.h +++ b/gtk/gtkcssproviderprivate.h @@ -22,9 +22,9 @@ G_BEGIN_DECLS -gchar *_gtk_get_theme_dir (void); +char *_gtk_get_theme_dir (void); -const gchar *_gtk_css_provider_get_theme_dir (GtkCssProvider *provider); +const char *_gtk_css_provider_get_theme_dir (GtkCssProvider *provider); void gtk_css_provider_set_keep_css_sections (void); diff --git a/gtk/gtkcsstypes.c b/gtk/gtkcsstypes.c index ea83226317..dd85bd58b1 100644 --- a/gtk/gtkcsstypes.c +++ b/gtk/gtkcsstypes.c @@ -215,7 +215,7 @@ gtk_css_change_to_string (GtkCssChange change) return g_string_free (string, FALSE); } -const gchar * +const char * gtk_css_pseudoclass_name (GtkStateFlags state) { static const char * state_names[] = { diff --git a/gtk/gtkcustompaperunixdialog.c b/gtk/gtkcustompaperunixdialog.c index 988cdac8cb..4bd995546f 100644 --- a/gtk/gtkcustompaperunixdialog.c +++ b/gtk/gtkcustompaperunixdialog.c @@ -109,10 +109,10 @@ _gtk_print_get_default_user_units (void) * Do *not* translate it to "predefinito:mm", if it * it isn't default:mm or default:inch it will not work */ - gchar *e = _("default:mm"); + char *e = _("default:mm"); #ifdef HAVE__NL_MEASUREMENT_MEASUREMENT - gchar *imperial = NULL; + char *imperial = NULL; imperial = nl_langinfo (_NL_MEASUREMENT_MEASUREMENT); if (imperial && imperial[0] == 2 ) @@ -243,7 +243,7 @@ static void gtk_print_save_custom_papers (GListStore *store) { GKeyFile *keyfile; - gchar *filename, *data, *parentdir; + char *filename, *data, *parentdir; gsize len; int i = 0; @@ -252,7 +252,7 @@ gtk_print_save_custom_papers (GListStore *store) for (i = 0; i < g_list_model_get_n_items (G_LIST_MODEL (store)); i++) { GtkPageSetup *page_setup; - gchar group[32]; + char group[32]; page_setup = g_list_model_get_item (G_LIST_MODEL (store), i); g_snprintf (group, sizeof (group), "Paper%u", i); @@ -397,7 +397,7 @@ gtk_custom_paper_unix_dialog_finalize (GObject *object) */ GtkWidget * _gtk_custom_paper_unix_dialog_new (GtkWindow *parent, - const gchar *title) + const char *title) { GtkWidget *result; @@ -591,7 +591,7 @@ unit_widget_changed (GtkCustomPaperUnixDialog *dialog) static gboolean custom_paper_name_used (GtkCustomPaperUnixDialog *dialog, - const gchar *name) + const char *name) { GtkPageSetup *page_setup; GtkPaperSize *paper_size; @@ -617,7 +617,7 @@ add_custom_paper (GtkCustomPaperUnixDialog *dialog) { GtkPageSetup *page_setup; GtkPaperSize *paper_size; - gchar *name; + char *name; int i; i = 1; @@ -740,11 +740,11 @@ margins_from_printer_changed (GtkCustomPaperUnixDialog *dialog) } static GtkWidget * -wrap_in_frame (const gchar *label, +wrap_in_frame (const char *label, GtkWidget *child) { GtkWidget *frame, *label_widget; - gchar *bold_text; + char *bold_text; label_widget = gtk_label_new (NULL); gtk_widget_set_halign (label_widget, GTK_ALIGN_START); diff --git a/gtk/gtkcustompaperunixdialog.h b/gtk/gtkcustompaperunixdialog.h index 6a8250c129..8f96bf91d2 100644 --- a/gtk/gtkcustompaperunixdialog.h +++ b/gtk/gtkcustompaperunixdialog.h @@ -31,7 +31,7 @@ typedef struct _GtkCustomPaperUnixDialog GtkCustomPaperUnixDialog; GDK_AVAILABLE_IN_ALL GType gtk_custom_paper_unix_dialog_get_type (void) G_GNUC_CONST; GtkWidget * _gtk_custom_paper_unix_dialog_new (GtkWindow *parent, - const gchar *title); + const char *title); GtkUnit _gtk_print_get_default_user_units (void); void _gtk_print_load_custom_papers (GtkListStore *store); void gtk_print_load_custom_papers (GListStore *store); diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 44d7c2dfe1..d06ff6d918 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -92,7 +92,7 @@ * |[ * // Function to open a dialog box with a message * void - * quick_message (GtkWindow *parent, gchar *message) + * quick_message (GtkWindow *parent, char *message) * { * GtkWidget *dialog, *label, *content_area; * GtkDialogFlags flags; @@ -183,7 +183,7 @@ struct _ResponseData }; static void gtk_dialog_add_buttons_valist (GtkDialog *dialog, - const gchar *first_button_text, + const char *first_button_text, va_list args); static gboolean gtk_dialog_close_request (GtkWindow *window); @@ -199,18 +199,18 @@ static void gtk_dialog_buildable_interface_init (GtkBuildableIface *iface static gboolean gtk_dialog_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); static void gtk_dialog_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data); static void gtk_dialog_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type); + const char *type); enum { @@ -673,7 +673,7 @@ gtk_dialog_new (void) } static GtkWidget* -gtk_dialog_new_empty (const gchar *title, +gtk_dialog_new_empty (const char *title, GtkWindow *parent, GtkDialogFlags flags) { @@ -742,10 +742,10 @@ gtk_dialog_new_empty (const gchar *title, * Returns: a new #GtkDialog */ GtkWidget* -gtk_dialog_new_with_buttons (const gchar *title, +gtk_dialog_new_with_buttons (const char *title, GtkWindow *parent, GtkDialogFlags flags, - const gchar *first_button_text, + const char *first_button_text, ...) { GtkDialog *dialog; @@ -871,7 +871,7 @@ gtk_dialog_add_action_widget (GtkDialog *dialog, **/ GtkWidget* gtk_dialog_add_button (GtkDialog *dialog, - const gchar *button_text, + const char *button_text, int response_id) { GtkWidget *button; @@ -889,10 +889,10 @@ gtk_dialog_add_button (GtkDialog *dialog, static void gtk_dialog_add_buttons_valist (GtkDialog *dialog, - const gchar *first_button_text, + const char *first_button_text, va_list args) { - const gchar* text; + const char * text; int response_id; g_return_if_fail (GTK_IS_DIALOG (dialog)); @@ -907,7 +907,7 @@ gtk_dialog_add_buttons_valist (GtkDialog *dialog, { gtk_dialog_add_button (dialog, text, response_id); - text = va_arg (args, gchar*); + text = va_arg (args, char *); if (text == NULL) break; response_id = va_arg (args, int); @@ -927,7 +927,7 @@ gtk_dialog_add_buttons_valist (GtkDialog *dialog, */ void gtk_dialog_add_buttons (GtkDialog *dialog, - const gchar *first_button_text, + const char *first_button_text, ...) { va_list args; @@ -1071,7 +1071,7 @@ gtk_dialog_get_response_for_widget (GtkDialog *dialog, } typedef struct { - gchar *widget_name; + char *widget_name; int response_id; gboolean is_default; int line; @@ -1102,9 +1102,9 @@ free_action_widget_info (gpointer data) static void parser_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -1112,7 +1112,7 @@ parser_start_element (GtkBuildableParseContext *context, if (strcmp (element_name, "action-widget") == 0) { - const gchar *response; + const char *response; gboolean is_default = FALSE; GValue gvalue = G_VALUE_INIT; @@ -1162,7 +1162,7 @@ parser_start_element (GtkBuildableParseContext *context, static void parser_text_element (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) @@ -1175,7 +1175,7 @@ parser_text_element (GtkBuildableParseContext *context, static void parser_end_element (GtkBuildableParseContext *context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error) { @@ -1209,7 +1209,7 @@ static gboolean gtk_dialog_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *parser_data) { @@ -1240,7 +1240,7 @@ static void gtk_dialog_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data) { GtkDialog *dialog = GTK_DIALOG (buildable); @@ -1326,7 +1326,7 @@ static void gtk_dialog_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { GtkDialog *dialog = GTK_DIALOG (buildable); GtkDialogPrivate *priv = gtk_dialog_get_instance_private (dialog); diff --git a/gtk/gtkdialog.h b/gtk/gtkdialog.h index e5ffc1a90e..00f8d535ee 100644 --- a/gtk/gtkdialog.h +++ b/gtk/gtkdialog.h @@ -138,10 +138,10 @@ GDK_AVAILABLE_IN_ALL GtkWidget* gtk_dialog_new (void); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_dialog_new_with_buttons (const gchar *title, +GtkWidget* gtk_dialog_new_with_buttons (const char *title, GtkWindow *parent, GtkDialogFlags flags, - const gchar *first_button_text, + const char *first_button_text, ...) G_GNUC_NULL_TERMINATED; GDK_AVAILABLE_IN_ALL @@ -150,11 +150,11 @@ void gtk_dialog_add_action_widget (GtkDialog *dialog, int response_id); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_dialog_add_button (GtkDialog *dialog, - const gchar *button_text, + const char *button_text, int response_id); GDK_AVAILABLE_IN_ALL void gtk_dialog_add_buttons (GtkDialog *dialog, - const gchar *first_button_text, + const char *first_button_text, ...) G_GNUC_NULL_TERMINATED; GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkeditable.h b/gtk/gtkeditable.h index c5539fe84e..2e3f886f56 100644 --- a/gtk/gtkeditable.h +++ b/gtk/gtkeditable.h @@ -49,7 +49,7 @@ struct _GtkEditableInterface /* signals */ void (* insert_text) (GtkEditable *editable, - const gchar *text, + const char *text, int length, int *position); void (* delete_text) (GtkEditable *editable, diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index dbf69b834a..2fdb9483e1 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -188,7 +188,7 @@ struct _GtkEntryPrivate struct _EntryIconInfo { GtkWidget *widget; - gchar *tooltip; + char *tooltip; guint nonactivatable : 1; guint in_drag : 1; @@ -338,7 +338,7 @@ static gboolean gtk_entry_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data) { @@ -364,7 +364,7 @@ static void gtk_entry_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data) { GtkPangoAttributeParserData *data = user_data; @@ -1434,7 +1434,7 @@ update_icon_style (GtkWidget *widget, GtkEntry *entry = GTK_ENTRY (widget); GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); EntryIconInfo *icon_info = priv->icons[icon_pos]; - const gchar *sides[2] = { GTK_STYLE_CLASS_LEFT, GTK_STYLE_CLASS_RIGHT }; + const char *sides[2] = { GTK_STYLE_CLASS_LEFT, GTK_STYLE_CLASS_RIGHT }; if (icon_info == NULL) return; @@ -2440,7 +2440,7 @@ gtk_entry_set_icon_from_paintable (GtkEntry *entry, void gtk_entry_set_icon_from_icon_name (GtkEntry *entry, GtkEntryIconPosition icon_pos, - const gchar *icon_name) + const char *icon_name) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); EntryIconInfo *icon_info; @@ -2662,7 +2662,7 @@ gtk_entry_get_icon_gicon (GtkEntry *entry, * Returns: (nullable): An icon name, or %NULL if no icon is set or if the icon * wasn’t set from an icon name */ -const gchar * +const char * gtk_entry_get_icon_name (GtkEntry *entry, GtkEntryIconPosition icon_pos) { @@ -2970,13 +2970,13 @@ ensure_has_tooltip (GtkEntry *entry) * Returns: (nullable): the tooltip text, or %NULL. Free the returned * string with g_free() when done. */ -gchar * +char * gtk_entry_get_icon_tooltip_text (GtkEntry *entry, GtkEntryIconPosition icon_pos) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); EntryIconInfo *icon_info; - gchar *text = NULL; + char *text = NULL; g_return_val_if_fail (GTK_IS_ENTRY (entry), NULL); g_return_val_if_fail (IS_VALID_ICON_POSITION (icon_pos), NULL); @@ -3016,7 +3016,7 @@ gtk_entry_get_icon_tooltip_text (GtkEntry *entry, void gtk_entry_set_icon_tooltip_text (GtkEntry *entry, GtkEntryIconPosition icon_pos, - const gchar *tooltip) + const char *tooltip) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); EntryIconInfo *icon_info; @@ -3056,7 +3056,7 @@ gtk_entry_set_icon_tooltip_text (GtkEntry *entry, * Returns: (nullable): the tooltip text, or %NULL. Free the returned * string with g_free() when done. */ -gchar * +char * gtk_entry_get_icon_tooltip_markup (GtkEntry *entry, GtkEntryIconPosition icon_pos) { @@ -3092,7 +3092,7 @@ gtk_entry_get_icon_tooltip_markup (GtkEntry *entry, void gtk_entry_set_icon_tooltip_markup (GtkEntry *entry, GtkEntryIconPosition icon_pos, - const gchar *tooltip) + const char *tooltip) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); EntryIconInfo *icon_info; @@ -3376,7 +3376,7 @@ gtk_entry_progress_pulse (GtkEntry *entry) **/ void gtk_entry_set_placeholder_text (GtkEntry *entry, - const gchar *text) + const char *text) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); @@ -3396,7 +3396,7 @@ gtk_entry_set_placeholder_text (GtkEntry *entry, * not be freed, modified or stored. If no placeholder text has been set, * %NULL will be returned. **/ -const gchar * +const char * gtk_entry_get_placeholder_text (GtkEntry *entry) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); diff --git a/gtk/gtkentry.h b/gtk/gtkentry.h index 4f5b529a18..dfcbce68f7 100644 --- a/gtk/gtkentry.h +++ b/gtk/gtkentry.h @@ -180,10 +180,10 @@ gdouble gtk_entry_get_progress_pulse_step (GtkEntry *entry); GDK_AVAILABLE_IN_ALL void gtk_entry_progress_pulse (GtkEntry *entry); GDK_AVAILABLE_IN_ALL -const gchar* gtk_entry_get_placeholder_text (GtkEntry *entry); +const char * gtk_entry_get_placeholder_text (GtkEntry *entry); GDK_AVAILABLE_IN_ALL void gtk_entry_set_placeholder_text (GtkEntry *entry, - const gchar *text); + const char *text); /* Setting and managing icons */ GDK_AVAILABLE_IN_ALL @@ -193,7 +193,7 @@ void gtk_entry_set_icon_from_paintable (GtkEntry * GDK_AVAILABLE_IN_ALL void gtk_entry_set_icon_from_icon_name (GtkEntry *entry, GtkEntryIconPosition icon_pos, - const gchar *icon_name); + const char *icon_name); GDK_AVAILABLE_IN_ALL void gtk_entry_set_icon_from_gicon (GtkEntry *entry, GtkEntryIconPosition icon_pos, @@ -205,7 +205,7 @@ GDK_AVAILABLE_IN_ALL GdkPaintable * gtk_entry_get_icon_paintable (GtkEntry *entry, GtkEntryIconPosition icon_pos); GDK_AVAILABLE_IN_ALL -const gchar* gtk_entry_get_icon_name (GtkEntry *entry, +const char * gtk_entry_get_icon_name (GtkEntry *entry, GtkEntryIconPosition icon_pos); GDK_AVAILABLE_IN_ALL GIcon* gtk_entry_get_icon_gicon (GtkEntry *entry, @@ -231,16 +231,16 @@ int gtk_entry_get_icon_at_pos (GtkEntry * GDK_AVAILABLE_IN_ALL void gtk_entry_set_icon_tooltip_text (GtkEntry *entry, GtkEntryIconPosition icon_pos, - const gchar *tooltip); + const char *tooltip); GDK_AVAILABLE_IN_ALL -gchar * gtk_entry_get_icon_tooltip_text (GtkEntry *entry, +char * gtk_entry_get_icon_tooltip_text (GtkEntry *entry, GtkEntryIconPosition icon_pos); GDK_AVAILABLE_IN_ALL void gtk_entry_set_icon_tooltip_markup (GtkEntry *entry, GtkEntryIconPosition icon_pos, - const gchar *tooltip); + const char *tooltip); GDK_AVAILABLE_IN_ALL -gchar * gtk_entry_get_icon_tooltip_markup (GtkEntry *entry, +char * gtk_entry_get_icon_tooltip_markup (GtkEntry *entry, GtkEntryIconPosition icon_pos); GDK_AVAILABLE_IN_ALL void gtk_entry_set_icon_drag_source (GtkEntry *entry, diff --git a/gtk/gtkentrybuffer.c b/gtk/gtkentrybuffer.c index 00158e3a0c..f90afe72dd 100644 --- a/gtk/gtkentrybuffer.c +++ b/gtk/gtkentrybuffer.c @@ -70,7 +70,7 @@ typedef struct _GtkEntryBufferPrivate GtkEntryBufferPrivate; struct _GtkEntryBufferPrivate { /* Only valid if this class is not derived */ - gchar *normal_text; + char *normal_text; gsize normal_text_size; gsize normal_text_bytes; guint normal_text_chars; @@ -90,15 +90,15 @@ G_DEFINE_TYPE_WITH_PRIVATE (GtkEntryBuffer, gtk_entry_buffer, G_TYPE_OBJECT) /* Overwrite a memory that might contain sensitive information. */ static void -trash_area (gchar *area, +trash_area (char *area, gsize len) { - volatile gchar *varea = (volatile gchar *)area; + volatile char *varea = (volatile char *)area; while (len-- > 0) *varea++ = 0; } -static const gchar* +static const char * gtk_entry_buffer_normal_get_text (GtkEntryBuffer *buffer, gsize *n_bytes) { @@ -124,7 +124,7 @@ gtk_entry_buffer_normal_get_length (GtkEntryBuffer *buffer) static guint gtk_entry_buffer_normal_insert_text (GtkEntryBuffer *buffer, guint position, - const gchar *chars, + const char *chars, guint n_chars) { GtkEntryBufferPrivate *pv = gtk_entry_buffer_get_instance_private (buffer); @@ -137,7 +137,7 @@ gtk_entry_buffer_normal_insert_text (GtkEntryBuffer *buffer, /* Need more memory */ if (n_bytes + pv->normal_text_bytes + 1 > pv->normal_text_size) { - gchar *et_new; + char *et_new; prev_size = pv->normal_text_size; @@ -211,7 +211,7 @@ gtk_entry_buffer_normal_delete_text (GtkEntryBuffer *buffer, static void gtk_entry_buffer_real_inserted_text (GtkEntryBuffer *buffer, guint position, - const gchar *chars, + const char *chars, guint n_chars) { g_object_notify_by_pspec (G_OBJECT (buffer), entry_buffer_props[PROP_TEXT]); @@ -436,7 +436,7 @@ gtk_entry_buffer_class_init (GtkEntryBufferClass *klass) * Returns: A new GtkEntryBuffer object. **/ GtkEntryBuffer* -gtk_entry_buffer_new (const gchar *initial_chars, +gtk_entry_buffer_new (const char *initial_chars, int n_initial_chars) { GtkEntryBuffer *buffer = g_object_new (GTK_TYPE_ENTRY_BUFFER, NULL); @@ -504,7 +504,7 @@ gtk_entry_buffer_get_bytes (GtkEntryBuffer *buffer) * storage in the buffer and must not be freed, modified or * stored. **/ -const gchar* +const char * gtk_entry_buffer_get_text (GtkEntryBuffer *buffer) { GtkEntryBufferClass *klass; @@ -532,7 +532,7 @@ gtk_entry_buffer_get_text (GtkEntryBuffer *buffer) **/ void gtk_entry_buffer_set_text (GtkEntryBuffer *buffer, - const gchar *chars, + const char *chars, int n_chars) { g_return_if_fail (GTK_IS_ENTRY_BUFFER (buffer)); @@ -617,7 +617,7 @@ gtk_entry_buffer_get_max_length (GtkEntryBuffer *buffer) guint gtk_entry_buffer_insert_text (GtkEntryBuffer *buffer, guint position, - const gchar *chars, + const char *chars, int n_chars) { GtkEntryBufferPrivate *pv = gtk_entry_buffer_get_instance_private (buffer); @@ -706,7 +706,7 @@ gtk_entry_buffer_delete_text (GtkEntryBuffer *buffer, void gtk_entry_buffer_emit_inserted_text (GtkEntryBuffer *buffer, guint position, - const gchar *chars, + const char *chars, guint n_chars) { g_return_if_fail (GTK_IS_ENTRY_BUFFER (buffer)); diff --git a/gtk/gtkentrybuffer.h b/gtk/gtkentrybuffer.h index 8c7a91b984..b44bd63a05 100644 --- a/gtk/gtkentrybuffer.h +++ b/gtk/gtkentrybuffer.h @@ -53,7 +53,7 @@ struct _GtkEntryBufferClass void (*inserted_text) (GtkEntryBuffer *buffer, guint position, - const gchar *chars, + const char *chars, guint n_chars); void (*deleted_text) (GtkEntryBuffer *buffer, @@ -62,14 +62,14 @@ struct _GtkEntryBufferClass /* Virtual Methods */ - const gchar* (*get_text) (GtkEntryBuffer *buffer, + const char * (*get_text) (GtkEntryBuffer *buffer, gsize *n_bytes); guint (*get_length) (GtkEntryBuffer *buffer); guint (*insert_text) (GtkEntryBuffer *buffer, guint position, - const gchar *chars, + const char *chars, guint n_chars); guint (*delete_text) (GtkEntryBuffer *buffer, @@ -91,7 +91,7 @@ GDK_AVAILABLE_IN_ALL GType gtk_entry_buffer_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkEntryBuffer* gtk_entry_buffer_new (const gchar *initial_chars, +GtkEntryBuffer* gtk_entry_buffer_new (const char *initial_chars, int n_initial_chars); GDK_AVAILABLE_IN_ALL @@ -101,11 +101,11 @@ GDK_AVAILABLE_IN_ALL guint gtk_entry_buffer_get_length (GtkEntryBuffer *buffer); GDK_AVAILABLE_IN_ALL -const gchar* gtk_entry_buffer_get_text (GtkEntryBuffer *buffer); +const char * gtk_entry_buffer_get_text (GtkEntryBuffer *buffer); GDK_AVAILABLE_IN_ALL void gtk_entry_buffer_set_text (GtkEntryBuffer *buffer, - const gchar *chars, + const char *chars, int n_chars); GDK_AVAILABLE_IN_ALL @@ -118,7 +118,7 @@ int gtk_entry_buffer_get_max_length (GtkEntryBuffe GDK_AVAILABLE_IN_ALL guint gtk_entry_buffer_insert_text (GtkEntryBuffer *buffer, guint position, - const gchar *chars, + const char *chars, int n_chars); GDK_AVAILABLE_IN_ALL @@ -129,7 +129,7 @@ guint gtk_entry_buffer_delete_text (GtkEntryBuffe GDK_AVAILABLE_IN_ALL void gtk_entry_buffer_emit_inserted_text (GtkEntryBuffer *buffer, guint position, - const gchar *chars, + const char *chars, guint n_chars); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index 81d492c510..fb8782f639 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -148,7 +148,7 @@ static gboolean gtk_entry_completion_match_selected (GtkEntryCompletion *co GtkTreeModel *model, GtkTreeIter *iter); static gboolean gtk_entry_completion_real_insert_prefix (GtkEntryCompletion *completion, - const gchar *prefix); + const char *prefix); static gboolean gtk_entry_completion_cursor_on_match (GtkEntryCompletion *completion, GtkTreeModel *model, GtkTreeIter *iter); @@ -156,7 +156,7 @@ static gboolean gtk_entry_completion_insert_completion (GtkEntryCompletion *co GtkTreeModel *model, GtkTreeIter *iter); static void gtk_entry_completion_insert_completion_text (GtkEntryCompletion *completion, - const gchar *text); + const char *text); static void connect_completion_signals (GtkEntryCompletion *completion); static void disconnect_completion_signals (GtkEntryCompletion *completion); @@ -411,7 +411,7 @@ static void gtk_entry_completion_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data) { /* Just ignore the boolean return from here */ @@ -707,13 +707,13 @@ gtk_entry_completion_get_area (GtkCellLayout *cell_layout) /* all those callbacks */ static gboolean gtk_entry_completion_default_completion_func (GtkEntryCompletion *completion, - const gchar *key, + const char *key, GtkTreeIter *iter, gpointer user_data) { - gchar *item = NULL; - gchar *normalized_string; - gchar *case_normalized_string; + char *item = NULL; + char *normalized_string; + char *case_normalized_string; gboolean ret = FALSE; @@ -1014,7 +1014,7 @@ gtk_entry_completion_get_minimum_key_length (GtkEntryCompletion *completion) void gtk_entry_completion_complete (GtkEntryCompletion *completion) { - gchar *tmp; + char *tmp; GtkTreeIter iter; g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion)); @@ -1197,7 +1197,7 @@ gtk_entry_completion_match_selected (GtkEntryCompletion *completion, GtkTreeModel *model, GtkTreeIter *iter) { - gchar *str = NULL; + char *str = NULL; gtk_tree_model_get (model, iter, completion->text_column, &str, -1); gtk_editable_set_text (GTK_EDITABLE (completion->entry), str ? str : ""); @@ -1233,12 +1233,12 @@ gtk_entry_completion_cursor_on_match (GtkEntryCompletion *completion, * Returns: (nullable) (transfer full): The common prefix all rows starting with * @key or %NULL if no row matches @key. **/ -gchar * +char * gtk_entry_completion_compute_prefix (GtkEntryCompletion *completion, const char *key) { GtkTreeIter iter; - gchar *prefix = NULL; + char *prefix = NULL; gboolean valid; if (completion->text_column < 0) @@ -1249,7 +1249,7 @@ gtk_entry_completion_compute_prefix (GtkEntryCompletion *completion, while (valid) { - gchar *text; + char *text; gtk_tree_model_get (GTK_TREE_MODEL (completion->filter_model), &iter, completion->text_column, &text, @@ -1261,8 +1261,8 @@ gtk_entry_completion_compute_prefix (GtkEntryCompletion *completion, prefix = g_strdup (text); else { - gchar *p = prefix; - gchar *q = text; + char *p = prefix; + char *q = text; while (*p && *p == *q) { @@ -1299,13 +1299,13 @@ gtk_entry_completion_compute_prefix (GtkEntryCompletion *completion, static gboolean gtk_entry_completion_real_insert_prefix (GtkEntryCompletion *completion, - const gchar *prefix) + const char *prefix) { if (prefix) { int key_len; int prefix_len; - const gchar *key; + const char *key; prefix_len = g_utf8_strlen (prefix, -1); @@ -1337,7 +1337,7 @@ gtk_entry_completion_real_insert_prefix (GtkEntryCompletion *completion, * * Returns: the prefix for the current completion */ -const gchar* +const char * gtk_entry_completion_get_completion_prefix (GtkEntryCompletion *completion) { g_return_val_if_fail (GTK_IS_ENTRY_COMPLETION (completion), NULL); @@ -1347,7 +1347,7 @@ gtk_entry_completion_get_completion_prefix (GtkEntryCompletion *completion) static void gtk_entry_completion_insert_completion_text (GtkEntryCompletion *completion, - const gchar *new_text) + const char *new_text) { int len; GtkText *text = gtk_entry_get_text_widget (GTK_ENTRY (completion->entry)); @@ -1376,7 +1376,7 @@ gtk_entry_completion_insert_completion (GtkEntryCompletion *completion, GtkTreeModel *model, GtkTreeIter *iter) { - gchar *str = NULL; + char *str = NULL; if (completion->text_column < 0) return FALSE; @@ -1402,7 +1402,7 @@ void gtk_entry_completion_insert_prefix (GtkEntryCompletion *completion) { gboolean done; - gchar *prefix; + char *prefix; GtkText *text = gtk_entry_get_text_widget (GTK_ENTRY (completion->entry)); GtkEntryBuffer *buffer = gtk_text_get_buffer (text); @@ -1906,7 +1906,7 @@ keypress_completion_out: if (!entry_set) { - gchar *str = NULL; + char *str = NULL; gtk_tree_model_get (model, &iter, completion->text_column, &str, diff --git a/gtk/gtkentrycompletion.h b/gtk/gtkentrycompletion.h index 4d98c8347e..476aa9834d 100644 --- a/gtk/gtkentrycompletion.h +++ b/gtk/gtkentrycompletion.h @@ -55,7 +55,7 @@ typedef struct _GtkEntryCompletion GtkEntryCompletion; * for @key */ typedef gboolean (* GtkEntryCompletionMatchFunc) (GtkEntryCompletion *completion, - const gchar *key, + const char *key, GtkTreeIter *iter, gpointer user_data); @@ -87,7 +87,7 @@ void gtk_entry_completion_set_minimum_key_length (GtkEntryComplet GDK_AVAILABLE_IN_ALL int gtk_entry_completion_get_minimum_key_length (GtkEntryCompletion *completion); GDK_AVAILABLE_IN_ALL -gchar * gtk_entry_completion_compute_prefix (GtkEntryCompletion *completion, +char * gtk_entry_completion_compute_prefix (GtkEntryCompletion *completion, const char *key); GDK_AVAILABLE_IN_ALL void gtk_entry_completion_complete (GtkEntryCompletion *completion); @@ -121,7 +121,7 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_entry_completion_get_popup_single_match (GtkEntryCompletion *completion); GDK_AVAILABLE_IN_ALL -const gchar *gtk_entry_completion_get_completion_prefix (GtkEntryCompletion *completion); +const char *gtk_entry_completion_get_completion_prefix (GtkEntryCompletion *completion); /* convenience */ GDK_AVAILABLE_IN_ALL void gtk_entry_completion_set_text_column (GtkEntryCompletion *completion, diff --git a/gtk/gtkentryprivate.h b/gtk/gtkentryprivate.h index eaafce354e..eb98ac938d 100644 --- a/gtk/gtkentryprivate.h +++ b/gtk/gtkentryprivate.h @@ -50,7 +50,7 @@ struct _GtkEntryCompletion int minimum_key_length; int text_column; - gchar *case_normalized_key; + char *case_normalized_key; GtkEventController *entry_key_controller; GtkEventController *entry_focus_controller; @@ -74,7 +74,7 @@ struct _GtkEntryCompletion guint inline_selection : 1; guint has_grab : 1; - gchar *completion_prefix; + char *completion_prefix; GSource *check_completion_idle; }; @@ -89,7 +89,7 @@ struct _GtkEntryCompletionClass void (* action_activated) (GtkEntryCompletion *completion, int index_); gboolean (* insert_prefix) (GtkEntryCompletion *completion, - const gchar *prefix); + const char *prefix); gboolean (* cursor_on_match) (GtkEntryCompletion *completion, GtkTreeModel *model, GtkTreeIter *iter); diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c index b20ea03ce8..b50f0a477d 100644 --- a/gtk/gtkexpander.c +++ b/gtk/gtkexpander.c @@ -197,7 +197,7 @@ static void gtk_expander_buildable_init (GtkBuildableIface *iface); static void gtk_expander_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type); + const char *type); /* GtkWidget */ @@ -431,7 +431,7 @@ static void gtk_expander_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (g_strcmp0 (type, "label") == 0) gtk_expander_set_label_widget (GTK_EXPANDER (buildable), GTK_WIDGET (child)); @@ -806,7 +806,7 @@ gtk_expander_measure (GtkWidget *widget, * Returns: a new #GtkExpander widget. */ GtkWidget * -gtk_expander_new (const gchar *label) +gtk_expander_new (const char *label) { return g_object_new (GTK_TYPE_EXPANDER, "label", label, NULL); } @@ -826,7 +826,7 @@ gtk_expander_new (const gchar *label) * Returns: a new #GtkExpander widget. */ GtkWidget * -gtk_expander_new_with_mnemonic (const gchar *label) +gtk_expander_new_with_mnemonic (const char *label) { return g_object_new (GTK_TYPE_EXPANDER, "label", label, @@ -921,7 +921,7 @@ gtk_expander_get_expanded (GtkExpander *expander) */ void gtk_expander_set_label (GtkExpander *expander, - const gchar *label) + const char *label) { g_return_if_fail (GTK_IS_EXPANDER (expander)); @@ -970,7 +970,7 @@ gtk_expander_set_label (GtkExpander *expander, * Returns: (nullable): The text of the label widget. This string is owned * by the widget and must not be modified or freed. */ -const gchar * +const char * gtk_expander_get_label (GtkExpander *expander) { g_return_val_if_fail (GTK_IS_EXPANDER (expander), NULL); diff --git a/gtk/gtkexpander.h b/gtk/gtkexpander.h index 1737816058..8ddf416e54 100644 --- a/gtk/gtkexpander.h +++ b/gtk/gtkexpander.h @@ -40,9 +40,9 @@ GDK_AVAILABLE_IN_ALL GType gtk_expander_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget *gtk_expander_new (const gchar *label); +GtkWidget *gtk_expander_new (const char *label); GDK_AVAILABLE_IN_ALL -GtkWidget *gtk_expander_new_with_mnemonic (const gchar *label); +GtkWidget *gtk_expander_new_with_mnemonic (const char *label); GDK_AVAILABLE_IN_ALL void gtk_expander_set_expanded (GtkExpander *expander, @@ -52,9 +52,9 @@ gboolean gtk_expander_get_expanded (GtkExpander *expander); GDK_AVAILABLE_IN_ALL void gtk_expander_set_label (GtkExpander *expander, - const gchar *label); + const char *label); GDK_AVAILABLE_IN_ALL -const gchar * gtk_expander_get_label (GtkExpander *expander); +const char * gtk_expander_get_label (GtkExpander *expander); GDK_AVAILABLE_IN_ALL void gtk_expander_set_use_underline (GtkExpander *expander, diff --git a/gtk/gtkexpression.c b/gtk/gtkexpression.c index 58f8fd590f..fada1d1d03 100644 --- a/gtk/gtkexpression.c +++ b/gtk/gtkexpression.c @@ -319,7 +319,7 @@ value_expression_collect_value (GValue *value, return NULL; } -static gchar * +static char * value_expression_lcopy_value (const GValue *value, guint n_collect_values, GTypeCValue *collect_values, diff --git a/gtk/gtkfilechooser.c b/gtk/gtkfilechooser.c index 259e55687d..f05b053f01 100644 --- a/gtk/gtkfilechooser.c +++ b/gtk/gtkfilechooser.c @@ -297,7 +297,7 @@ gtk_file_chooser_get_create_folders (GtkFileChooser *chooser) **/ void gtk_file_chooser_set_current_name (GtkFileChooser *chooser, - const gchar *name) + const char *name) { g_return_if_fail (GTK_IS_FILE_CHOOSER (chooser)); g_return_if_fail (name != NULL); @@ -320,7 +320,7 @@ gtk_file_chooser_set_current_name (GtkFileChooser *chooser, * whatever the contents of the entry are. Note also that this string is in * UTF-8 encoding, which is not necessarily the system’s encoding for filenames. **/ -gchar * +char * gtk_file_chooser_get_current_name (GtkFileChooser *chooser) { g_return_val_if_fail (GTK_IS_FILE_CHOOSER (chooser), NULL); diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index 4078a2d720..a530cb5909 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -347,7 +347,7 @@ struct DndSelectFolderData GtkFileChooserAction action; GCancellable *cancellable; GFile *file; - gchar **uris; + char **uris; guint i; gboolean selected; }; @@ -833,7 +833,7 @@ gtk_file_chooser_button_remove_shortcut_folder (GtkFileChooser *chooser, GtkFileChooserButton *button = GTK_FILE_CHOOSER_BUTTON (chooser); GtkTreeIter iter; int pos; - gchar type; + char type; pos = model_get_type_position (button, ROW_TYPE_SHORTCUT); gtk_tree_model_iter_nth_child (button->model, &iter, NULL, pos); @@ -1288,7 +1288,7 @@ change_icon_theme (GtkFileChooserButton *button) do { GIcon *icon = NULL; - gchar type; + char type; gpointer data; type = ROW_TYPE_INVALID; @@ -1549,7 +1549,7 @@ static void model_free_row_data (GtkFileChooserButton *button, GtkTreeIter *iter) { - gchar type; + char type; gpointer data; GCancellable *cancellable; @@ -1589,7 +1589,7 @@ model_add_special_get_info_cb (GObject *source, GCancellable *model_cancellable = NULL; GtkFileChooserButton *button = data->button; GFileInfo *info = NULL; - gchar *name; + char *name; if (!button->model) /* button got destroyed */ @@ -1644,8 +1644,8 @@ out: static void model_add_special (GtkFileChooserButton *button) { - const gchar *homedir; - const gchar *desktopdir; + const char *homedir; + const char *desktopdir; GtkListStore *store; GtkTreeIter iter; GFile *file; @@ -1757,7 +1757,7 @@ model_add_volumes (GtkFileChooserButton *button, gpointer *volume; GtkTreeIter iter; GIcon *icon; - gchar *display_name; + char *display_name; volume = l->data; if (G_IS_DRIVE (volume)) @@ -1833,7 +1833,7 @@ model_add_bookmarks (GtkFileChooserButton *button, } else { - gchar *label; + char *label; GIcon *icon; /* Don't call get_info for remote paths to avoid latency and @@ -1934,7 +1934,7 @@ model_update_current_folder (GtkFileChooserButton *button, } else { - gchar *label; + char *label; GIcon *icon; /* Don't call get_info for remote paths to avoid latency and @@ -2045,7 +2045,7 @@ filter_model_visible_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data) { - gchar type; + char type; gpointer data; gboolean retval, is_folder; @@ -2087,7 +2087,7 @@ name_cell_data_func (GtkCellLayout *layout, GtkTreeIter *iter, gpointer user_data) { - gchar type; + char type; type = 0; gtk_tree_model_get (model, iter, @@ -2107,7 +2107,7 @@ combo_box_row_separator_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data) { - gchar type = ROW_TYPE_INVALID; + char type = ROW_TYPE_INVALID; gtk_tree_model_get (model, iter, TYPE_COLUMN, &type, -1); @@ -2145,7 +2145,7 @@ update_combo_box (GtkFileChooserButton *button) do { - gchar type; + char type; gpointer data; type = ROW_TYPE_INVALID; @@ -2247,7 +2247,7 @@ out: static void update_label_and_image (GtkFileChooserButton *button) { - gchar *label_text; + char *label_text; GFile *file; gboolean done_changing_selection; @@ -2661,7 +2661,7 @@ combo_box_changed_cb (GtkComboBox *combo_box, if (gtk_combo_box_get_active_iter (combo_box, &iter)) { - gchar type; + char type; gpointer data; type = ROW_TYPE_INVALID; @@ -2785,7 +2785,7 @@ native_response_cb (GtkFileChooserNative *native, * Returns: a new button widget. */ GtkWidget * -gtk_file_chooser_button_new (const gchar *title, +gtk_file_chooser_button_new (const char *title, GtkFileChooserAction action) { g_return_val_if_fail (action == GTK_FILE_CHOOSER_ACTION_OPEN || @@ -2833,7 +2833,7 @@ gtk_file_chooser_button_new_with_dialog (GtkWidget *dialog) */ void gtk_file_chooser_button_set_title (GtkFileChooserButton *button, - const gchar *title) + const char *title) { g_return_if_fail (GTK_IS_FILE_CHOOSER_BUTTON (button)); @@ -2853,7 +2853,7 @@ gtk_file_chooser_button_set_title (GtkFileChooserButton *button, * * Returns: a pointer to the browse dialog’s title. */ -const gchar * +const char * gtk_file_chooser_button_get_title (GtkFileChooserButton *button) { g_return_val_if_fail (GTK_IS_FILE_CHOOSER_BUTTON (button), NULL); diff --git a/gtk/gtkfilechooserbutton.h b/gtk/gtkfilechooserbutton.h index ecd3bbd5be..af3cd78938 100644 --- a/gtk/gtkfilechooserbutton.h +++ b/gtk/gtkfilechooserbutton.h @@ -37,15 +37,15 @@ typedef struct _GtkFileChooserButton GtkFileChooserButton; GDK_AVAILABLE_IN_ALL GType gtk_file_chooser_button_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget * gtk_file_chooser_button_new (const gchar *title, +GtkWidget * gtk_file_chooser_button_new (const char *title, GtkFileChooserAction action); GDK_AVAILABLE_IN_ALL GtkWidget * gtk_file_chooser_button_new_with_dialog (GtkWidget *dialog); GDK_AVAILABLE_IN_ALL -const gchar * gtk_file_chooser_button_get_title (GtkFileChooserButton *button); +const char * gtk_file_chooser_button_get_title (GtkFileChooserButton *button); GDK_AVAILABLE_IN_ALL void gtk_file_chooser_button_set_title (GtkFileChooserButton *button, - const gchar *title); + const char *title); GDK_AVAILABLE_IN_ALL int gtk_file_chooser_button_get_width_chars (GtkFileChooserButton *button); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c index e77d8a6b0d..54cb4cc015 100644 --- a/gtk/gtkfilechooserdialog.c +++ b/gtk/gtkfilechooserdialog.c @@ -682,10 +682,10 @@ response_cb (GtkDialog *dialog, } static GtkWidget * -gtk_file_chooser_dialog_new_valist (const gchar *title, +gtk_file_chooser_dialog_new_valist (const char *title, GtkWindow *parent, GtkFileChooserAction action, - const gchar *first_button_text, + const char *first_button_text, va_list varargs) { GtkWidget *result; @@ -704,7 +704,7 @@ gtk_file_chooser_dialog_new_valist (const gchar *title, { response_id = va_arg (varargs, int); gtk_dialog_add_button (GTK_DIALOG (result), button_text, response_id); - button_text = va_arg (varargs, const gchar *); + button_text = va_arg (varargs, const char *); } return result; @@ -724,10 +724,10 @@ gtk_file_chooser_dialog_new_valist (const gchar *title, * Returns: a new #GtkFileChooserDialog **/ GtkWidget * -gtk_file_chooser_dialog_new (const gchar *title, +gtk_file_chooser_dialog_new (const char *title, GtkWindow *parent, GtkFileChooserAction action, - const gchar *first_button_text, + const char *first_button_text, ...) { GtkWidget *result; diff --git a/gtk/gtkfilechooserdialog.h b/gtk/gtkfilechooserdialog.h index 4c42ff35b7..2f47143374 100644 --- a/gtk/gtkfilechooserdialog.h +++ b/gtk/gtkfilechooserdialog.h @@ -37,10 +37,10 @@ typedef struct _GtkFileChooserDialog GtkFileChooserDialog; GDK_AVAILABLE_IN_ALL GType gtk_file_chooser_dialog_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget *gtk_file_chooser_dialog_new (const gchar *title, +GtkWidget *gtk_file_chooser_dialog_new (const char *title, GtkWindow *parent, GtkFileChooserAction action, - const gchar *first_button_text, + const char *first_button_text, ...) G_GNUC_NULL_TERMINATED; G_END_DECLS diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c index b399b96888..a9d721ba7b 100644 --- a/gtk/gtkfilechooserentry.c +++ b/gtk/gtkfilechooserentry.c @@ -55,8 +55,8 @@ struct _GtkFileChooserEntry GFile *base_folder; GFile *current_folder_file; - gchar *dir_part; - gchar *file_part; + char *dir_part; + char *file_part; GtkTreeModel *completion_store; GtkFileFilter *current_filter; @@ -93,7 +93,7 @@ static gboolean gtk_file_chooser_entry_tab_handler (GtkEventControllerKey *ke #ifdef G_OS_WIN32 static int insert_text_callback (GtkFileChooserEntry *widget, - const gchar *new_text, + const char *new_text, int new_text_length, int *position, gpointer user_data); @@ -184,7 +184,7 @@ _gtk_file_chooser_entry_class_init (GtkFileChooserEntryClass *class) static gboolean match_func (GtkEntryCompletion *compl, - const gchar *key, + const char *key, GtkTreeIter *iter, gpointer user_data) { @@ -375,7 +375,7 @@ has_uri_scheme (const char *str) static GFile * gtk_file_chooser_get_file_for_text (GtkFileChooserEntry *chooser_entry, - const gchar *str) + const char *str) { GFile *file; @@ -732,12 +732,12 @@ refresh_current_folder_and_file_part (GtkFileChooserEntry *chooser_entry) #ifdef G_OS_WIN32 static int insert_text_callback (GtkFileChooserEntry *chooser_entry, - const gchar *new_text, + const char *new_text, int new_text_length, int *position, gpointer user_data) { - const gchar *colon = memchr (new_text, ':', new_text_length); + const char *colon = memchr (new_text, ':', new_text_length); int i; /* Disallow these characters altogether */ @@ -884,7 +884,7 @@ _gtk_file_chooser_entry_get_current_folder (GtkFileChooserEntry *chooser_entry) * Returns: the entered filename - this value is owned by the * chooser entry and must not be modified or freed. **/ -const gchar * +const char * _gtk_file_chooser_entry_get_file_part (GtkFileChooserEntry *chooser_entry) { const char *last_slash, *text; @@ -994,7 +994,7 @@ _gtk_file_chooser_entry_get_is_folder (GtkFileChooserEntry *chooser_entry, void _gtk_file_chooser_entry_select_filename (GtkFileChooserEntry *chooser_entry) { - const gchar *str, *ext; + const char *str, *ext; glong len = -1; if (chooser_entry->action == GTK_FILE_CHOOSER_ACTION_SAVE) diff --git a/gtk/gtkfilechooserentry.h b/gtk/gtkfilechooserentry.h index e1ed9f7304..6ee277f8f7 100644 --- a/gtk/gtkfilechooserentry.h +++ b/gtk/gtkfilechooserentry.h @@ -38,7 +38,7 @@ GtkFileChooserAction _gtk_file_chooser_entry_get_action (GtkFileChooserEnt void _gtk_file_chooser_entry_set_base_folder (GtkFileChooserEntry *chooser_entry, GFile *folder); GFile * _gtk_file_chooser_entry_get_current_folder (GtkFileChooserEntry *chooser_entry); -const gchar * _gtk_file_chooser_entry_get_file_part (GtkFileChooserEntry *chooser_entry); +const char * _gtk_file_chooser_entry_get_file_part (GtkFileChooserEntry *chooser_entry); gboolean _gtk_file_chooser_entry_get_is_folder (GtkFileChooserEntry *chooser_entry, GFile *file); void _gtk_file_chooser_entry_select_filename (GtkFileChooserEntry *chooser_entry); diff --git a/gtk/gtkfilechoosernative.c b/gtk/gtkfilechoosernative.c index 8f9e98b9a7..7e050da9d7 100644 --- a/gtk/gtkfilechoosernative.c +++ b/gtk/gtkfilechoosernative.c @@ -527,11 +527,11 @@ gtk_file_chooser_native_init (GtkFileChooserNative *self) * Returns: a new #GtkFileChooserNative **/ GtkFileChooserNative * -gtk_file_chooser_native_new (const gchar *title, +gtk_file_chooser_native_new (const char *title, GtkWindow *parent, GtkFileChooserAction action, - const gchar *accept_label, - const gchar *cancel_label) + const char *accept_label, + const char *cancel_label) { GtkFileChooserNative *result; @@ -651,7 +651,7 @@ gtk_file_chooser_native_select_file (GtkFileChooser *chooser, static void gtk_file_chooser_native_set_current_name (GtkFileChooser *chooser, - const gchar *name) + const char *name) { GtkFileChooserNative *self = GTK_FILE_CHOOSER_NATIVE (chooser); diff --git a/gtk/gtkfilechoosernative.h b/gtk/gtkfilechoosernative.h index b85fbbc936..7a779cb946 100644 --- a/gtk/gtkfilechoosernative.h +++ b/gtk/gtkfilechoosernative.h @@ -34,11 +34,11 @@ GDK_AVAILABLE_IN_ALL G_DECLARE_FINAL_TYPE (GtkFileChooserNative, gtk_file_chooser_native, GTK, FILE_CHOOSER_NATIVE, GtkNativeDialog) GDK_AVAILABLE_IN_ALL -GtkFileChooserNative *gtk_file_chooser_native_new (const gchar *title, +GtkFileChooserNative *gtk_file_chooser_native_new (const char *title, GtkWindow *parent, GtkFileChooserAction action, - const gchar *accept_label, - const gchar *cancel_label); + const char *accept_label, + const char *cancel_label); GDK_AVAILABLE_IN_ALL const char *gtk_file_chooser_native_get_accept_label (GtkFileChooserNative *self); diff --git a/gtk/gtkfilechoosernativeportal.c b/gtk/gtkfilechoosernativeportal.c index e06d8678fb..858186428a 100644 --- a/gtk/gtkfilechoosernativeportal.c +++ b/gtk/gtkfilechoosernativeportal.c @@ -87,10 +87,10 @@ filechooser_portal_data_free (FilechooserPortalData *data) static void response_cb (GDBusConnection *connection, - const gchar *sender_name, - const gchar *object_path, - const gchar *interface_name, - const gchar *signal_name, + const char *sender_name, + const char *object_path, + const char *interface_name, + const char *signal_name, GVariant *parameters, gpointer user_data) { @@ -382,7 +382,7 @@ show_portal_file_chooser (GtkFileChooserNative *self, g_variant_new_string (GTK_FILE_CHOOSER_NATIVE (self)->current_name)); if (self->current_folder) { - gchar *path; + char *path; path = g_file_get_path (GTK_FILE_CHOOSER_NATIVE (self)->current_folder); g_variant_builder_add (&opt_builder, "{sv}", "current_folder", @@ -391,7 +391,7 @@ show_portal_file_chooser (GtkFileChooserNative *self, } if (self->current_file) { - gchar *path; + char *path; path = g_file_get_path (GTK_FILE_CHOOSER_NATIVE (self)->current_file); g_variant_builder_add (&opt_builder, "{sv}", "current_file", diff --git a/gtk/gtkfilechoosernativequartz.c b/gtk/gtkfilechoosernativequartz.c index fe24b2dcac..21360e5486 100644 --- a/gtk/gtkfilechoosernativequartz.c +++ b/gtk/gtkfilechoosernativequartz.c @@ -159,7 +159,7 @@ chooser_set_current_folder (FileChooserQuartzData *data, if (folder != NULL) { - gchar *uri; + char *uri; uri = g_file_get_uri (folder); [data->panel setDirectoryURL:[NSURL URLWithString:[NSString stringWithUTF8String:uri]]]; @@ -169,7 +169,7 @@ chooser_set_current_folder (FileChooserQuartzData *data, static void chooser_set_current_name (FileChooserQuartzData *data, - const gchar *name) + const char *name) { if (name != NULL) @@ -274,7 +274,7 @@ filechooser_quartz_launch (FileChooserQuartzData *data) if (data->current_file) { GFile *folder; - gchar *name; + char *name; folder = g_file_get_parent (data->current_file); name = g_file_get_basename (data->current_file); @@ -392,11 +392,11 @@ filechooser_quartz_launch (FileChooserQuartzData *data) return TRUE; } -static gchar * -strip_mnemonic (const gchar *s) +static char * +strip_mnemonic (const char *s) { - gchar *escaped; - gchar *ret = NULL; + char *escaped; + char *ret = NULL; if (s == NULL) return NULL; diff --git a/gtk/gtkfilechoosernativewin32.c b/gtk/gtkfilechoosernativewin32.c index bd1ebb6c5b..d4f6c10ef1 100644 --- a/gtk/gtkfilechoosernativewin32.c +++ b/gtk/gtkfilechoosernativewin32.c @@ -644,7 +644,7 @@ filechooser_win32_thread (gpointer _data) { gunichar2 *label = g_utf8_to_utf16 (choice->label, -1, NULL, NULL, NULL); DWORD sub_id = 0; - gchar **option; + char **option; IFileDialogCustomize_StartVisualGroup (pfdc, dialog_auxiliary_id++, label); hr = IFileDialogCustomize_AddComboBox (pfdc, dialog_control_id); diff --git a/gtk/gtkfilechooserprivate.h b/gtk/gtkfilechooserprivate.h index 2e96ff66e9..3042fb029b 100644 --- a/gtk/gtkfilechooserprivate.h +++ b/gtk/gtkfilechooserprivate.h @@ -62,8 +62,8 @@ struct _GtkFileChooserIface GError **error); GFile * (*get_current_folder) (GtkFileChooser *chooser); void (*set_current_name) (GtkFileChooser *chooser, - const gchar *name); - gchar * (*get_current_name) (GtkFileChooser *chooser); + const char *name); + char * (*get_current_name) (GtkFileChooser *chooser); gboolean (*select_file) (GtkFileChooser *chooser, GFile *file, GError **error); diff --git a/gtk/gtkfilechooserutils.c b/gtk/gtkfilechooserutils.c index d51e6f4051..de3ffa15d5 100644 --- a/gtk/gtkfilechooserutils.c +++ b/gtk/gtkfilechooserutils.c @@ -29,8 +29,8 @@ static gboolean delegate_set_current_folder (GtkFileChooser *choose GError **error); static GFile * delegate_get_current_folder (GtkFileChooser *chooser); static void delegate_set_current_name (GtkFileChooser *chooser, - const gchar *name); -static gchar * delegate_get_current_name (GtkFileChooser *chooser); + const char *name); +static char * delegate_get_current_name (GtkFileChooser *chooser); static gboolean delegate_select_file (GtkFileChooser *chooser, GFile *file, GError **error); @@ -270,12 +270,12 @@ delegate_get_current_folder (GtkFileChooser *chooser) static void delegate_set_current_name (GtkFileChooser *chooser, - const gchar *name) + const char *name) { gtk_file_chooser_set_current_name (get_delegate (chooser), name); } -static gchar * +static char * delegate_get_current_name (GtkFileChooser *chooser) { return gtk_file_chooser_get_current_name (get_delegate (chooser)); @@ -321,11 +321,11 @@ _gtk_file_chooser_get_settings_for_widget (GtkWidget *widget) return settings; } -gchar * +char * _gtk_file_chooser_label_for_file (GFile *file) { - const gchar *path, *start, *end, *p; - gchar *uri, *host, *label; + const char *path, *start, *end, *p; + char *uri, *host, *label; uri = g_file_get_uri (file); @@ -453,7 +453,7 @@ _gtk_file_info_get_icon (GFileInfo *info, { GIcon *icon; GdkPixbuf *pixbuf; - const gchar *thumbnail_path; + const char *thumbnail_path; thumbnail_path = g_file_info_get_attribute_byte_string (info, G_FILE_ATTRIBUTE_THUMBNAIL_PATH); diff --git a/gtk/gtkfilechooserutils.h b/gtk/gtkfilechooserutils.h index 43041e2885..46625b6c86 100644 --- a/gtk/gtkfilechooserutils.h +++ b/gtk/gtkfilechooserutils.h @@ -47,7 +47,7 @@ GQuark _gtk_file_chooser_delegate_get_quark (void) G_GNUC_CONST; GSettings *_gtk_file_chooser_get_settings_for_widget (GtkWidget *widget); -gchar * _gtk_file_chooser_label_for_file (GFile *file); +char * _gtk_file_chooser_label_for_file (GFile *file); gboolean _gtk_file_info_consider_as_directory (GFileInfo *info); gboolean _gtk_file_has_native_path (GFile *file); diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index a70938cf47..e0c817f820 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -416,8 +416,8 @@ static gboolean gtk_file_chooser_widget_update_current_folder (GtkF GError **error); static GFile * gtk_file_chooser_widget_get_current_folder (GtkFileChooser *chooser); static void gtk_file_chooser_widget_set_current_name (GtkFileChooser *chooser, - const gchar *name); -static gchar * gtk_file_chooser_widget_get_current_name (GtkFileChooser *chooser); + const char *name); +static char * gtk_file_chooser_widget_get_current_name (GtkFileChooser *chooser); static gboolean gtk_file_chooser_widget_select_file (GtkFileChooser *chooser, GFile *file, GError **error); @@ -456,7 +456,7 @@ static const char *gtk_file_chooser_widget_get_choice (GtkFileChooser *choos static void add_selection_to_recent_list (GtkFileChooserWidget *impl); static void location_popup_handler (GtkFileChooserWidget *impl, - const gchar *path); + const char *path); static void location_popup_on_paste_handler (GtkFileChooserWidget *impl); static void location_toggle_popup_handler (GtkFileChooserWidget *impl); static void up_folder_handler (GtkFileChooserWidget *impl); @@ -883,7 +883,7 @@ name_exists_get_info_cb (GObject *source, static void check_valid_child_name (GtkFileChooserWidget *impl, GFile *parent, - const gchar *name, + const char *name, gboolean is_folder, GFile *original, GtkWidget *error_stack, @@ -974,7 +974,7 @@ new_folder_create_clicked (GtkButton *button, { GError *error = NULL; GFile *file; - const gchar *name; + const char *name; name = gtk_editable_get_text (GTK_EDITABLE (impl->new_folder_name_entry)); file = g_file_get_child_for_display_name (impl->current_folder, name, &error); @@ -1314,7 +1314,7 @@ rename_file_rename_clicked (GtkButton *button, GtkFileChooserWidget *impl) { GFile *dest; - const gchar* new_name; + const char * new_name; gtk_popover_popdown (GTK_POPOVER (impl->rename_file_popover)); @@ -1356,7 +1356,7 @@ rename_selected_cb (GtkTreeModel *model, { GtkFileChooserWidget *impl = data; GdkRectangle rect; - gchar *filename; + char *filename; double x, y; gtk_tree_model_get (model, iter, @@ -1459,7 +1459,7 @@ open_folder_cb (GSimpleAction *action, if (files && GTK_IS_WINDOW (toplevel)) { GFile *file = files->data; - gchar *uri; + char *uri; uri = g_file_get_uri (file); gtk_show_uri (GTK_WINDOW (toplevel), uri, GDK_CURRENT_TIME); @@ -2104,7 +2104,7 @@ file_list_query_tooltip_cb (GtkWidget *widget, GtkTreePath *path; GtkTreeIter iter; GFile *file; - gchar *filename; + char *filename; if (impl->operation_mode == OPERATION_MODE_BROWSE) return FALSE; @@ -2562,7 +2562,7 @@ set_extra_widget (GtkFileChooserWidget *impl, static void switch_to_home_dir (GtkFileChooserWidget *impl) { - const gchar *home = g_get_home_dir (); + const char *home = g_get_home_dir (); GFile *home_file; if (home == NULL) @@ -2865,14 +2865,14 @@ update_appearance (GtkFileChooserWidget *impl) gtk_widget_queue_draw (impl->browse_files_tree_view); } -static gchar * +static char * gtk_file_chooser_widget_get_subtitle (GtkFileChooserWidget *impl) { - gchar *subtitle = NULL; + char *subtitle = NULL; if (impl->operation_mode == OPERATION_MODE_SEARCH) { - gchar *location; + char *location; location = gtk_places_sidebar_get_location_title (GTK_PLACES_SIDEBAR (impl->places_sidebar)); if (location) @@ -3758,7 +3758,7 @@ set_busy_cursor (GtkFileChooserWidget *impl, static void update_columns (GtkFileChooserWidget *impl, gboolean location_visible, - const gchar *time_title) + const char *time_title) { gboolean need_resize = FALSE; @@ -4138,13 +4138,13 @@ stop_loading_and_clear_list_model (GtkFileChooserWidget *impl, } /* Replace 'target' with 'replacement' in the input string. */ -static gchar * -string_replace (const gchar *input, - const gchar *target, - const gchar *replacement) +static char * +string_replace (const char *input, + const char *target, + const char *replacement) { - gchar **pieces; - gchar *output; + char **pieces; + char *output; pieces = g_strsplit (input, target, -1); output = g_strjoinv (replacement, pieces); @@ -4154,11 +4154,11 @@ string_replace (const gchar *input, } static void -replace_ratio (gchar **str) +replace_ratio (char **str) { if (g_get_charset (NULL)) { - gchar *ret; + char *ret; ret = string_replace (*str, ":", "\xE2\x80\x8E∶"); g_free (*str); *str = ret; @@ -4171,8 +4171,8 @@ my_g_format_date_for_display (GtkFileChooserWidget *impl, { GDateTime *now, *time; GDateTime *now_date, *date; - const gchar *format; - gchar *date_str; + const char *format; + char *date_str; int days_ago; time = g_date_time_new_from_unix_local (secs); @@ -4231,8 +4231,8 @@ my_g_format_time_for_display (GtkFileChooserWidget *impl, glong secs) { GDateTime *time; - const gchar *format; - gchar *date_str; + const char *format; + char *date_str; time = g_date_time_new_from_unix_local (secs); @@ -4252,7 +4252,7 @@ my_g_format_time_for_display (GtkFileChooserWidget *impl, static void copy_attribute (GFileInfo *to, GFileInfo *from, - const gchar *attribute) + const char *attribute) { GFileAttributeType type; gpointer value; @@ -4547,7 +4547,7 @@ file_system_model_set (GtkFileSystemModel *model, { GFile *home_location; GFile *dir_location; - gchar *location; + char *location; home_location = g_file_new_for_path (g_get_home_dir ()); if (file) @@ -4575,7 +4575,7 @@ file_system_model_set (GtkFileSystemModel *model, location = g_strdup (_("Home")); else if (g_file_has_prefix (dir_location, home_location)) { - gchar *relative_path; + char *relative_path; relative_path = g_file_get_relative_path (home_location, dir_location); location = g_filename_display_name (relative_path); @@ -4653,10 +4653,10 @@ struct update_chooser_entry_selected_foreach_closure { }; static int -compare_utf8_filenames (const gchar *a, - const gchar *b) +compare_utf8_filenames (const char *a, + const char *b) { - gchar *a_folded, *b_folded; + char *a_folded, *b_folded; int retval; a_folded = g_utf8_strdown (a, -1); @@ -4802,7 +4802,7 @@ update_chooser_entry (GtkFileChooserWidget *impl) */ if (entry_text[len - 1] == G_DIR_SEPARATOR) { - gchar *tmp; + char *tmp; tmp = g_strndup (entry_text, len - 1); clear_entry = (compare_utf8_filenames (impl->browse_files_last_selected_name, tmp) == 0); @@ -5085,7 +5085,7 @@ gtk_file_chooser_widget_get_current_folder (GtkFileChooser *chooser) static void gtk_file_chooser_widget_set_current_name (GtkFileChooser *chooser, - const gchar *name) + const char *name) { GtkFileChooserWidget *impl = GTK_FILE_CHOOSER_WIDGET (chooser); @@ -5095,7 +5095,7 @@ gtk_file_chooser_widget_set_current_name (GtkFileChooser *chooser, gtk_editable_set_text (GTK_EDITABLE (impl->location_entry), name); } -static gchar * +static char * gtk_file_chooser_widget_get_current_name (GtkFileChooser *chooser) { GtkFileChooserWidget *impl = GTK_FILE_CHOOSER_WIDGET (chooser); @@ -5669,7 +5669,7 @@ get_selected_file_info_from_file_list (GtkFileChooserWidget *impl, /* Gets the display name of the selected file in the file list; assumes single * selection mode and that something is selected. */ -static const gchar * +static const char * get_display_name_from_file_list (GtkFileChooserWidget *impl) { GFileInfo *info; @@ -5684,7 +5684,7 @@ get_display_name_from_file_list (GtkFileChooserWidget *impl) static void add_custom_button_to_dialog (GtkDialog *dialog, - const gchar *mnemonic_label, + const char *mnemonic_label, int response_id) { GtkWidget *button; @@ -5726,8 +5726,8 @@ on_confirm_overwrite_response (GtkWidget *dialog, /* Presents an overwrite confirmation dialog */ static void confirm_dialog_should_accept_filename (GtkFileChooserWidget *impl, - const gchar *file_part, - const gchar *folder_display_name) + const char *file_part, + const char *folder_display_name) { GtkWindow *toplevel; GtkWidget *dialog; @@ -5762,7 +5762,7 @@ confirm_dialog_should_accept_filename (GtkFileChooserWidget *impl, struct GetDisplayNameData { GtkFileChooserWidget *impl; - gchar *file_part; + char *file_part; }; static void @@ -5798,7 +5798,7 @@ out: */ static gboolean should_respond_after_confirm_overwrite (GtkFileChooserWidget *impl, - const gchar *file_part, + const char *file_part, GFile *parent_file) { struct GetDisplayNameData *data; @@ -6503,7 +6503,7 @@ search_engine_finished_cb (GtkSearchEngine *engine, static void search_engine_error_cb (GtkSearchEngine *engine, - const gchar *message, + const char *message, gpointer data) { GtkFileChooserWidget *impl = GTK_FILE_CHOOSER_WIDGET (data); @@ -6598,7 +6598,7 @@ show_spinner (gpointer data) /* Creates a new query with the specified text and launches it */ static void search_start_query (GtkFileChooserWidget *impl, - const gchar *query_text) + const char *query_text) { GFile *file; @@ -6696,7 +6696,7 @@ search_setup_widgets (GtkFileChooserWidget *impl) /* if there already is a query, restart it */ if (impl->search_query) { - const gchar *query; + const char *query; query = gtk_query_get_text (impl->search_query); if (query) @@ -7056,7 +7056,7 @@ update_cell_renderer_attributes (GtkFileChooserWidget *impl) static void location_set_user_text (GtkFileChooserWidget *impl, - const gchar *path) + const char *path) { gtk_editable_set_text (GTK_EDITABLE (impl->location_entry), path); gtk_editable_set_position (GTK_EDITABLE (impl->location_entry), -1); @@ -7064,7 +7064,7 @@ location_set_user_text (GtkFileChooserWidget *impl, static void location_popup_handler (GtkFileChooserWidget *impl, - const gchar *path) + const char *path) { if (impl->operation_mode != OPERATION_MODE_BROWSE) { @@ -7189,7 +7189,7 @@ static void add_normal_and_shifted_binding (GtkWidgetClass *widget_class, guint keyval, GdkModifierType modifiers, - const gchar *signal_name) + const char *signal_name) { gtk_widget_class_add_binding_signal (widget_class, keyval, modifiers, diff --git a/gtk/gtkfilefilter.c b/gtk/gtkfilefilter.c index cf6121eaca..9cd3bde6ad 100644 --- a/gtk/gtkfilefilter.c +++ b/gtk/gtkfilefilter.c @@ -666,7 +666,7 @@ NSArray * _gtk_file_filter_get_as_pattern_nsstrings (GtkFileFilter *filter) { pattern = g_string_erase (pattern, 0, 1); } - gchar *pattern_c = g_string_free (pattern, FALSE); + char *pattern_c = g_string_free (pattern, FALSE); NSString *pattern_nsstring = [NSString stringWithUTF8String:pattern_c]; g_free (pattern_c); [pattern_nsstring retain]; @@ -682,7 +682,7 @@ NSArray * _gtk_file_filter_get_as_pattern_nsstrings (GtkFileFilter *filter) for (l = formats; l; l = l->next) { int i; - gchar **extensions; + char **extensions; extensions = gdk_pixbuf_format_get_extensions (l->data); diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c index 51121fcba3..51799ceac4 100644 --- a/gtk/gtkfilesystemmodel.c +++ b/gtk/gtkfilesystemmodel.c @@ -238,7 +238,7 @@ static void remove_file (GtkFileSystemModel *model, #define get_node(_model, _index) ((FileModelNode *) ((_model)->files->data + (_index) * (_model)->node_size)) /* Get an index within the model->files array of nodes, given a FileModelNode* */ -#define node_index(_model, _node) (((gchar *) (_node) - (_model)->files->data) / (_model)->node_size) +#define node_index(_model, _node) (((char *) (_node) - (_model)->files->data) / (_model)->node_size) /* @up_to_index: smallest model->files array index that will be valid after this call * @up_to_row: smallest node->row that will be valid after this call @@ -1301,7 +1301,7 @@ gtk_file_system_model_set_n_columns (GtkFileSystemModel *model, static void gtk_file_system_model_set_directory (GtkFileSystemModel *model, GFile * dir, - const gchar * attributes) + const char * attributes) { g_assert (G_IS_FILE (dir)); @@ -1387,7 +1387,7 @@ _gtk_file_system_model_new (GtkFileSystemModelGetValue get_func, **/ GtkFileSystemModel * _gtk_file_system_model_new_for_directory (GFile * dir, - const gchar * attributes, + const char * attributes, GtkFileSystemModelGetValue get_func, gpointer get_data, guint n_columns, diff --git a/gtk/gtkfilesystemmodel.h b/gtk/gtkfilesystemmodel.h index 4a8bff468e..d33d30035d 100644 --- a/gtk/gtkfilesystemmodel.h +++ b/gtk/gtkfilesystemmodel.h @@ -45,7 +45,7 @@ GtkFileSystemModel *_gtk_file_system_model_new (GtkFileSystemModelG guint n_columns, ...); GtkFileSystemModel *_gtk_file_system_model_new_for_directory(GFile * dir, - const gchar * attributes, + const char * attributes, GtkFileSystemModelGetValue get_func, gpointer get_data, guint n_columns, diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c index 68973717e8..120a4a357e 100644 --- a/gtk/gtkfixed.c +++ b/gtk/gtkfixed.c @@ -174,7 +174,7 @@ static void gtk_fixed_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) gtk_fixed_put (GTK_FIXED (buildable), GTK_WIDGET (child), 0, 0); diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c index 9a2315372a..75df8e2a0f 100644 --- a/gtk/gtkflowbox.c +++ b/gtk/gtkflowbox.c @@ -308,7 +308,7 @@ static void gtk_flow_box_child_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) gtk_flow_box_child_set_child (GTK_FLOW_BOX_CHILD (buildable), GTK_WIDGET (child)); @@ -3991,7 +3991,7 @@ static void gtk_flow_box_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) gtk_flow_box_insert (GTK_FLOW_BOX (buildable), GTK_WIDGET (child), -1); diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c index 11ee713591..f7002bef7c 100644 --- a/gtk/gtkfontbutton.c +++ b/gtk/gtkfontbutton.c @@ -68,8 +68,8 @@ struct _GtkFontButton { GtkWidget parent_instance; - gchar *title; - gchar *fontname; + char *title; + char *fontname; guint use_font : 1; guint use_size : 1; @@ -89,7 +89,7 @@ struct _GtkFontButton int font_size; char *font_features; PangoLanguage *language; - gchar *preview_text; + char *preview_text; GtkFontFilterFunc font_filter; gpointer font_filter_data; GDestroyNotify font_filter_data_destroy; @@ -219,7 +219,7 @@ gtk_font_button_update_font_data (GtkFontButton *font_button) PangoFontFamily **families; PangoFontFace **faces; int n_families, n_faces, i; - const gchar *family; + const char *family; g_assert (font_button->font_desc != NULL); @@ -237,7 +237,7 @@ gtk_font_button_update_font_data (GtkFontButton *font_button) faces = NULL; for (i = 0; i < n_families; i++) { - const gchar *name = pango_font_family_get_name (families[i]); + const char *name = pango_font_family_get_name (families[i]); if (!g_ascii_strcasecmp (name, family)) { @@ -267,7 +267,7 @@ gtk_font_button_update_font_data (GtkFontButton *font_button) g_free (faces); } -static gchar * +static char * gtk_font_button_get_preview_text (GtkFontButton *font_button) { if (font_button->font_dialog) @@ -278,7 +278,7 @@ gtk_font_button_get_preview_text (GtkFontButton *font_button) static void gtk_font_button_set_preview_text (GtkFontButton *font_button, - const gchar *preview_text) + const char *preview_text) { if (font_button->font_dialog) { @@ -721,7 +721,7 @@ gtk_font_button_new (void) * Returns: a new font picker widget. */ GtkWidget * -gtk_font_button_new_with_font (const gchar *fontname) +gtk_font_button_new_with_font (const char *fontname) { return g_object_new (GTK_TYPE_FONT_BUTTON, "font", fontname, NULL); } @@ -735,9 +735,9 @@ gtk_font_button_new_with_font (const gchar *fontname) */ void gtk_font_button_set_title (GtkFontButton *font_button, - const gchar *title) + const char *title) { - gchar *old_title; + char *old_title; g_return_if_fail (GTK_IS_FONT_BUTTON (font_button)); old_title = font_button->title; @@ -758,7 +758,7 @@ gtk_font_button_set_title (GtkFontButton *font_button, * * Returns: an internal copy of the title string which must not be freed. */ -const gchar* +const char * gtk_font_button_get_title (GtkFontButton *font_button) { g_return_val_if_fail (GTK_IS_FONT_BUTTON (font_button), NULL); @@ -888,7 +888,7 @@ gtk_font_button_set_use_size (GtkFontButton *font_button, } } -static const gchar * +static const char * gtk_font_button_get_font_name (GtkFontButton *font_button) { g_return_val_if_fail (GTK_IS_FONT_BUTTON (font_button), NULL); @@ -898,7 +898,7 @@ gtk_font_button_get_font_name (GtkFontButton *font_button) static void gtk_font_button_set_font_name (GtkFontButton *font_button, - const gchar *fontname) + const char *fontname) { PangoFontDescription *font_desc; @@ -1095,7 +1095,7 @@ skip: } } -static gchar * +static char * pango_font_description_to_css (PangoFontDescription *desc, const char *features, const char *language) @@ -1257,7 +1257,7 @@ gtk_font_button_label_use_font (GtkFontButton *font_button) else { PangoFontDescription *desc; - gchar *data; + char *data; if (!font_button->provider) { @@ -1285,9 +1285,9 @@ gtk_font_button_label_use_font (GtkFontButton *font_button) static void gtk_font_button_update_font_info (GtkFontButton *font_button) { - const gchar *fam_name; - const gchar *face_name; - gchar *family_style; + const char *fam_name; + const char *face_name; + char *family_style; if (font_button->font_family) fam_name = pango_font_family_get_name (font_button->font_family); @@ -1309,7 +1309,7 @@ gtk_font_button_update_font_info (GtkFontButton *font_button) if ((font_button->level & GTK_FONT_CHOOSER_LEVEL_SIZE) != 0) { /* mirror Pango, which doesn't translate this either */ - gchar *size = g_strdup_printf ("%2.4g%s", + char *size = g_strdup_printf ("%2.4g%s", pango_font_description_get_size (font_button->font_desc) / (double)PANGO_SCALE, pango_font_description_get_size_is_absolute (font_button->font_desc) ? "px" : ""); diff --git a/gtk/gtkfontbutton.h b/gtk/gtkfontbutton.h index 8cb7bf008d..3079981dee 100644 --- a/gtk/gtkfontbutton.h +++ b/gtk/gtkfontbutton.h @@ -46,13 +46,13 @@ GType gtk_font_button_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkWidget *gtk_font_button_new (void); GDK_AVAILABLE_IN_ALL -GtkWidget *gtk_font_button_new_with_font (const gchar *fontname); +GtkWidget *gtk_font_button_new_with_font (const char *fontname); GDK_AVAILABLE_IN_ALL -const gchar * gtk_font_button_get_title (GtkFontButton *font_button); +const char * gtk_font_button_get_title (GtkFontButton *font_button); GDK_AVAILABLE_IN_ALL void gtk_font_button_set_title (GtkFontButton *font_button, - const gchar *title); + const char *title); GDK_AVAILABLE_IN_ALL gboolean gtk_font_button_get_modal (GtkFontButton *font_button); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkfontchooser.c b/gtk/gtkfontchooser.c index 7fdf041395..4cf14236d8 100644 --- a/gtk/gtkfontchooser.c +++ b/gtk/gtkfontchooser.c @@ -249,10 +249,10 @@ gtk_font_chooser_get_font_size (GtkFontChooser *fontchooser) * of the current font, or %NULL if no font is selected. You must * free this string with g_free(). */ -gchar * +char * gtk_font_chooser_get_font (GtkFontChooser *fontchooser) { - gchar *fontname; + char *fontname; g_return_val_if_fail (GTK_IS_FONT_CHOOSER (fontchooser), NULL); @@ -271,7 +271,7 @@ gtk_font_chooser_get_font (GtkFontChooser *fontchooser) */ void gtk_font_chooser_set_font (GtkFontChooser *fontchooser, - const gchar *fontname) + const char *fontname) { g_return_if_fail (GTK_IS_FONT_CHOOSER (fontchooser)); g_return_if_fail (fontname != NULL); @@ -335,7 +335,7 @@ gtk_font_chooser_set_font_desc (GtkFontChooser *fontchooser, * Returns: (transfer full): the text displayed in the * preview area */ -gchar * +char * gtk_font_chooser_get_preview_text (GtkFontChooser *fontchooser) { char *text; @@ -357,7 +357,7 @@ gtk_font_chooser_get_preview_text (GtkFontChooser *fontchooser) */ void gtk_font_chooser_set_preview_text (GtkFontChooser *fontchooser, - const gchar *text) + const char *text) { g_return_if_fail (GTK_IS_FONT_CHOOSER (fontchooser)); g_return_if_fail (text != NULL); @@ -429,7 +429,7 @@ gtk_font_chooser_set_filter_func (GtkFontChooser *fontchooser, void _gtk_font_chooser_font_activated (GtkFontChooser *chooser, - const gchar *fontname) + const char *fontname) { g_return_if_fail (GTK_IS_FONT_CHOOSER (chooser)); diff --git a/gtk/gtkfontchooser.h b/gtk/gtkfontchooser.h index 96c9825927..323c3e9f96 100644 --- a/gtk/gtkfontchooser.h +++ b/gtk/gtkfontchooser.h @@ -90,7 +90,7 @@ struct _GtkFontChooserIface /* Signals */ void (* font_activated) (GtkFontChooser *chooser, - const gchar *fontname); + const char *fontname); /* More methods */ void (* set_font_map) (GtkFontChooser *fontchooser, @@ -119,16 +119,16 @@ void gtk_font_chooser_set_font_desc (GtkFontChooser const PangoFontDescription *font_desc); GDK_AVAILABLE_IN_ALL -gchar* gtk_font_chooser_get_font (GtkFontChooser *fontchooser); +char * gtk_font_chooser_get_font (GtkFontChooser *fontchooser); GDK_AVAILABLE_IN_ALL void gtk_font_chooser_set_font (GtkFontChooser *fontchooser, - const gchar *fontname); + const char *fontname); GDK_AVAILABLE_IN_ALL -gchar* gtk_font_chooser_get_preview_text (GtkFontChooser *fontchooser); +char * gtk_font_chooser_get_preview_text (GtkFontChooser *fontchooser); GDK_AVAILABLE_IN_ALL void gtk_font_chooser_set_preview_text (GtkFontChooser *fontchooser, - const gchar *text); + const char *text); GDK_AVAILABLE_IN_ALL gboolean gtk_font_chooser_get_show_preview_entry (GtkFontChooser *fontchooser); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkfontchooserdialog.c b/gtk/gtkfontchooserdialog.c index 9083806f89..b31fd4059e 100644 --- a/gtk/gtkfontchooserdialog.c +++ b/gtk/gtkfontchooserdialog.c @@ -77,7 +77,7 @@ struct _GtkFontChooserDialogClass static void gtk_font_chooser_dialog_buildable_interface_init (GtkBuildableIface *iface); static GObject *gtk_font_chooser_dialog_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *childname); + const char *childname); G_DEFINE_TYPE_WITH_CODE (GtkFontChooserDialog, gtk_font_chooser_dialog, GTK_TYPE_DIALOG, G_IMPLEMENT_INTERFACE (GTK_TYPE_FONT_CHOOSER, @@ -121,7 +121,7 @@ gtk_font_chooser_dialog_get_property (GObject *object, static void font_activated_cb (GtkFontChooser *fontchooser, - const gchar *fontname, + const char *fontname, gpointer user_data) { GtkDialog *dialog = user_data; @@ -287,7 +287,7 @@ gtk_font_chooser_dialog_init (GtkFontChooserDialog *dialog) * Returns: a new #GtkFontChooserDialog */ GtkWidget* -gtk_font_chooser_dialog_new (const gchar *title, +gtk_font_chooser_dialog_new (const char *title, GtkWindow *parent) { GtkFontChooserDialog *dialog; @@ -310,7 +310,7 @@ gtk_font_chooser_dialog_buildable_interface_init (GtkBuildableIface *iface) static GObject * gtk_font_chooser_dialog_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *childname) + const char *childname) { GtkFontChooserDialog *dialog = GTK_FONT_CHOOSER_DIALOG (buildable); diff --git a/gtk/gtkfontchooserdialog.h b/gtk/gtkfontchooserdialog.h index 4452dbd068..e63a3135a3 100644 --- a/gtk/gtkfontchooserdialog.h +++ b/gtk/gtkfontchooserdialog.h @@ -35,7 +35,7 @@ typedef struct _GtkFontChooserDialog GtkFontChooserDialog; GDK_AVAILABLE_IN_ALL GType gtk_font_chooser_dialog_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_font_chooser_dialog_new (const gchar *title, +GtkWidget* gtk_font_chooser_dialog_new (const char *title, GtkWindow *parent); G_END_DECLS diff --git a/gtk/gtkfontchooserprivate.h b/gtk/gtkfontchooserprivate.h index 82a1f7e67e..480351ead2 100644 --- a/gtk/gtkfontchooserprivate.h +++ b/gtk/gtkfontchooserprivate.h @@ -28,7 +28,7 @@ G_BEGIN_DECLS void _gtk_font_chooser_font_activated (GtkFontChooser *chooser, - const gchar *fontname); + const char *fontname); G_END_DECLS diff --git a/gtk/gtkfontchooserutils.c b/gtk/gtkfontchooserutils.c index 84079d276d..2d484a2b06 100644 --- a/gtk/gtkfontchooserutils.c +++ b/gtk/gtkfontchooserutils.c @@ -91,7 +91,7 @@ delegate_notify (GObject *object, static void delegate_font_activated (GtkFontChooser *receiver, - const gchar *fontname, + const char *fontname, GtkFontChooser *delegate) { _gtk_font_chooser_font_activated (delegate, fontname); diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index 69f0771660..f255849f77 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -107,7 +107,7 @@ struct _GtkFontChooserWidget GtkWidget *preview; GtkWidget *preview2; GtkWidget *font_name_label; - gchar *preview_text; + char *preview_text; gboolean show_preview_entry; GtkWidget *size_label; @@ -160,9 +160,9 @@ static void gtk_font_chooser_widget_get_property (GObject *objec GParamSpec *pspec); static void gtk_font_chooser_widget_finalize (GObject *object); -static gchar *gtk_font_chooser_widget_get_font (GtkFontChooserWidget *fontchooser); +static char *gtk_font_chooser_widget_get_font (GtkFontChooserWidget *fontchooser); static void gtk_font_chooser_widget_set_font (GtkFontChooserWidget *fontchooser, - const gchar *fontname); + const char *fontname); static PangoFontDescription *gtk_font_chooser_widget_get_font_desc (GtkFontChooserWidget *fontchooser); static void gtk_font_chooser_widget_merge_font_desc(GtkFontChooserWidget *fontchooser, @@ -171,9 +171,9 @@ static void gtk_font_chooser_widget_take_font_desc (GtkFontChoo PangoFontDescription *font_desc); -static const gchar *gtk_font_chooser_widget_get_preview_text (GtkFontChooserWidget *fontchooser); +static const char *gtk_font_chooser_widget_get_preview_text (GtkFontChooserWidget *fontchooser); static void gtk_font_chooser_widget_set_preview_text (GtkFontChooserWidget *fontchooser, - const gchar *text); + const char *text); static gboolean gtk_font_chooser_widget_get_show_preview_entry (GtkFontChooserWidget *fontchooser); static void gtk_font_chooser_widget_set_show_preview_entry (GtkFontChooserWidget *fontchooser, @@ -309,7 +309,7 @@ output_cb (GtkSpinButton *spin, gpointer data) { GtkAdjustment *adjustment; - gchar *text; + char *text; gdouble value; adjustment = gtk_spin_button_get_adjustment (spin); @@ -412,7 +412,7 @@ row_activated_cb (GtkWidget *view, gpointer user_data) { GtkFontChooserWidget *fontchooser = user_data; - gchar *fontname; + char *fontname; fontname = gtk_font_chooser_widget_get_font (fontchooser); _gtk_font_chooser_font_activated (GTK_FONT_CHOOSER (fontchooser), fontname); @@ -967,7 +967,7 @@ gtk_font_chooser_widget_get_size (GtkFontChooser *chooser) return -1; } -static gchar * +static char * gtk_font_chooser_widget_get_font (GtkFontChooserWidget *fontchooser) { PangoFontDescription *desc = gtk_font_chooser_widget_get_font_desc (fontchooser); @@ -989,7 +989,7 @@ gtk_font_chooser_widget_get_font_desc (GtkFontChooserWidget *self) static void gtk_font_chooser_widget_set_font (GtkFontChooserWidget *fontchooser, - const gchar *fontname) + const char *fontname) { PangoFontDescription *font_desc; @@ -1871,7 +1871,7 @@ gtk_font_chooser_widget_take_font_desc (GtkFontChooserWidget *fontchooser, pango_font_description_free (font_desc); } -static const gchar* +static const char * gtk_font_chooser_widget_get_preview_text (GtkFontChooserWidget *fontchooser) { @@ -1880,7 +1880,7 @@ gtk_font_chooser_widget_get_preview_text (GtkFontChooserWidget *fontchooser) static void gtk_font_chooser_widget_set_preview_text (GtkFontChooserWidget *fontchooser, - const gchar *text) + const char *text) { g_free (fontchooser->preview_text); fontchooser->preview_text = g_strdup (text); diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index 89ee7d55c6..5b5246b522 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -125,7 +125,7 @@ static void gtk_frame_buildable_init (GtkBuildableIface *iface); static void gtk_frame_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type); + const char *type); static void gtk_frame_measure (GtkWidget *widget, GtkOrientation orientation, int for_size, @@ -212,7 +212,7 @@ static void gtk_frame_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (type && strcmp (type, "label") == 0) gtk_frame_set_label_widget (GTK_FRAME (buildable), GTK_WIDGET (child)); @@ -313,7 +313,7 @@ gtk_frame_get_property (GObject *object, * Returns: a new #GtkFrame widget **/ GtkWidget* -gtk_frame_new (const gchar *label) +gtk_frame_new (const char *label) { return g_object_new (GTK_TYPE_FRAME, "label", label, NULL); } @@ -328,7 +328,7 @@ gtk_frame_new (const gchar *label) **/ void gtk_frame_set_label (GtkFrame *frame, - const gchar *label) + const char *label) { g_return_if_fail (GTK_IS_FRAME (frame)); @@ -352,7 +352,7 @@ gtk_frame_set_label (GtkFrame *frame, * a #GtkLabel. This string is owned by GTK+ and * must not be modified or freed. **/ -const gchar * +const char * gtk_frame_get_label (GtkFrame *frame) { GtkFramePrivate *priv = gtk_frame_get_instance_private (frame); diff --git a/gtk/gtkframe.h b/gtk/gtkframe.h index a6a2f91ec4..08523a2d33 100644 --- a/gtk/gtkframe.h +++ b/gtk/gtkframe.h @@ -74,13 +74,13 @@ struct _GtkFrameClass GDK_AVAILABLE_IN_ALL GType gtk_frame_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_frame_new (const gchar *label); +GtkWidget* gtk_frame_new (const char *label); GDK_AVAILABLE_IN_ALL void gtk_frame_set_label (GtkFrame *frame, - const gchar *label); + const char *label); GDK_AVAILABLE_IN_ALL -const gchar * gtk_frame_get_label (GtkFrame *frame); +const char * gtk_frame_get_label (GtkFrame *frame); GDK_AVAILABLE_IN_ALL void gtk_frame_set_label_widget (GtkFrame *frame, diff --git a/gtk/gtkgladecatalog.c b/gtk/gtkgladecatalog.c index c104562b33..a44a120767 100644 --- a/gtk/gtkgladecatalog.c +++ b/gtk/gtkgladecatalog.c @@ -34,14 +34,14 @@ #endif _GDK_EXTERN -void gtk_glade_catalog_init (const gchar *catalog_name); +void gtk_glade_catalog_init (const char *catalog_name); /* This function is referred to in gtk/glade/gtk-private-widgets.xml * and is used to ensure the private types for use in Glade while * editing UI files that define GTK’s various composite widget classes. */ void -gtk_glade_catalog_init (const gchar *catalog_name) +gtk_glade_catalog_init (const char *catalog_name) { g_type_ensure (GTK_TYPE_PATH_BAR); g_type_ensure (GTK_TYPE_PLACES_VIEW); diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c index a9cda6bfb5..d1a951ab15 100644 --- a/gtk/gtkgrid.c +++ b/gtk/gtkgrid.c @@ -405,7 +405,7 @@ static void gtk_grid_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) { diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c index fa00f9a00b..6ea8031658 100644 --- a/gtk/gtkheaderbar.c +++ b/gtk/gtkheaderbar.c @@ -132,7 +132,7 @@ struct _GtkHeaderBarPrivate GtkWidget *title_widget; gboolean show_title_buttons; - gchar *decoration_layout; + char *decoration_layout; gboolean track_default_decoration; GtkWidget *start_window_controls; @@ -245,7 +245,7 @@ update_title (GtkHeaderBar *bar) { GtkHeaderBarPrivate *priv = gtk_header_bar_get_instance_private (bar); GtkRoot *root; - const gchar *title = NULL; + const char *title = NULL; if (!priv->title_label) return; @@ -656,7 +656,7 @@ static void gtk_header_bar_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (g_strcmp0 (type, "title") == 0) gtk_header_bar_set_title_widget (GTK_HEADER_BAR (buildable), GTK_WIDGET (child)); @@ -803,7 +803,7 @@ gtk_header_bar_set_show_title_buttons (GtkHeaderBar *bar, */ void gtk_header_bar_set_decoration_layout (GtkHeaderBar *bar, - const gchar *layout) + const char *layout) { GtkHeaderBarPrivate *priv; @@ -826,7 +826,7 @@ gtk_header_bar_set_decoration_layout (GtkHeaderBar *bar, * * Returns: the decoration layout */ -const gchar * +const char * gtk_header_bar_get_decoration_layout (GtkHeaderBar *bar) { GtkHeaderBarPrivate *priv; diff --git a/gtk/gtkheaderbar.h b/gtk/gtkheaderbar.h index d993b6304c..a5c85dc48d 100644 --- a/gtk/gtkheaderbar.h +++ b/gtk/gtkheaderbar.h @@ -63,9 +63,9 @@ void gtk_header_bar_set_show_title_buttons (GtkHeaderBar *bar, GDK_AVAILABLE_IN_ALL void gtk_header_bar_set_decoration_layout (GtkHeaderBar *bar, - const gchar *layout); + const char *layout); GDK_AVAILABLE_IN_ALL -const gchar *gtk_header_bar_get_decoration_layout (GtkHeaderBar *bar); +const char *gtk_header_bar_get_decoration_layout (GtkHeaderBar *bar); G_END_DECLS diff --git a/gtk/gtkiconcache.c b/gtk/gtkiconcache.c index 60bd57b9bc..61c1b7bb0f 100644 --- a/gtk/gtkiconcache.c +++ b/gtk/gtkiconcache.c @@ -47,7 +47,7 @@ struct _GtkIconCache { int ref_count; GMappedFile *map; - gchar *buffer; + char *buffer; guint32 last_chain_offset; }; @@ -75,12 +75,12 @@ gtk_icon_cache_unref (GtkIconCache *cache) } GtkIconCache * -gtk_icon_cache_new_for_path (const gchar *path) +gtk_icon_cache_new_for_path (const char *path) { GtkIconCache *cache = NULL; GMappedFile *map; - gchar *cache_filename; + char *cache_filename; GStatBuf st; GStatBuf path_st; @@ -141,21 +141,21 @@ gtk_icon_cache_new_for_path (const gchar *path) } GtkIconCache * -gtk_icon_cache_new (const gchar *data) +gtk_icon_cache_new (const char *data) { GtkIconCache *cache; cache = g_new0 (GtkIconCache, 1); cache->ref_count = 1; cache->map = NULL; - cache->buffer = (gchar *)data; + cache->buffer = (char *)data; return cache; } static int get_directory_index (GtkIconCache *cache, - const gchar *directory) + const char *directory) { guint32 dir_list_offset; int n_dirs; @@ -168,7 +168,7 @@ get_directory_index (GtkIconCache *cache, for (i = 0; i < n_dirs; i++) { guint32 name_offset = GET_UINT32 (cache->buffer, dir_list_offset + 4 + 4 * i); - gchar *name = cache->buffer + name_offset; + char *name = cache->buffer + name_offset; if (strcmp (name, directory) == 0) return i; } @@ -178,7 +178,7 @@ get_directory_index (GtkIconCache *cache, GHashTable * gtk_icon_cache_list_icons_in_directory (GtkIconCache *cache, - const gchar *directory, + const char *directory, GtkStringSet *set) { int directory_index; diff --git a/gtk/gtkiconcacheprivate.h b/gtk/gtkiconcacheprivate.h index dcb03e9b0d..d27d94f04c 100644 --- a/gtk/gtkiconcacheprivate.h +++ b/gtk/gtkiconcacheprivate.h @@ -38,10 +38,10 @@ typedef enum typedef struct _GtkIconCache GtkIconCache; -GtkIconCache *gtk_icon_cache_new (const gchar *data); -GtkIconCache *gtk_icon_cache_new_for_path (const gchar *path); +GtkIconCache *gtk_icon_cache_new (const char *data); +GtkIconCache *gtk_icon_cache_new_for_path (const char *path); GHashTable *gtk_icon_cache_list_icons_in_directory (GtkIconCache *cache, - const gchar *directory, + const char *directory, GtkStringSet *set); GtkIconCache *gtk_icon_cache_ref (GtkIconCache *cache); void gtk_icon_cache_unref (GtkIconCache *cache); diff --git a/gtk/gtkiconcachevalidatorprivate.h b/gtk/gtkiconcachevalidatorprivate.h index c074b11391..a255426bd3 100644 --- a/gtk/gtkiconcachevalidatorprivate.h +++ b/gtk/gtkiconcachevalidatorprivate.h @@ -28,7 +28,7 @@ enum { }; typedef struct { - const gchar *cache; + const char *cache; gsize cache_size; guint32 n_directories; int flags; diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c index 597a1f0a25..e66b1a8f96 100644 --- a/gtk/gtkiconhelper.c +++ b/gtk/gtkiconhelper.c @@ -478,7 +478,7 @@ _gtk_icon_helper_set_gicon (GtkIconHelper *self, void _gtk_icon_helper_set_icon_name (GtkIconHelper *self, - const gchar *icon_name) + const char *icon_name) { gtk_icon_helper_take_definition (self, gtk_image_definition_new_icon_name (icon_name)); } @@ -552,7 +552,7 @@ _gtk_icon_helper_peek_paintable (GtkIconHelper *self) return gtk_image_definition_get_paintable (self->def); } -const gchar * +const char * _gtk_icon_helper_get_icon_name (GtkIconHelper *self) { return gtk_image_definition_get_icon_name (self->def); diff --git a/gtk/gtkiconhelperprivate.h b/gtk/gtkiconhelperprivate.h index eea4351337..80b2e4acce 100644 --- a/gtk/gtkiconhelperprivate.h +++ b/gtk/gtkiconhelperprivate.h @@ -45,7 +45,7 @@ void _gtk_icon_helper_set_gicon (GtkIconHelper *self, GIcon *gicon); void _gtk_icon_helper_set_icon_name (GtkIconHelper *self, - const gchar *icon_name); + const char *icon_name); void _gtk_icon_helper_set_paintable (GtkIconHelper *self, GdkPaintable *paintable); @@ -62,7 +62,7 @@ GIcon *_gtk_icon_helper_peek_gicon (GtkIconHelper *self); GdkPaintable *_gtk_icon_helper_peek_paintable (GtkIconHelper *self); GtkImageDefinition *gtk_icon_helper_get_definition (GtkIconHelper *self); -const gchar *_gtk_icon_helper_get_icon_name (GtkIconHelper *self); +const char *_gtk_icon_helper_get_icon_name (GtkIconHelper *self); int gtk_icon_helper_get_size (GtkIconHelper *self); diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 39d193785f..2ce6dbe76f 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -348,7 +348,7 @@ struct _GtkIconThemeClass }; typedef struct { - gchar **icon_names; + char **icon_names; int size; int scale; GtkIconLookupFlags flags; @@ -378,8 +378,8 @@ struct _GtkIconPaintable IconKey key; GtkIconTheme *in_cache; /* Protected by icon_cache lock */ - gchar *icon_name; - gchar *filename; + char *icon_name; + char *filename; GLoadableIcon *loadable; #ifdef G_OS_WIN32 @@ -408,9 +408,9 @@ struct _GtkIconPaintable typedef struct { - gchar *name; - gchar *display_name; - gchar *comment; + char *name; + char *display_name; + char *comment; GArray *dir_sizes; /* IconThemeDirSize */ GArray *dirs; /* IconThemeDir */ @@ -445,14 +445,14 @@ typedef struct typedef struct { - gchar *svg_filename; - gchar *no_svg_filename; + char *svg_filename; + char *no_svg_filename; gboolean is_resource; } UnthemedIcon; typedef struct { - gchar *dir; + char *dir; time_t mtime; GtkIconCache *cache; gboolean exists; @@ -466,23 +466,23 @@ static void theme_dir_size_destroy (IconThemeDirSize *dir static void theme_dir_destroy (IconThemeDir *dir); static void theme_destroy (IconTheme *theme); static GtkIconPaintable *theme_lookup_icon (IconTheme *theme, - const gchar *icon_name, + const char *icon_name, int size, int scale, gboolean allow_svg); static gboolean theme_has_icon (IconTheme *theme, - const gchar *icon_name); + const char *icon_name); static void theme_subdir_load (GtkIconTheme *self, IconTheme *theme, GKeyFile *theme_file, - gchar *subdir); + char *subdir); static void do_theme_change (GtkIconTheme *self); static void blow_themes (GtkIconTheme *self); static gboolean rescan_themes (GtkIconTheme *self); static GtkIconPaintable *icon_paintable_new (const char *icon_name, int desired_size, int desired_scale); -static IconCacheFlag suffix_from_name (const gchar *name); +static IconCacheFlag suffix_from_name (const char *name); static void icon_ensure_texture__locked (GtkIconPaintable *icon, gboolean in_thread); static void gtk_icon_theme_unset_display (GtkIconTheme *self); @@ -1105,7 +1105,7 @@ update_current_theme__mainthread (GtkIconTheme *self) if (!self->custom_theme) { - gchar *theme = NULL; + char *theme = NULL; gboolean changed = FALSE; if (self->display) @@ -1225,8 +1225,8 @@ pixbuf_supports_svg (void) found_svg = FALSE; for (tmp_list = formats; tmp_list && !found_svg; tmp_list = tmp_list->next) { - gchar **mime_types = gdk_pixbuf_format_get_mime_types (tmp_list->data); - gchar **mime_type; + char **mime_types = gdk_pixbuf_format_get_mime_types (tmp_list->data); + char **mime_type; for (mime_type = mime_types; *mime_type && !found_svg; mime_type++) { @@ -1254,7 +1254,7 @@ free_dir_mtime (IconThemeDirMtime *dir_mtime) static void gtk_icon_theme_init (GtkIconTheme *self) { - const gchar * const *xdg_data_dirs; + const char * const *xdg_data_dirs; int i, j; int len; @@ -1708,7 +1708,7 @@ gtk_icon_theme_get_theme_name (GtkIconTheme *self) return theme_name; } -static const gchar builtin_hicolor_index[] = +static const char builtin_hicolor_index[] = "[Icon Theme]\n" "Name=Hicolor\n" "Hidden=True\n" @@ -1743,15 +1743,15 @@ static const gchar builtin_hicolor_index[] = static void insert_theme (GtkIconTheme *self, - const gchar *theme_name) + const char *theme_name) { int i; GList *l; - gchar **dirs; - gchar **scaled_dirs; - gchar **themes; + char **dirs; + char **scaled_dirs; + char **themes; IconTheme *theme = NULL; - gchar *path; + char *path; GKeyFile *theme_file; GError *error = NULL; GStatBuf stat_buf; @@ -1867,7 +1867,7 @@ free_unthemed_icon (UnthemedIcon *unthemed_icon) static void strip_suffix_inline (char *filename) { - gchar *dot; + char *dot; if (g_str_has_suffix (filename, ".symbolic.png")) filename[strlen(filename)-13] = 0; @@ -1878,10 +1878,10 @@ strip_suffix_inline (char *filename) *dot = 0; } -static gchar * -strip_suffix (const gchar *filename) +static char * +strip_suffix (const char *filename) { - const gchar *dot; + const char *dot; if (g_str_has_suffix (filename, ".symbolic.png")) return g_strndup (filename, strlen(filename)-13); @@ -1896,13 +1896,13 @@ strip_suffix (const gchar *filename) static void add_unthemed_icon (GtkIconTheme *self, - const gchar *dir, - const gchar *file, + const char *dir, + const char *file, gboolean is_resource) { IconCacheFlag new_suffix, old_suffix; - gchar *abs_file; - gchar *base_name; + char *abs_file; + char *base_name; UnthemedIcon *unthemed_icon; new_suffix = suffix_from_name (file); @@ -1964,8 +1964,8 @@ load_themes (GtkIconTheme *self) { GDir *gdir; int base; - gchar *dir; - const gchar *file; + char *dir; + const char *file; GTimeVal tv; GStatBuf stat_buf; int j; @@ -2013,7 +2013,7 @@ load_themes (GtkIconTheme *self) for (j = 0; self->resource_path[j]; j++) { - gchar **children; + char **children; int i; dir = self->resource_path[j]; @@ -2092,7 +2092,7 @@ ensure_valid_themes (GtkIconTheme *self, } static inline gboolean -icon_name_is_symbolic (const gchar *icon_name, +icon_name_is_symbolic (const char *icon_name, int icon_name_len) { @@ -2116,7 +2116,7 @@ icon_name_is_symbolic (const gchar *icon_name, } static inline gboolean -icon_uri_is_symbolic (const gchar *icon_name, +icon_uri_is_symbolic (const char *icon_name, int icon_name_len) { if (icon_name_len < 0) @@ -2141,7 +2141,7 @@ icon_uri_is_symbolic (const gchar *icon_name, static GtkIconPaintable * real_choose_icon (GtkIconTheme *self, - const gchar *icon_names[], + const char *icon_names[], int size, int scale, GtkIconLookupFlags flags, @@ -2150,7 +2150,7 @@ real_choose_icon (GtkIconTheme *self, GList *l; GtkIconPaintable *icon = NULL; UnthemedIcon *unthemed_icon = NULL; - const gchar *icon_name = NULL; + const char *icon_name = NULL; IconTheme *theme = NULL; int i; IconKey key; @@ -2158,7 +2158,7 @@ real_choose_icon (GtkIconTheme *self, if (!ensure_valid_themes (self, non_blocking)) return NULL; - key.icon_names = (gchar **)icon_names; + key.icon_names = (char **)icon_names; key.size = size; key.scale = scale; key.flags = flags; @@ -2239,7 +2239,7 @@ real_choose_icon (GtkIconTheme *self, #ifdef G_OS_WIN32 /* Still not found an icon, check if reference to a Win32 resource */ { - gchar **resources; + char **resources; HICON hIcon = NULL; resources = g_strsplit (icon_names[0], ",", 0); @@ -2285,8 +2285,8 @@ real_choose_icon (GtkIconTheme *self, static void icon_name_list_add_icon (GtkStrvBuilder *icons, - const gchar *dir_suffix, - gchar *icon_name) + const char *dir_suffix, + char *icon_name) { if (dir_suffix) gtk_strv_builder_append (icons, g_strconcat (icon_name, dir_suffix, NULL)); @@ -2295,7 +2295,7 @@ icon_name_list_add_icon (GtkStrvBuilder *icons, static GtkIconPaintable * choose_icon (GtkIconTheme *self, - const gchar *icon_names[], + const char *icon_names[], int size, int scale, GtkTextDirection direction, @@ -2305,7 +2305,7 @@ choose_icon (GtkIconTheme *self, gboolean has_regular = FALSE, has_symbolic = FALSE; GtkIconPaintable *icon; GtkStrvBuilder new_names; - const gchar *dir_suffix; + const char *dir_suffix; guint i; switch (direction) @@ -2490,7 +2490,7 @@ gtk_icon_theme_lookup_icon (GtkIconTheme *self, } else { - const gchar *names[2]; + const char *names[2]; names[0] = icon_name; names[1] = NULL; @@ -2577,7 +2577,7 @@ gtk_icon_theme_lookup_symbolic_colors (GtkCssStyle *style, */ gboolean gtk_icon_theme_has_icon (GtkIconTheme *self, - const gchar *icon_name) + const char *icon_name) { GList *l; gboolean res = FALSE; @@ -2633,7 +2633,7 @@ add_size (gpointer key, */ int * gtk_icon_theme_get_icon_sizes (GtkIconTheme *self, - const gchar *icon_name) + const char *icon_name) { GList *l; int i; @@ -2877,7 +2877,7 @@ theme_dir_size_difference (IconThemeDirSize *dir_size, } } -static const gchar * +static const char * string_from_suffix (IconCacheFlag suffix) { switch (suffix) @@ -2899,7 +2899,7 @@ string_from_suffix (IconCacheFlag suffix) } static inline IconCacheFlag -suffix_from_name (const gchar *name) +suffix_from_name (const char *name) { const gsize name_len = strlen (name); @@ -3007,7 +3007,7 @@ compare_dir_size_matches (IconThemeDirSize *dir_a, int difference_a, static GtkIconPaintable * theme_lookup_icon (IconTheme *theme, - const gchar *icon_name, /* interned */ + const char *icon_name, /* interned */ int size, int scale, gboolean allow_svg) @@ -3067,7 +3067,7 @@ theme_lookup_icon (IconTheme *theme, { GtkIconPaintable *icon; IconThemeDir *dir = &g_array_index (theme->dirs, IconThemeDir, min_file->dir_index); - gchar *filename; + char *filename; icon = icon_paintable_new (icon_name, size, scale); @@ -3086,7 +3086,7 @@ theme_lookup_icon (IconTheme *theme, static gboolean theme_has_icon (IconTheme *theme, - const gchar *icon_name) + const char *icon_name) { return gtk_string_set_lookup (&theme->icons, icon_name) != NULL; } @@ -3097,7 +3097,7 @@ scan_directory (GtkIconTheme *self, GtkStringSet *set) { GDir *gdir; - const gchar *name; + const char *name; GHashTable *icons = NULL; GTK_DISPLAY_NOTE (self->display, ICONTHEME, @@ -3293,9 +3293,9 @@ static void theme_subdir_load (GtkIconTheme *self, IconTheme *theme, GKeyFile *theme_file, - gchar *subdir) + char *subdir) { - gchar *type_string; + char *type_string; IconThemeDirType type; int size; int min_size; @@ -3356,7 +3356,7 @@ theme_subdir_load (GtkIconTheme *self, for (i = 0; i < self->dir_mtimes->len; i++) { IconThemeDirMtime *dir_mtime = &g_array_index (self->dir_mtimes, IconThemeDirMtime, i); - gchar *full_dir; + char *full_dir; if (!dir_mtime->exists) continue; /* directory doesn't exist */ @@ -3399,7 +3399,7 @@ theme_subdir_load (GtkIconTheme *self, for (r = 0; self->resource_path[r]; r++) { GHashTable *icons; - gchar *full_dir; + char *full_dir; /* Force a trailing / here, to avoid extra copies in GResource */ full_dir = g_build_filename (self->resource_path[r], subdir, " ", NULL); @@ -3656,7 +3656,7 @@ gtk_icon_paintable_get_file (GtkIconPaintable *icon) * Returns: (nullable) (type filename): the themed icon-name for the icon, or %NULL * if its not a themed icon. */ -const gchar * +const char * gtk_icon_paintable_get_icon_name (GtkIconPaintable *icon) { g_return_val_if_fail (icon != NULL, NULL); @@ -4029,7 +4029,7 @@ gtk_icon_paintable_new_for_file (GFile *file, if (icon->is_resource) { - gchar *uri; + char *uri; uri = g_file_get_uri (file); icon->filename = g_strdup (uri + 11); /* resource:// */ @@ -4121,9 +4121,9 @@ gtk_icon_theme_lookup_by_gicon (GtkIconTheme *self, } else if (G_IS_THEMED_ICON (gicon)) { - const gchar **names; + const char **names; - names = (const gchar **) g_themed_icon_get_names (G_THEMED_ICON (gicon)); + names = (const char **) g_themed_icon_get_names (G_THEMED_ICON (gicon)); icon = gtk_icon_theme_lookup_icon (self, names[0], &names[1], size, scale, direction, flags); } else diff --git a/gtk/gtkicontheme.h b/gtk/gtkicontheme.h index 3150230e00..a423e03571 100644 --- a/gtk/gtkicontheme.h +++ b/gtk/gtkicontheme.h @@ -112,10 +112,10 @@ char * gtk_icon_theme_get_theme_name (GtkIconTheme GDK_AVAILABLE_IN_ALL gboolean gtk_icon_theme_has_icon (GtkIconTheme *self, - const gchar *icon_name); + const char *icon_name); GDK_AVAILABLE_IN_ALL int *gtk_icon_theme_get_icon_sizes (GtkIconTheme *self, - const gchar *icon_name); + const char *icon_name); GDK_AVAILABLE_IN_ALL GtkIconPaintable *gtk_icon_theme_lookup_icon (GtkIconTheme *self, const char *icon_name, @@ -144,7 +144,7 @@ GType gtk_icon_paintable_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GFile * gtk_icon_paintable_get_file (GtkIconPaintable *self); GDK_AVAILABLE_IN_ALL -const gchar * gtk_icon_paintable_get_icon_name (GtkIconPaintable *self); +const char * gtk_icon_paintable_get_icon_name (GtkIconPaintable *self); GDK_AVAILABLE_IN_ALL gboolean gtk_icon_paintable_is_symbolic (GtkIconPaintable *self); diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 12c789719f..279629a8d7 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -263,7 +263,7 @@ static void gtk_icon_view_add_editable (GtkCel GtkCellRenderer *renderer, GtkCellEditable *editable, GdkRectangle *cell_area, - const gchar *path, + const char *path, GtkIconView *icon_view); static void gtk_icon_view_remove_editable (GtkCellArea *area, GtkCellRenderer *renderer, @@ -308,13 +308,13 @@ static void gtk_icon_view_buildable_init (GtkBuildableIface *if static gboolean gtk_icon_view_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); static void gtk_icon_view_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data); @@ -893,7 +893,7 @@ static void gtk_icon_view_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_CELL_RENDERER (child)) _gtk_cell_layout_buildable_add_child (buildable, builder, child, type); @@ -1941,7 +1941,7 @@ gtk_icon_view_add_editable (GtkCellArea *area, GtkCellRenderer *renderer, GtkCellEditable *editable, GdkRectangle *cell_area, - const gchar *path, + const char *path, GtkIconView *icon_view) { GtkIconViewChild *child; @@ -4385,7 +4385,7 @@ gtk_icon_view_set_tooltip_query_cb (GtkWidget *widget, GtkTooltip *tooltip, gpointer data) { - gchar *str; + char *str; GtkTreeIter iter; GtkTreePath *path; GtkTreeModel *model; @@ -5721,7 +5721,7 @@ get_dest_row (GdkDrop *drop) static gboolean check_model_dnd (GtkTreeModel *model, GType required_iface, - const gchar *signal) + const char *signal) { if (model == NULL || !G_TYPE_CHECK_INSTANCE_TYPE ((model), required_iface)) { @@ -6746,7 +6746,7 @@ static gboolean gtk_icon_view_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data) { @@ -6762,7 +6762,7 @@ static void gtk_icon_view_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data) { if (!_gtk_cell_layout_buildable_custom_tag_end (buildable, builder, diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index f4866cf3ba..2534bb933d 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -398,7 +398,7 @@ gtk_image_get_property (GObject *object, * Returns: a new #GtkImage **/ GtkWidget* -gtk_image_new_from_file (const gchar *filename) +gtk_image_new_from_file (const char *filename) { GtkImage *image; @@ -429,7 +429,7 @@ gtk_image_new_from_file (const gchar *filename) * Returns: a new #GtkImage **/ GtkWidget* -gtk_image_new_from_resource (const gchar *resource_path) +gtk_image_new_from_resource (const char *resource_path) { GtkImage *image; @@ -512,7 +512,7 @@ gtk_image_new_from_paintable (GdkPaintable *paintable) * Returns: a new #GtkImage displaying the themed icon **/ GtkWidget* -gtk_image_new_from_icon_name (const gchar *icon_name) +gtk_image_new_from_icon_name (const char *icon_name) { GtkImage *image; @@ -580,8 +580,8 @@ on_loader_size_prepared (GdkPixbufLoader *loader, static GdkPixbufAnimation * load_scalable_with_loader (GtkImage *image, - const gchar *file_path, - const gchar *resource_path, + const char *file_path, + const char *resource_path, int *scale_factor_out) { GdkPixbufLoader *loader; @@ -649,7 +649,7 @@ load_scalable_with_loader (GtkImage *image, **/ void gtk_image_set_from_file (GtkImage *image, - const gchar *filename) + const char *filename) { GdkPixbufAnimation *anim; int scale_factor; @@ -697,7 +697,7 @@ gtk_image_set_from_file (GtkImage *image, #endif static gboolean -resource_is_pixdata (const gchar *resource_path) +resource_is_pixdata (const char *resource_path) { const guint8 *stream; guint32 magic; @@ -731,7 +731,7 @@ out: **/ void gtk_image_set_from_resource (GtkImage *image, - const gchar *resource_path) + const char *resource_path) { GdkPixbufAnimation *animation; int scale_factor = 1; @@ -828,7 +828,7 @@ gtk_image_set_from_pixbuf (GtkImage *image, **/ void gtk_image_set_from_icon_name (GtkImage *image, - const gchar *icon_name) + const char *icon_name) { g_return_if_fail (GTK_IS_IMAGE (image)); @@ -994,7 +994,7 @@ gtk_image_get_paintable (GtkImage *image) * * Returns: (transfer none) (allow-none): the icon name, or %NULL **/ -const gchar * +const char * gtk_image_get_icon_name (GtkImage *image) { g_return_val_if_fail (GTK_IS_IMAGE (image), NULL); diff --git a/gtk/gtkimage.h b/gtk/gtkimage.h index 4f4e38aa31..8fc26a5e47 100644 --- a/gtk/gtkimage.h +++ b/gtk/gtkimage.h @@ -74,15 +74,15 @@ GType gtk_image_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkWidget* gtk_image_new (void); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_image_new_from_file (const gchar *filename); +GtkWidget* gtk_image_new_from_file (const char *filename); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_image_new_from_resource (const gchar *resource_path); +GtkWidget* gtk_image_new_from_resource (const char *resource_path); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_image_new_from_pixbuf (GdkPixbuf *pixbuf); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_image_new_from_paintable (GdkPaintable *paintable); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_image_new_from_icon_name (const gchar *icon_name); +GtkWidget* gtk_image_new_from_icon_name (const char *icon_name); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_image_new_from_gicon (GIcon *icon); @@ -90,10 +90,10 @@ GDK_AVAILABLE_IN_ALL void gtk_image_clear (GtkImage *image); GDK_AVAILABLE_IN_ALL void gtk_image_set_from_file (GtkImage *image, - const gchar *filename); + const char *filename); GDK_AVAILABLE_IN_ALL void gtk_image_set_from_resource (GtkImage *image, - const gchar *resource_path); + const char *resource_path); GDK_AVAILABLE_IN_ALL void gtk_image_set_from_pixbuf (GtkImage *image, GdkPixbuf *pixbuf); @@ -102,7 +102,7 @@ void gtk_image_set_from_paintable (GtkImage *image, GdkPaintable *paintable); GDK_AVAILABLE_IN_ALL void gtk_image_set_from_icon_name (GtkImage *image, - const gchar *icon_name); + const char *icon_name); GDK_AVAILABLE_IN_ALL void gtk_image_set_from_gicon (GtkImage *image, GIcon *icon); diff --git a/gtk/gtkimagedefinition.c b/gtk/gtkimagedefinition.c index 80f9c68f2f..1b7c9e51d9 100644 --- a/gtk/gtkimagedefinition.c +++ b/gtk/gtkimagedefinition.c @@ -186,7 +186,7 @@ gtk_image_definition_get_scale (const GtkImageDefinition *def) } } -const gchar * +const char * gtk_image_definition_get_icon_name (const GtkImageDefinition *def) { if (def->type != GTK_IMAGE_ICON_NAME) diff --git a/gtk/gtkimagedefinitionprivate.h b/gtk/gtkimagedefinitionprivate.h index 6471901f1a..b66d6c0cd4 100644 --- a/gtk/gtkimagedefinitionprivate.h +++ b/gtk/gtkimagedefinitionprivate.h @@ -35,7 +35,7 @@ void gtk_image_definition_unref (GtkImageDefinit GtkImageType gtk_image_definition_get_storage_type (const GtkImageDefinition *def); int gtk_image_definition_get_scale (const GtkImageDefinition *def); -const gchar * gtk_image_definition_get_icon_name (const GtkImageDefinition *def); +const char * gtk_image_definition_get_icon_name (const GtkImageDefinition *def); GIcon * gtk_image_definition_get_gicon (const GtkImageDefinition *def); GdkPaintable * gtk_image_definition_get_paintable (const GtkImageDefinition *def); diff --git a/gtk/gtkimcontext.c b/gtk/gtkimcontext.c index a7b419435b..00ff8f33df 100644 --- a/gtk/gtkimcontext.c +++ b/gtk/gtkimcontext.c @@ -85,7 +85,7 @@ * provided input method. * * |[ - * GtkIMContext * im_module_create(const gchar *context_id); + * GtkIMContext * im_module_create(const char *context_id); * ]| * This function should return a pointer to a newly created instance of the * #GtkIMContext subclass identified by @context_id. The context ID is the same @@ -123,13 +123,13 @@ struct _GtkIMContextPrivate { }; static void gtk_im_context_real_get_preedit_string (GtkIMContext *context, - gchar **str, + char **str, PangoAttrList **attrs, int *cursor_pos); static gboolean gtk_im_context_real_filter_keypress (GtkIMContext *context, GdkEvent *event); static gboolean gtk_im_context_real_get_surrounding (GtkIMContext *context, - gchar **text, + char **text, int *cursor_index); static void gtk_im_context_real_set_surrounding (GtkIMContext *context, const char *text, @@ -358,7 +358,7 @@ gtk_im_context_init (GtkIMContext *im_context) static void gtk_im_context_real_get_preedit_string (GtkIMContext *context, - gchar **str, + char **str, PangoAttrList **attrs, int *cursor_pos) { @@ -379,13 +379,13 @@ gtk_im_context_real_filter_keypress (GtkIMContext *context, typedef struct { - gchar *text; + char *text; int cursor_index; } SurroundingInfo; static void gtk_im_context_real_set_surrounding (GtkIMContext *context, - const gchar *text, + const char *text, int len, int cursor_index) { @@ -402,7 +402,7 @@ gtk_im_context_real_set_surrounding (GtkIMContext *context, static gboolean gtk_im_context_real_get_surrounding (GtkIMContext *context, - gchar **text, + char **text, int *cursor_index) { gboolean result; @@ -484,7 +484,7 @@ gtk_im_context_set_client_widget (GtkIMContext *context, **/ void gtk_im_context_get_preedit_string (GtkIMContext *context, - gchar **str, + char **str, PangoAttrList **attrs, int *cursor_pos) { @@ -742,7 +742,7 @@ gtk_im_context_set_use_preedit (GtkIMContext *context, **/ void gtk_im_context_set_surrounding (GtkIMContext *context, - const gchar *text, + const char *text, int len, int cursor_index) { @@ -791,11 +791,11 @@ gtk_im_context_set_surrounding (GtkIMContext *context, **/ gboolean gtk_im_context_get_surrounding (GtkIMContext *context, - gchar **text, + char **text, int *cursor_index) { GtkIMContextClass *klass; - gchar *local_text = NULL; + char *local_text = NULL; int local_index; gboolean result = FALSE; diff --git a/gtk/gtkimcontext.h b/gtk/gtkimcontext.h index 23c00f9809..17419eb180 100644 --- a/gtk/gtkimcontext.h +++ b/gtk/gtkimcontext.h @@ -54,7 +54,7 @@ struct _GtkIMContextClass void (*preedit_start) (GtkIMContext *context); void (*preedit_end) (GtkIMContext *context); void (*preedit_changed) (GtkIMContext *context); - void (*commit) (GtkIMContext *context, const gchar *str); + void (*commit) (GtkIMContext *context, const char *str); gboolean (*retrieve_surrounding) (GtkIMContext *context); gboolean (*delete_surrounding) (GtkIMContext *context, int offset, @@ -64,7 +64,7 @@ struct _GtkIMContextClass void (*set_client_widget) (GtkIMContext *context, GtkWidget *widget); void (*get_preedit_string) (GtkIMContext *context, - gchar **str, + char **str, PangoAttrList **attrs, int *cursor_pos); gboolean (*filter_keypress) (GtkIMContext *context, @@ -77,11 +77,11 @@ struct _GtkIMContextClass void (*set_use_preedit) (GtkIMContext *context, gboolean use_preedit); void (*set_surrounding) (GtkIMContext *context, - const gchar *text, + const char *text, int len, int cursor_index); gboolean (*get_surrounding) (GtkIMContext *context, - gchar **text, + char **text, int *cursor_index); /*< private >*/ /* Padding for future expansion */ @@ -101,7 +101,7 @@ void gtk_im_context_set_client_widget (GtkIMContext *context, GtkWidget *widget); GDK_AVAILABLE_IN_ALL void gtk_im_context_get_preedit_string (GtkIMContext *context, - gchar **str, + char **str, PangoAttrList **attrs, int *cursor_pos); GDK_AVAILABLE_IN_ALL @@ -132,12 +132,12 @@ void gtk_im_context_set_use_preedit (GtkIMContext *context, gboolean use_preedit); GDK_AVAILABLE_IN_ALL void gtk_im_context_set_surrounding (GtkIMContext *context, - const gchar *text, + const char *text, int len, int cursor_index); GDK_AVAILABLE_IN_ALL gboolean gtk_im_context_get_surrounding (GtkIMContext *context, - gchar **text, + char **text, int *cursor_index); GDK_AVAILABLE_IN_ALL gboolean gtk_im_context_delete_surrounding (GtkIMContext *context, diff --git a/gtk/gtkimcontextime.c b/gtk/gtkimcontextime.c index b337e52325..c7de8d66f6 100644 --- a/gtk/gtkimcontextime.c +++ b/gtk/gtkimcontextime.c @@ -101,7 +101,7 @@ static gboolean gtk_im_context_ime_filter_keypress (GtkIMContext *context, GdkEvent *event); static void gtk_im_context_ime_reset (GtkIMContext *context); static void gtk_im_context_ime_get_preedit_string (GtkIMContext *context, - gchar **str, + char **str, PangoAttrList **attrs, int *cursor_pos); static void gtk_im_context_ime_focus_in (GtkIMContext *context); @@ -323,7 +323,7 @@ static void _gtk_im_context_ime_commit_unichar (GtkIMContextIME *context_ime, gunichar c) { - gchar utf8[10]; + char utf8[10]; int len; if (context_ime->priv->dead_key_keyval != 0) @@ -440,10 +440,10 @@ gtk_im_context_ime_reset (GtkIMContext *context) } -static gchar * +static char * get_utf8_preedit_string (GtkIMContextIME *context_ime, int *pos_ret) { - gchar *utf8str = NULL; + char *utf8str = NULL; HWND hwnd; HIMC himc; int pos = 0; @@ -494,7 +494,7 @@ get_utf8_preedit_string (GtkIMContextIME *context_ime, int *pos_ret) { if (utf8str) { - gchar *utf8str_new = g_strdup (utf8str); + char *utf8str_new = g_strdup (utf8str); /* Note: We *don't* want to update context_ime->commit_string here! * Otherwise it will be updated repeatedly, not what we want! @@ -529,7 +529,7 @@ get_utf8_preedit_string (GtkIMContextIME *context_ime, int *pos_ret) static PangoAttrList * -get_pango_attr_list (GtkIMContextIME *context_ime, const gchar *utf8str) +get_pango_attr_list (GtkIMContextIME *context_ime, const char *utf8str) { PangoAttrList *attrs = pango_attr_list_new (); HWND hwnd; @@ -544,7 +544,7 @@ get_pango_attr_list (GtkIMContextIME *context_ime, const gchar *utf8str) if (context_ime->preediting) { - const gchar *schr = utf8str, *echr; + const char *schr = utf8str, *echr; guint8 *buf; guint16 f_red, f_green, f_blue, b_red, b_green, b_blue; glong len, spos = 0, epos, sidx = 0, eidx; @@ -630,11 +630,11 @@ get_pango_attr_list (GtkIMContextIME *context_ime, const gchar *utf8str) static void gtk_im_context_ime_get_preedit_string (GtkIMContext *context, - gchar **str, + char **str, PangoAttrList **attrs, int *cursor_pos) { - gchar *utf8str = NULL; + char *utf8str = NULL; int pos = 0; GtkIMContextIME *context_ime; @@ -864,7 +864,7 @@ gtk_im_context_ime_set_preedit_font (GtkIMContext *context) HWND hwnd; HIMC himc; HKL ime = GetKeyboardLayout (0); - const gchar *lang; + const char *lang; gunichar wc; PangoContext *pango_context; PangoFont *font; diff --git a/gtk/gtkimcontextime.h b/gtk/gtkimcontextime.h index 6091c499b6..8621bc6dfe 100644 --- a/gtk/gtkimcontextime.h +++ b/gtk/gtkimcontextime.h @@ -42,7 +42,7 @@ struct _GtkIMContextIME guint opened : 1; guint focus : 1; GdkRectangle cursor_location; - gchar *commit_string; + char *commit_string; GtkIMContextIMEPrivate *priv; }; diff --git a/gtk/gtkimcontextquartz.c b/gtk/gtkimcontextquartz.c index 4717c1df9d..6f0555582a 100644 --- a/gtk/gtkimcontextquartz.c +++ b/gtk/gtkimcontextquartz.c @@ -38,7 +38,7 @@ typedef struct _GtkIMContextQuartz GtkIMContext parent; GtkIMContext *helper; GdkSurface *client_surface; - gchar *preedit_str; + char *preedit_str; unsigned int cursor_index; unsigned int selected_len; GdkRectangle *cursor_rect; @@ -59,7 +59,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkIMContextQuartz, gtk_im_context_quartz, GTK_TYPE_IM_ static void quartz_get_preedit_string (GtkIMContext *context, - gchar **str, + char **str, PangoAttrList **attrs, int *cursor_pos) { @@ -74,14 +74,14 @@ quartz_get_preedit_string (GtkIMContext *context, { *attrs = pango_attr_list_new (); int len = g_utf8_strlen (*str, -1); - gchar *ch = *str; + char *ch = *str; if (len > 0) { PangoAttribute *attr; int i = 0; for (;;) { - gchar *s = ch; + char *s = ch; ch = g_utf8_next_char (ch); if (i >= qc->cursor_index && @@ -114,7 +114,7 @@ output_result (GtkIMContext *context, { GtkIMContextQuartz *qc = GTK_IM_CONTEXT_QUARTZ (context); gboolean retval = FALSE; - gchar *fixed_str, *marked_str; + char *fixed_str, *marked_str; fixed_str = g_strdup (g_object_get_data (G_OBJECT (surface), TIC_INSERT_TEXT)); marked_str = g_strdup (g_object_get_data (G_OBJECT (surface), TIC_MARKED_TEXT)); @@ -325,7 +325,7 @@ quartz_set_use_preedit (GtkIMContext *context, gboolean use_preedit) } static void -commit_cb (GtkIMContext *context, const gchar *str, GtkIMContextQuartz *qc) +commit_cb (GtkIMContext *context, const char *str, GtkIMContextQuartz *qc) { g_signal_emit_by_name (qc, "commit", str); } diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c index c3681715ee..cf5669addd 100644 --- a/gtk/gtkimcontextsimple.c +++ b/gtk/gtkimcontextsimple.c @@ -108,7 +108,7 @@ static gboolean gtk_im_context_simple_filter_keypress (GtkIMContext GdkEvent *key); static void gtk_im_context_simple_reset (GtkIMContext *context); static void gtk_im_context_simple_get_preedit_string (GtkIMContext *context, - gchar **str, + char **str, PangoAttrList **attrs, int *cursor_pos); @@ -138,10 +138,10 @@ gtk_im_context_simple_class_init (GtkIMContextSimpleClass *class) init_compose_table_async (NULL, NULL, NULL); } -static gchar* +static char * get_x11_compose_file_dir (void) { - gchar* compose_file_dir; + char * compose_file_dir; #if defined (X11_DATA_PREFIX) compose_file_dir = g_strdup (X11_DATA_PREFIX "/share/X11/locale"); @@ -155,14 +155,14 @@ get_x11_compose_file_dir (void) static void gtk_im_context_simple_init_compose_table (void) { - gchar *path = NULL; - const gchar *home; - const gchar *locale; - gchar **langs = NULL; - gchar **lang = NULL; + char *path = NULL; + const char *home; + const char *locale; + char **langs = NULL; + char **lang = NULL; const char * const sys_langs[] = { "el_gr", "fi_fi", "pt_br", NULL }; const char * const *sys_lang = NULL; - gchar *x11_compose_file_dir = get_x11_compose_file_dir (); + char *x11_compose_file_dir = get_x11_compose_file_dir (); path = g_build_filename (g_get_user_config_dir (), "gtk-4.0", "Compose", NULL); if (g_file_test (path, G_FILE_TEST_EXISTS)) @@ -300,7 +300,7 @@ gtk_im_context_simple_commit_char (GtkIMContext *context, { GtkIMContextSimple *context_simple = GTK_IM_CONTEXT_SIMPLE (context); GtkIMContextSimplePrivate *priv = context_simple->priv; - gchar buf[10]; + char buf[10]; int len; g_return_if_fail (g_unichar_validate (ch)); @@ -540,8 +540,8 @@ static gboolean check_normalize_nfc (gunichar* combination_buffer, int n_compose) { gunichar combination_buffer_temp[GTK_MAX_COMPOSE_LEN]; - gchar *combination_utf8_temp = NULL; - gchar *nfc_temp = NULL; + char *combination_utf8_temp = NULL; + char *nfc_temp = NULL; int n_combinations; gunichar temp_swap; int i; @@ -604,7 +604,7 @@ gtk_check_algorithmically (const guint16 *compose_buffer, { int i; gunichar combination_buffer[GTK_MAX_COMPOSE_LEN]; - gchar *combination_utf8, *nfc; + char *combination_utf8, *nfc; if (output_char) *output_char = 0; @@ -712,8 +712,8 @@ check_hex (GtkIMContextSimple *context_simple, int i; GString *str; gulong n; - gchar *nptr = NULL; - gchar buf[7]; + char *nptr = NULL; + char buf[7]; priv->tentative_match = 0; priv->tentative_match_len = 0; @@ -1214,7 +1214,7 @@ gtk_im_context_simple_reset (GtkIMContext *context) static void gtk_im_context_simple_get_preedit_string (GtkIMContext *context, - gchar **str, + char **str, PangoAttrList **attrs, int *cursor_pos) { @@ -1307,7 +1307,7 @@ gtk_im_context_simple_add_table (GtkIMContextSimple *context_simple, */ void gtk_im_context_simple_add_compose_file (GtkIMContextSimple *context_simple, - const gchar *compose_file) + const char *compose_file) { g_return_if_fail (GTK_IS_IM_CONTEXT_SIMPLE (context_simple)); diff --git a/gtk/gtkimcontextsimple.h b/gtk/gtkimcontextsimple.h index f03e7e56b2..e25cd4d216 100644 --- a/gtk/gtkimcontextsimple.h +++ b/gtk/gtkimcontextsimple.h @@ -71,7 +71,7 @@ void gtk_im_context_simple_add_table (GtkIMContextSimple *context_simpl int n_seqs); GDK_AVAILABLE_IN_ALL void gtk_im_context_simple_add_compose_file (GtkIMContextSimple *context_simple, - const gchar *compose_file); + const char *compose_file); G_END_DECLS diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c index d9144e30fd..9b0b48898c 100644 --- a/gtk/gtkimcontextwayland.c +++ b/gtk/gtkimcontextwayland.c @@ -55,7 +55,7 @@ struct _GtkIMContextWaylandClass }; struct preedit { - gchar *text; + char *text; int cursor_begin; int cursor_end; }; @@ -75,7 +75,7 @@ struct _GtkIMContextWayland gdouble press_y; struct { - gchar *text; + char *text; int cursor_idx; int anchor_idx; } surrounding; @@ -87,7 +87,7 @@ struct _GtkIMContextWayland struct preedit current_preedit; struct preedit pending_preedit; - gchar *pending_commit; + char *pending_commit; cairo_rectangle_int_t cursor_rect; guint use_preedit : 1; @@ -278,7 +278,7 @@ notify_surrounding_text (GtkIMContextWayland *context) { #define MAX_LEN 4000 GtkIMContextWaylandGlobal *global; - const gchar *start, *end; + const char *start, *end; int len, cursor, anchor; char *str = NULL; @@ -570,7 +570,7 @@ gtk_im_context_wayland_set_client_widget (GtkIMContext *context, static void gtk_im_context_wayland_get_preedit_string (GtkIMContext *context, - gchar **str, + char **str, PangoAttrList **attrs, int *cursor_pos) { @@ -858,7 +858,7 @@ gtk_im_context_wayland_set_use_preedit (GtkIMContext *context, static void gtk_im_context_wayland_set_surrounding (GtkIMContext *context, - const gchar *text, + const char *text, int len, int cursor_index) { @@ -882,7 +882,7 @@ gtk_im_context_wayland_set_surrounding (GtkIMContext *context, static gboolean gtk_im_context_wayland_get_surrounding (GtkIMContext *context, - gchar **text, + char **text, int *cursor_index) { GtkIMContextWayland *context_wayland; diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c index 3181ee26b7..d3bd886acb 100644 --- a/gtk/gtkimmodule.c +++ b/gtk/gtkimmodule.c @@ -81,7 +81,7 @@ * if that could not be created, a newly created GtkIMContextSimple. */ GtkIMContext * -_gtk_im_module_create (const gchar *context_id) +_gtk_im_module_create (const char *context_id) { GIOExtensionPoint *ep; GIOExtension *ext; @@ -141,9 +141,9 @@ match_backend (GdkDisplay *display, return TRUE; } -static const gchar * +static const char * lookup_immodule (GdkDisplay *display, - gchar **immodules_list) + char **immodules_list) { guint i; @@ -180,11 +180,11 @@ lookup_immodule (GdkDisplay *display, * * Returns: the context ID (will never be %NULL) */ -const gchar * +const char * _gtk_im_module_get_default_context_id (GdkDisplay *display) { - const gchar *context_id = NULL; - const gchar *envvar; + const char *context_id = NULL; + const char *envvar; GtkSettings *settings; GIOExtensionPoint *ep; GList *l; diff --git a/gtk/gtkimmoduleprivate.h b/gtk/gtkimmoduleprivate.h index 032a4782db..3619ebaacf 100644 --- a/gtk/gtkimmoduleprivate.h +++ b/gtk/gtkimmoduleprivate.h @@ -26,7 +26,7 @@ G_BEGIN_DECLS void gtk_im_module_ensure_extension_point (void); GtkIMContext * _gtk_im_module_create (const char *context_id); -const gchar * _gtk_im_module_get_default_context_id (GdkDisplay *display); +const char * _gtk_im_module_get_default_context_id (GdkDisplay *display); G_END_DECLS diff --git a/gtk/gtkimmulticontext.c b/gtk/gtkimmulticontext.c index 413737b6d3..75a70c3f0d 100644 --- a/gtk/gtkimmulticontext.c +++ b/gtk/gtkimmulticontext.c @@ -43,8 +43,8 @@ struct _GtkIMMulticontextPrivate GtkWidget *client_widget; GdkRectangle cursor_location; - gchar *context_id; - gchar *context_id_aux; + char *context_id; + char *context_id_aux; guint use_preedit : 1; guint have_cursor_location : 1; @@ -62,7 +62,7 @@ static void gtk_im_multicontext_set_delegate (GtkIMMulticontext static void gtk_im_multicontext_set_client_widget (GtkIMContext *context, GtkWidget *widget); static void gtk_im_multicontext_get_preedit_string (GtkIMContext *context, - gchar **str, + char **str, PangoAttrList **attrs, int *cursor_pos); static gboolean gtk_im_multicontext_filter_keypress (GtkIMContext *context, @@ -75,7 +75,7 @@ static void gtk_im_multicontext_set_cursor_location (GtkIMContext static void gtk_im_multicontext_set_use_preedit (GtkIMContext *context, gboolean use_preedit); static gboolean gtk_im_multicontext_get_surrounding (GtkIMContext *context, - gchar **text, + char **text, int *cursor_index); static void gtk_im_multicontext_set_surrounding (GtkIMContext *context, const char *text, @@ -89,7 +89,7 @@ static void gtk_im_multicontext_preedit_end_cb (GtkIMContext * static void gtk_im_multicontext_preedit_changed_cb (GtkIMContext *delegate, GtkIMMulticontext *multicontext); static void gtk_im_multicontext_commit_cb (GtkIMContext *delegate, - const gchar *str, + const char *str, GtkIMMulticontext *multicontext); static gboolean gtk_im_multicontext_retrieve_surrounding_cb (GtkIMContext *delegate, GtkIMMulticontext *multicontext); @@ -244,7 +244,7 @@ gtk_im_multicontext_set_delegate (GtkIMMulticontext *multicontext, g_signal_emit_by_name (multicontext, "preedit-changed"); } -static const gchar * +static const char * get_effective_context_id (GtkIMMulticontext *multicontext) { GtkIMMulticontextPrivate *priv = multicontext->priv; @@ -329,7 +329,7 @@ gtk_im_multicontext_set_client_widget (GtkIMContext *context, static void gtk_im_multicontext_get_preedit_string (GtkIMContext *context, - gchar **str, + char **str, PangoAttrList **attrs, int *cursor_pos) { @@ -377,7 +377,7 @@ gtk_im_multicontext_filter_keypress (GtkIMContext *context, if (ch != 0 && !g_unichar_iscntrl (ch)) { int len; - gchar buf[10]; + char buf[10]; len = g_unichar_to_utf8 (ch, buf); buf[len] = '\0'; @@ -461,7 +461,7 @@ gtk_im_multicontext_set_use_preedit (GtkIMContext *context, static gboolean gtk_im_multicontext_get_surrounding (GtkIMContext *context, - gchar **text, + char **text, int *cursor_index) { GtkIMMulticontext *multicontext = GTK_IM_MULTICONTEXT (context); @@ -516,7 +516,7 @@ gtk_im_multicontext_preedit_changed_cb (GtkIMContext *delegate, static void gtk_im_multicontext_commit_cb (GtkIMContext *delegate, - const gchar *str, + const char *str, GtkIMMulticontext *multicontext) { g_signal_emit_by_name (multicontext, "commit", str); diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c index 2ddaa3e839..db65bd0926 100644 --- a/gtk/gtkinfobar.c +++ b/gtk/gtkinfobar.c @@ -191,13 +191,13 @@ static void gtk_info_bar_buildable_interface_init (GtkBuildableIface *ifa static gboolean gtk_info_bar_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); static void gtk_info_bar_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data); static void gtk_info_bar_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, @@ -609,7 +609,7 @@ gtk_info_bar_remove_action_widget (GtkInfoBar *info_bar, */ GtkWidget* gtk_info_bar_add_button (GtkInfoBar *info_bar, - const gchar *button_text, + const char *button_text, int response_id) { GtkWidget *button; @@ -629,10 +629,10 @@ gtk_info_bar_add_button (GtkInfoBar *info_bar, static void add_buttons_valist (GtkInfoBar *info_bar, - const gchar *first_button_text, + const char *first_button_text, va_list args) { - const gchar* text; + const char * text; int response_id; g_return_if_fail (GTK_IS_INFO_BAR (info_bar)); @@ -647,7 +647,7 @@ add_buttons_valist (GtkInfoBar *info_bar, { gtk_info_bar_add_button (info_bar, text, response_id); - text = va_arg (args, gchar*); + text = va_arg (args, char *); if (text == NULL) break; @@ -669,7 +669,7 @@ add_buttons_valist (GtkInfoBar *info_bar, */ void gtk_info_bar_add_buttons (GtkInfoBar *info_bar, - const gchar *first_button_text, + const char *first_button_text, ...) { va_list args; @@ -708,7 +708,7 @@ gtk_info_bar_new (void) * Returns: a new #GtkInfoBar */ GtkWidget* -gtk_info_bar_new_with_buttons (const gchar *first_button_text, +gtk_info_bar_new_with_buttons (const char *first_button_text, ...) { GtkInfoBar *info_bar; @@ -829,7 +829,7 @@ gtk_info_bar_response (GtkInfoBar *info_bar, typedef struct { - gchar *name; + char *name; int response_id; int line; int col; @@ -858,9 +858,9 @@ action_widget_info_free (gpointer data) static void parser_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -868,7 +868,7 @@ parser_start_element (GtkBuildableParseContext *context, if (strcmp (element_name, "action-widget") == 0) { - const gchar *response; + const char *response; GValue gvalue = G_VALUE_INIT; if (!_gtk_builder_check_parent (data->builder, context, "action-widgets", error)) @@ -913,7 +913,7 @@ parser_start_element (GtkBuildableParseContext *context, static void parser_text_element (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) @@ -926,7 +926,7 @@ parser_text_element (GtkBuildableParseContext *context, static void parser_end_element (GtkBuildableParseContext *context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error) { @@ -958,7 +958,7 @@ gboolean gtk_info_bar_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *parser_data) { @@ -988,7 +988,7 @@ static void gtk_info_bar_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data) { GtkInfoBar *info_bar = GTK_INFO_BAR (buildable); diff --git a/gtk/gtkinfobar.h b/gtk/gtkinfobar.h index 528a1250de..999625227c 100644 --- a/gtk/gtkinfobar.h +++ b/gtk/gtkinfobar.h @@ -50,7 +50,7 @@ GDK_AVAILABLE_IN_ALL GtkWidget *gtk_info_bar_new (void); GDK_AVAILABLE_IN_ALL -GtkWidget *gtk_info_bar_new_with_buttons (const gchar *first_button_text, +GtkWidget *gtk_info_bar_new_with_buttons (const char *first_button_text, ...); GDK_AVAILABLE_IN_ALL @@ -62,11 +62,11 @@ void gtk_info_bar_remove_action_widget (GtkInfoBar *info_bar, GtkWidget *widget); GDK_AVAILABLE_IN_ALL GtkWidget *gtk_info_bar_add_button (GtkInfoBar *info_bar, - const gchar *button_text, + const char *button_text, int response_id); GDK_AVAILABLE_IN_ALL void gtk_info_bar_add_buttons (GtkInfoBar *info_bar, - const gchar *first_button_text, + const char *first_button_text, ...); GDK_AVAILABLE_IN_ALL void gtk_info_bar_add_child (GtkInfoBar *info_bar, diff --git a/gtk/gtkistringprivate.h b/gtk/gtkistringprivate.h index 0af8cb1593..9dfe8712f4 100644 --- a/gtk/gtkistringprivate.h +++ b/gtk/gtkistringprivate.h @@ -128,7 +128,7 @@ istring_prepend (IString *str, } else { - gchar *old = NULL; + char *old = NULL; if (!istring_is_inline (str)) old = str->u.str; @@ -145,7 +145,7 @@ static inline void istring_append (IString *str, IString *other) { - const gchar *text = istring_str (other); + const char *text = istring_str (other); guint n_bytes = other->n_bytes; guint n_chars = other->n_chars; diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 5003ba51ae..b07134b1a2 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -234,7 +234,7 @@ * An example looks like this: * * |[ - * const gchar *text = + * const char *text = * "Go to the" * "" * "GTK+ website for more..."; @@ -264,8 +264,8 @@ struct _GtkLabel GtkWidget *popup_menu; GMenuModel *extra_menu; - gchar *label; - gchar *text; + char *label; + char *text; gfloat xalign; gfloat yalign; @@ -299,7 +299,7 @@ struct _GtkLabelClass void (* copy_clipboard) (GtkLabel *self); gboolean (*activate_link) (GtkLabel *self, - const gchar *uri); + const char *uri); }; /* Notes about the handling of links: @@ -330,8 +330,8 @@ struct _GtkLabelClass */ typedef struct { - gchar *uri; - gchar *title; /* the title attribute, used as tooltip */ + char *uri; + char *title; /* the title attribute, used as tooltip */ GtkCssNode *cssnode; @@ -445,15 +445,15 @@ static gboolean gtk_label_query_tooltip (GtkWidget *widget, GtkTooltip *tooltip); static void gtk_label_set_text_internal (GtkLabel *self, - gchar *str); + char *str); static void gtk_label_set_label_internal (GtkLabel *self, - gchar *str); + char *str); static gboolean gtk_label_set_use_markup_internal (GtkLabel *self, gboolean val); static gboolean gtk_label_set_use_underline_internal (GtkLabel *self, gboolean val); static void gtk_label_set_markup_internal (GtkLabel *self, - const gchar *str, + const char *str, gboolean with_uline); static void gtk_label_recalculate (GtkLabel *self); static void gtk_label_root (GtkWidget *widget); @@ -486,14 +486,14 @@ static void gtk_label_buildable_interface_init (GtkBuildableIface *iface) static gboolean gtk_label_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); static void gtk_label_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data); /* For selectable labels: */ @@ -511,7 +511,7 @@ static int gtk_label_move_backward_word (GtkLabel *self, /* For links: */ static void gtk_label_clear_links (GtkLabel *self); static gboolean gtk_label_activate_link (GtkLabel *self, - const gchar *uri); + const char *uri); static void gtk_label_activate_current_link (GtkLabel *self); static void emit_activate_link (GtkLabel *self, GtkLabelLink *link); @@ -1323,7 +1323,7 @@ static gboolean gtk_label_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data) { @@ -1349,7 +1349,7 @@ static void gtk_label_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data) { GtkPangoAttributeParserData *data = user_data; @@ -1382,7 +1382,7 @@ gtk_label_buildable_custom_finished (GtkBuildable *buildable, * Returns: the new #GtkLabel **/ GtkWidget* -gtk_label_new (const gchar *str) +gtk_label_new (const char *str) { GtkLabel *self; @@ -1417,7 +1417,7 @@ gtk_label_new (const gchar *str) * Returns: the new #GtkLabel **/ GtkWidget* -gtk_label_new_with_mnemonic (const gchar *str) +gtk_label_new_with_mnemonic (const char *str) { GtkLabel *self; @@ -1682,7 +1682,7 @@ gtk_label_get_mnemonic_keyval (GtkLabel *self) static void gtk_label_set_text_internal (GtkLabel *self, - gchar *str) + char *str) { if (g_strcmp0 (self->text, str) == 0) { @@ -1701,7 +1701,7 @@ gtk_label_set_text_internal (GtkLabel *self, static void gtk_label_set_label_internal (GtkLabel *self, - gchar *str) + char *str) { g_free (self->label); @@ -1793,7 +1793,7 @@ gtk_label_recalculate (GtkLabel *self) **/ void gtk_label_set_text (GtkLabel *self, - const gchar *str) + const char *str) { g_return_if_fail (GTK_IS_LABEL (self)); @@ -1879,7 +1879,7 @@ gtk_label_get_attributes (GtkLabel *self) **/ void gtk_label_set_label (GtkLabel *self, - const gchar *str) + const char *str) { g_return_if_fail (GTK_IS_LABEL (self)); @@ -1902,7 +1902,7 @@ gtk_label_set_label (GtkLabel *self, * Returns: the text of the label widget. This string is * owned by the widget and must not be modified or freed. **/ -const gchar * +const char * gtk_label_get_label (GtkLabel *self) { g_return_val_if_fail (GTK_IS_LABEL (self), NULL); @@ -1920,9 +1920,9 @@ typedef struct static void start_element_handler (GMarkupParseContext *context, - const gchar *element_name, - const gchar **attribute_names, - const gchar **attribute_values, + const char *element_name, + const char **attribute_names, + const char **attribute_values, gpointer user_data, GError **error) { @@ -1932,9 +1932,9 @@ start_element_handler (GMarkupParseContext *context, if (strcmp (element_name, "a") == 0) { GtkLabelLink link; - const gchar *uri = NULL; - const gchar *title = NULL; - const gchar *class = NULL; + const char *uri = NULL; + const char *title = NULL; + const char *class = NULL; gboolean visited = FALSE; int line_number; int char_number; @@ -1946,7 +1946,7 @@ start_element_handler (GMarkupParseContext *context, for (i = 0; attribute_names[i] != NULL; i++) { - const gchar *attr = attribute_names[i]; + const char *attr = attribute_names[i]; if (strcmp (attr, "href") == 0) uri = attribute_values[i]; @@ -2026,9 +2026,9 @@ start_element_handler (GMarkupParseContext *context, for (i = 0; attribute_names[i] != NULL; i++) { - const gchar *attr = attribute_names[i]; - const gchar *value = attribute_values[i]; - gchar *newvalue; + const char *attr = attribute_names[i]; + const char *value = attribute_values[i]; + char *newvalue; newvalue = g_markup_escape_text (value, -1); @@ -2046,7 +2046,7 @@ start_element_handler (GMarkupParseContext *context, static void end_element_handler (GMarkupParseContext *context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error) { @@ -2067,13 +2067,13 @@ end_element_handler (GMarkupParseContext *context, static void text_handler (GMarkupParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) { UriParserData *pdata = user_data; - gchar *newtext; + char *newtext; newtext = g_markup_escape_text (text, text_len); g_string_append (pdata->new_str, newtext); @@ -2091,7 +2091,7 @@ static const GMarkupParser markup_parser = }; static gboolean -xml_isspace (gchar c) +xml_isspace (char c) { return (c == ' ' || c == '\t' || c == '\n' || c == '\r'); } @@ -2106,8 +2106,8 @@ link_free (GtkLabelLink *link) static gboolean parse_uri_markup (GtkLabel *self, - const gchar *str, - gchar **new_str, + const char *str, + char **new_str, GtkLabelLink **links, guint *out_n_links, GError **error) @@ -2272,13 +2272,13 @@ extract_mnemonic_keyval (const char *text, static void gtk_label_set_markup_internal (GtkLabel *self, - const gchar *str, + const char *str, gboolean with_uline) { - gchar *text = NULL; + char *text = NULL; GError *error = NULL; PangoAttrList *attrs = NULL; - gchar *str_for_display = NULL; + char *str_for_display = NULL; GtkLabelLink *links = NULL; guint n_links = 0; PangoAttribute *mnemonic_attr = NULL; @@ -2402,7 +2402,7 @@ error_set: **/ void gtk_label_set_markup (GtkLabel *self, - const gchar *str) + const char *str) { g_return_if_fail (GTK_IS_LABEL (self)); @@ -2434,7 +2434,7 @@ gtk_label_set_markup (GtkLabel *self, */ void gtk_label_set_markup_with_mnemonic (GtkLabel *self, - const gchar *str) + const char *str) { g_return_if_fail (GTK_IS_LABEL (self)); @@ -2460,7 +2460,7 @@ gtk_label_set_markup_with_mnemonic (GtkLabel *self, * Returns: the text in the label widget. This is the internal * string used by the label, and must not be modified. **/ -const gchar * +const char * gtk_label_get_text (GtkLabel *self) { g_return_val_if_fail (GTK_IS_LABEL (self), NULL); @@ -3553,7 +3553,7 @@ gtk_label_snapshot (GtkWidget *widget, **/ void gtk_label_set_text_with_mnemonic (GtkLabel *self, - const gchar *str) + const char *str) { g_return_if_fail (GTK_IS_LABEL (self)); g_return_if_fail (str != NULL); @@ -3593,8 +3593,8 @@ get_layout_index (GtkLabel *self, int *index) { int trailing = 0; - const gchar *cluster; - const gchar *cluster_end; + const char *cluster; + const char *cluster_end; gboolean inside; int lx, ly; @@ -5511,7 +5511,7 @@ gtk_label_clear_links (GtkLabel *self) static gboolean gtk_label_activate_link (GtkLabel *self, - const gchar *uri) + const char *uri) { GtkWidget *widget = GTK_WIDGET (self); GtkWidget *toplevel = GTK_WIDGET (gtk_widget_get_root (widget)); @@ -5573,7 +5573,7 @@ gtk_label_activate_current_link (GtkLabel *self) * Returns: (nullable): the currently active URI or %NULL if there is none. * The string is owned by GTK+ and must not be freed or modified. */ -const gchar * +const char * gtk_label_get_current_uri (GtkLabel *self) { const GtkLabelLink *link; @@ -5711,7 +5711,7 @@ _gtk_label_get_n_links (GtkLabel *self) return 0; } -const gchar * +const char * _gtk_label_get_link_uri (GtkLabel *self, int idx) { diff --git a/gtk/gtklabel.h b/gtk/gtklabel.h index 367972fb3f..2547fd511b 100644 --- a/gtk/gtklabel.h +++ b/gtk/gtklabel.h @@ -42,14 +42,14 @@ typedef struct _GtkLabel GtkLabel; GDK_AVAILABLE_IN_ALL GType gtk_label_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_label_new (const gchar *str); +GtkWidget* gtk_label_new (const char *str); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_label_new_with_mnemonic (const gchar *str); +GtkWidget* gtk_label_new_with_mnemonic (const char *str); GDK_AVAILABLE_IN_ALL void gtk_label_set_text (GtkLabel *self, - const gchar *str); + const char *str); GDK_AVAILABLE_IN_ALL -const gchar* gtk_label_get_text (GtkLabel *self); +const char * gtk_label_get_text (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_set_attributes (GtkLabel *self, PangoAttrList *attrs); @@ -57,12 +57,12 @@ GDK_AVAILABLE_IN_ALL PangoAttrList *gtk_label_get_attributes (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_set_label (GtkLabel *self, - const gchar *str); + const char *str); GDK_AVAILABLE_IN_ALL -const gchar * gtk_label_get_label (GtkLabel *self); +const char * gtk_label_get_label (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_set_markup (GtkLabel *self, - const gchar *str); + const char *str); GDK_AVAILABLE_IN_ALL void gtk_label_set_use_markup (GtkLabel *self, gboolean setting); @@ -76,7 +76,7 @@ gboolean gtk_label_get_use_underline (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_set_markup_with_mnemonic (GtkLabel *self, - const gchar *str); + const char *str); GDK_AVAILABLE_IN_ALL guint gtk_label_get_mnemonic_keyval (GtkLabel *self); GDK_AVAILABLE_IN_ALL @@ -86,7 +86,7 @@ GDK_AVAILABLE_IN_ALL GtkWidget *gtk_label_get_mnemonic_widget (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_set_text_with_mnemonic (GtkLabel *self, - const gchar *str); + const char *str); GDK_AVAILABLE_IN_ALL void gtk_label_set_justify (GtkLabel *self, GtkJustification jtype); @@ -150,7 +150,7 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_label_get_single_line_mode (GtkLabel *self); GDK_AVAILABLE_IN_ALL -const gchar *gtk_label_get_current_uri (GtkLabel *self); +const char *gtk_label_get_current_uri (GtkLabel *self); GDK_AVAILABLE_IN_ALL void gtk_label_set_xalign (GtkLabel *self, diff --git a/gtk/gtklabelprivate.h b/gtk/gtklabelprivate.h index 42b624a59d..3533949e86 100644 --- a/gtk/gtklabelprivate.h +++ b/gtk/gtklabelprivate.h @@ -34,7 +34,7 @@ int _gtk_label_get_link_at (GtkLabel *label, int pos); void _gtk_label_activate_link (GtkLabel *label, int idx); -const gchar *_gtk_label_get_link_uri (GtkLabel *label, +const char *_gtk_label_get_link_uri (GtkLabel *label, int idx); void _gtk_label_get_link_extent (GtkLabel *label, int idx, diff --git a/gtk/gtklevelbar.c b/gtk/gtklevelbar.c index 41811c89b8..19942b55e8 100644 --- a/gtk/gtklevelbar.c +++ b/gtk/gtklevelbar.c @@ -159,7 +159,7 @@ static guint signals[NUM_SIGNALS] = { 0, }; typedef struct _GtkLevelBarClass GtkLevelBarClass; typedef struct { - gchar *name; + char *name; gdouble value; } GtkLevelBarOffset; @@ -187,7 +187,7 @@ struct _GtkLevelBarClass { GtkWidgetClass parent_class; void (* offset_changed) (GtkLevelBar *self, - const gchar *name); + const char *name); }; static void gtk_level_bar_set_value_internal (GtkLevelBar *self, @@ -201,7 +201,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkLevelBar, gtk_level_bar, GTK_TYPE_WIDGET, gtk_level_bar_buildable_init)) static GtkLevelBarOffset * -gtk_level_bar_offset_new (const gchar *name, +gtk_level_bar_offset_new (const char *name, gdouble value) { GtkLevelBarOffset *offset = g_slice_new0 (GtkLevelBarOffset); @@ -224,7 +224,7 @@ offset_find_func (gconstpointer data, gconstpointer user_data) { const GtkLevelBarOffset *offset = data; - const gchar *name = user_data; + const char *name = user_data; return g_strcmp0 (name, offset->name); } @@ -241,7 +241,7 @@ offset_sort_func (gconstpointer a, static gboolean gtk_level_bar_ensure_offset (GtkLevelBar *self, - const gchar *name, + const char *name, gdouble value) { GList *existing; @@ -570,7 +570,7 @@ static void update_level_style_classes (GtkLevelBar *self) { gdouble value; - const gchar *value_class = NULL; + const char *value_class = NULL; GtkLevelBarOffset *offset, *prev_offset; GList *l; int num_filled, num_blocks, i; @@ -666,9 +666,9 @@ typedef struct { static void offset_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -686,8 +686,8 @@ offset_start_element (GtkBuildableParseContext *context, } else if (strcmp (element_name, "offset") == 0) { - const gchar *name; - const gchar *value; + const char *name; + const char *value; GValue gvalue = G_VALUE_INIT; GtkLevelBarOffset *offset; @@ -731,7 +731,7 @@ static gboolean gtk_level_bar_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *parser_data) { @@ -762,7 +762,7 @@ static void gtk_level_bar_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data) { OffsetsParserData *data = user_data; @@ -1311,7 +1311,7 @@ gtk_level_bar_set_inverted (GtkLevelBar *self, */ void gtk_level_bar_remove_offset_value (GtkLevelBar *self, - const gchar *name) + const char *name) { GList *existing; @@ -1343,7 +1343,7 @@ gtk_level_bar_remove_offset_value (GtkLevelBar *self, */ void gtk_level_bar_add_offset_value (GtkLevelBar *self, - const gchar *name, + const char *name, gdouble value) { GQuark name_quark; @@ -1372,7 +1372,7 @@ gtk_level_bar_add_offset_value (GtkLevelBar *self, */ gboolean gtk_level_bar_get_offset_value (GtkLevelBar *self, - const gchar *name, + const char *name, gdouble *value) { GList *existing; diff --git a/gtk/gtklevelbar.h b/gtk/gtklevelbar.h index 55defd25b1..33a03c4c7c 100644 --- a/gtk/gtklevelbar.h +++ b/gtk/gtklevelbar.h @@ -100,14 +100,14 @@ gboolean gtk_level_bar_get_inverted (GtkLevelBar *self); GDK_AVAILABLE_IN_ALL void gtk_level_bar_add_offset_value (GtkLevelBar *self, - const gchar *name, + const char *name, gdouble value); GDK_AVAILABLE_IN_ALL void gtk_level_bar_remove_offset_value (GtkLevelBar *self, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL gboolean gtk_level_bar_get_offset_value (GtkLevelBar *self, - const gchar *name, + const char *name, gdouble *value); G_END_DECLS diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c index 38755b92db..155f43450c 100644 --- a/gtk/gtklinkbutton.c +++ b/gtk/gtklinkbutton.c @@ -515,9 +515,9 @@ gtk_link_button_popup_menu (GtkWidget *widget, * Returns: a new link button widget. */ GtkWidget * -gtk_link_button_new (const gchar *uri) +gtk_link_button_new (const char *uri) { - gchar *utf8_uri = NULL; + char *utf8_uri = NULL; GtkWidget *retval; g_return_val_if_fail (uri != NULL, NULL); @@ -563,8 +563,8 @@ gtk_link_button_new (const gchar *uri) * Returns: (transfer none): a new link button widget. */ GtkWidget * -gtk_link_button_new_with_label (const gchar *uri, - const gchar *label) +gtk_link_button_new_with_label (const char *uri, + const char *label) { GtkWidget *retval; @@ -590,7 +590,7 @@ gtk_link_button_query_tooltip_cb (GtkWidget *widget, gpointer data) { GtkLinkButton *link_button = GTK_LINK_BUTTON (widget); - const gchar *label, *uri; + const char *label, *uri; const char *text, *markup; label = gtk_button_get_label (GTK_BUTTON (link_button)); @@ -621,7 +621,7 @@ gtk_link_button_query_tooltip_cb (GtkWidget *widget, */ void gtk_link_button_set_uri (GtkLinkButton *link_button, - const gchar *uri) + const char *uri) { g_return_if_fail (GTK_IS_LINK_BUTTON (link_button)); g_return_if_fail (uri != NULL); @@ -643,7 +643,7 @@ gtk_link_button_set_uri (GtkLinkButton *link_button, * Returns: a valid URI. The returned string is owned by the link button * and should not be modified or freed. */ -const gchar * +const char * gtk_link_button_get_uri (GtkLinkButton *link_button) { g_return_val_if_fail (GTK_IS_LINK_BUTTON (link_button), NULL); diff --git a/gtk/gtklinkbutton.h b/gtk/gtklinkbutton.h index aaa922ed43..90390ff7eb 100644 --- a/gtk/gtklinkbutton.h +++ b/gtk/gtklinkbutton.h @@ -42,16 +42,16 @@ GDK_AVAILABLE_IN_ALL GType gtk_link_button_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget * gtk_link_button_new (const gchar *uri); +GtkWidget * gtk_link_button_new (const char *uri); GDK_AVAILABLE_IN_ALL -GtkWidget * gtk_link_button_new_with_label (const gchar *uri, - const gchar *label); +GtkWidget * gtk_link_button_new_with_label (const char *uri, + const char *label); GDK_AVAILABLE_IN_ALL -const gchar * gtk_link_button_get_uri (GtkLinkButton *link_button); +const char * gtk_link_button_get_uri (GtkLinkButton *link_button); GDK_AVAILABLE_IN_ALL void gtk_link_button_set_uri (GtkLinkButton *link_button, - const gchar *uri); + const char *uri); GDK_AVAILABLE_IN_ALL gboolean gtk_link_button_get_visited (GtkLinkButton *link_button); diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c index 0601c3da65..7b9affd94e 100644 --- a/gtk/gtklistbox.c +++ b/gtk/gtklistbox.c @@ -332,7 +332,7 @@ static void gtk_list_box_row_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (buildable), GTK_WIDGET (child)); @@ -3241,7 +3241,7 @@ gtk_list_box_row_get_selectable (GtkListBoxRow *row) static void gtk_list_box_row_set_action_name (GtkActionable *actionable, - const gchar *action_name) + const char *action_name) { GtkListBoxRow *row = GTK_LIST_BOX_ROW (actionable); GtkListBoxRowPrivate *priv = ROW_PRIV (row); @@ -3327,7 +3327,7 @@ gtk_list_box_row_set_property (GObject *obj, } } -static const gchar * +static const char * gtk_list_box_row_get_action_name (GtkActionable *actionable) { GtkListBoxRow *row = GTK_LIST_BOX_ROW (actionable); @@ -3481,7 +3481,7 @@ static void gtk_list_box_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (type && strcmp (type, "placeholder") == 0) gtk_list_box_set_placeholder (GTK_LIST_BOX (buildable), GTK_WIDGET (child)); diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c index edd4630f0f..e27feedc52 100644 --- a/gtk/gtkliststore.c +++ b/gtk/gtkliststore.c @@ -75,7 +75,7 @@ * * for (i = 0; i < 10; i++) * { - * gchar *some_data; + * char *some_data; * * some_data = get_some_data (i); * @@ -286,13 +286,13 @@ static gboolean gtk_list_store_has_default_sort_func (GtkTreeSortable *so static gboolean gtk_list_store_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); static void gtk_list_store_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data); G_DEFINE_TYPE_WITH_CODE (GtkListStore, gtk_list_store, G_TYPE_OBJECT, @@ -1022,7 +1022,7 @@ gtk_list_store_set_valist_internal (GtkListStore *list_store, while (column != -1) { GValue value = G_VALUE_INIT; - gchar *error = NULL; + char *error = NULL; if (column < 0 || column >= priv->n_columns) { @@ -2327,7 +2327,7 @@ gtk_list_store_insert_with_valuesv (GtkListStore *list_store, */ typedef struct { gboolean translatable; - gchar *context; + char *context; int id; } ColInfo; @@ -2343,14 +2343,14 @@ typedef struct { int n_columns; int row_column; gboolean is_data; - const gchar *domain; + const char *domain; } SubParserData; static void list_store_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -2359,8 +2359,8 @@ list_store_start_element (GtkBuildableParseContext *context, if (strcmp (element_name, "col") == 0) { int id = -1; - const gchar *id_str; - const gchar *msg_context = NULL; + const char *id_str; + const char *msg_context = NULL; gboolean translatable = FALSE; ColInfo *info; GValue val = G_VALUE_INIT; @@ -2437,7 +2437,7 @@ list_store_start_element (GtkBuildableParseContext *context, } else if (strcmp (element_name, "column") == 0) { - const gchar *type; + const char *type; if (!_gtk_builder_check_parent (data->builder, context, "columns", error)) return; @@ -2462,7 +2462,7 @@ list_store_start_element (GtkBuildableParseContext *context, static void list_store_end_element (GtkBuildableParseContext *context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error) { @@ -2510,7 +2510,7 @@ list_store_end_element (GtkBuildableParseContext *context, if (type == G_TYPE_INVALID) { g_warning ("Unknown type %s specified in treemodel %s", - (const gchar*)l->data, + (const char *)l->data, gtk_buildable_get_name (GTK_BUILDABLE (data->object))); continue; } @@ -2531,14 +2531,14 @@ list_store_end_element (GtkBuildableParseContext *context, static void list_store_text (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) { SubParserData *data = (SubParserData*)user_data; int i; - gchar *string; + char *string; ColInfo *info; if (!data->is_data) @@ -2550,7 +2550,7 @@ list_store_text (GtkBuildableParseContext *context, string = g_strndup (text, text_len); if (info->translatable && text_len) { - gchar *translated; + char *translated; /* FIXME: This will not use the domain set in the .ui file, * since the parser is not telling the builder about the domain. @@ -2585,7 +2585,7 @@ static gboolean gtk_list_store_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *parser_data) { @@ -2636,7 +2636,7 @@ static void gtk_list_store_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer parser_data) { SubParserData *data = (SubParserData*)parser_data; diff --git a/gtk/gtklockbutton.c b/gtk/gtklockbutton.c index be9ea8d7d4..bdca740d7b 100644 --- a/gtk/gtklockbutton.c +++ b/gtk/gtklockbutton.c @@ -74,9 +74,9 @@ struct _GtkLockButton GPermission *permission; GCancellable *cancellable; - gchar *tooltip_lock; - gchar *tooltip_unlock; - gchar *tooltip_not_authorized; + char *tooltip_lock; + char *tooltip_unlock; + char *tooltip_not_authorized; GIcon *icon_lock; GIcon *icon_unlock; @@ -339,7 +339,7 @@ update_state (GtkLockButton *button) gboolean sensitive; gboolean visible; GIcon *icon; - const gchar *tooltip; + const char *tooltip; if (button->permission) { diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 3d62da6f04..e33e73cd83 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -309,7 +309,7 @@ gtk_get_interface_age (void) * The returned string is owned by GTK and should not be modified * or freed. */ -const gchar* +const char * gtk_check_version (guint required_major, guint required_minor, guint required_micro) @@ -594,7 +594,7 @@ _gtk_module_has_mixed_deps (GModule *module_to_check) static void do_pre_parse_initialization (void) { - const gchar *env_string; + const char *env_string; double slowdown; if (pre_initialized) @@ -965,7 +965,7 @@ gtk_get_locale_direction (void) * Do *not* translate it to "predefinito:LTR", if it * it isn't default:LTR or default:RTL it will not work */ - gchar *e = _("default:LTR"); + char *e = _("default:LTR"); GtkTextDirection dir = GTK_TEXT_DIR_LTR; if (g_strcmp0 (e, "default:RTL") == 0) diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h index ba1e1ac9f8..9191011ec9 100644 --- a/gtk/gtkmain.h +++ b/gtk/gtkmain.h @@ -64,7 +64,7 @@ GDK_AVAILABLE_IN_ALL guint gtk_get_interface_age (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -const gchar* gtk_check_version (guint required_major, +const char * gtk_check_version (guint required_major, guint required_minor, guint required_micro); diff --git a/gtk/gtkmarshalers.list b/gtk/gtkmarshalers.list index d673c2e7d5..3fe5fc51da 100644 --- a/gtk/gtkmarshalers.list +++ b/gtk/gtkmarshalers.list @@ -4,7 +4,7 @@ # parameters. if VOID is used as the parameter # list, no additional parameters may be present. # BOOLEAN for boolean types (gboolean) -# CHAR for signed char types (gchar) +# CHAR for signed char types (char) # UCHAR for unsigned char types (guchar) # INT for signed integer types (int) # UINT for unsigned integer types (guint) @@ -14,7 +14,7 @@ # FLAGS for flag enumeration types (guint) # FLOAT for single-precision float types (gfloat) # DOUBLE for double-precision float types (gdouble) -# STRING for string types (gchar*) +# STRING for string types (char *) # BOXED for boxed (anonymous but reference counted) types (GBoxed*) # POINTER for anonymous pointer types (gpointer) # OBJECT for GObject or derived types (GObject*) diff --git a/gtk/gtkmediastream.c b/gtk/gtkmediastream.c index 60a1a6d1c9..120d4a656f 100644 --- a/gtk/gtkmediastream.c +++ b/gtk/gtkmediastream.c @@ -1179,7 +1179,7 @@ void gtk_media_stream_error (GtkMediaStream *self, GQuark domain, int code, - const gchar *format, + const char *format, ...) { GError *error; @@ -1213,7 +1213,7 @@ void gtk_media_stream_error_valist (GtkMediaStream *self, GQuark domain, int code, - const gchar *format, + const char *format, va_list args) { GError *error; diff --git a/gtk/gtkmediastream.h b/gtk/gtkmediastream.h index 72d7f4ddd1..8c5a0c47c8 100644 --- a/gtk/gtkmediastream.h +++ b/gtk/gtkmediastream.h @@ -141,13 +141,13 @@ GDK_AVAILABLE_IN_ALL void gtk_media_stream_error (GtkMediaStream *self, GQuark domain, int code, - const gchar *format, + const char *format, ...) G_GNUC_PRINTF (4, 5); GDK_AVAILABLE_IN_ALL void gtk_media_stream_error_valist (GtkMediaStream *self, GQuark domain, int code, - const gchar *format, + const char *format, va_list args) G_GNUC_PRINTF (4, 0); G_END_DECLS diff --git a/gtk/gtkmenusectionbox.c b/gtk/gtkmenusectionbox.c index 01c1a4a8d2..bdcab6c80c 100644 --- a/gtk/gtkmenusectionbox.c +++ b/gtk/gtkmenusectionbox.c @@ -66,7 +66,7 @@ static void gtk_menu_section_box_sync_separators (GtkMenuSectionBox *box static void gtk_menu_section_box_new_submenu (GtkMenuTrackerItem *item, GtkMenuSectionBox *toplevel, GtkWidget *focus, - const gchar *name); + const char *name); static GtkWidget * gtk_menu_section_box_new_section (GtkMenuTrackerItem *item, GtkMenuSectionBox *parent); @@ -325,7 +325,7 @@ gtk_menu_section_box_insert_func (GtkMenuTrackerItem *item, { GtkWidget *stack = NULL; GtkWidget *parent = NULL; - gchar *name; + char *name; widget = g_object_new (GTK_TYPE_MODEL_BUTTON, "menu-name", gtk_menu_tracker_item_get_label (item), @@ -517,7 +517,7 @@ static void gtk_menu_section_box_new_submenu (GtkMenuTrackerItem *item, GtkMenuSectionBox *toplevel, GtkWidget *focus, - const gchar *name) + const char *name) { GtkMenuSectionBox *box; GtkWidget *button; @@ -556,9 +556,9 @@ gtk_menu_section_box_new_section (GtkMenuTrackerItem *item, GtkMenuSectionBox *parent) { GtkMenuSectionBox *box; - const gchar *label; - const gchar *hint; - const gchar *text_direction; + const char *label; + const char *hint; + const char *text_direction; box = g_object_new (GTK_TYPE_MENU_SECTION_BOX, NULL); box->indicators = g_object_ref (parent->indicators); diff --git a/gtk/gtkmenutracker.c b/gtk/gtkmenutracker.c index ba3bbfc6aa..da87bcf1d0 100644 --- a/gtk/gtkmenutracker.c +++ b/gtk/gtkmenutracker.c @@ -73,7 +73,7 @@ struct _GtkMenuTrackerSection { gpointer model; /* may be a GtkMenuTrackerItem or a GMenuModel */ GSList *items; - gchar *action_namespace; + char *action_namespace; guint separator_label : 1; guint with_separators : 1; @@ -88,7 +88,7 @@ static GtkMenuTrackerSection * gtk_menu_tracker_section_new (GtkMenuTracker gboolean with_separators, gboolean separator_label, int offset, - const gchar *action_namespace); + const char *action_namespace); static void gtk_menu_tracker_section_free (GtkMenuTrackerSection *section); static GtkMenuTrackerSection * @@ -318,7 +318,7 @@ gtk_menu_tracker_add_items (GtkMenuTracker *tracker, if (submenu != NULL && tracker->merge_sections) { GtkMenuTrackerSection *subsection; - gchar *action_namespace = NULL; + char *action_namespace = NULL; gboolean has_label; has_label = g_menu_model_get_item_attribute (model, position + n_items, @@ -329,7 +329,7 @@ gtk_menu_tracker_add_items (GtkMenuTracker *tracker, if (section->action_namespace) { - gchar *namespace; + char *namespace; namespace = g_strjoin (".", section->action_namespace, action_namespace, NULL); subsection = gtk_menu_tracker_section_new (tracker, submenu, FALSE, has_label, offset, namespace); @@ -478,7 +478,7 @@ gtk_menu_tracker_section_new (GtkMenuTracker *tracker, gboolean with_separators, gboolean separator_label, int offset, - const gchar *action_namespace) + const char *action_namespace) { GtkMenuTrackerSection *section; @@ -555,7 +555,7 @@ gtk_menu_tracker_new (GtkActionObservable *observable, gboolean with_separators, gboolean merge_sections, gboolean mac_os_mode, - const gchar *action_namespace, + const char *action_namespace, GtkMenuTrackerInsertFunc insert_func, GtkMenuTrackerRemoveFunc remove_func, gpointer user_data) @@ -578,7 +578,7 @@ gtk_menu_tracker_new (GtkActionObservable *observable, GtkMenuTracker * gtk_menu_tracker_new_for_item_link (GtkMenuTrackerItem *item, - const gchar *link_name, + const char *link_name, gboolean merge_sections, gboolean mac_os_mode, GtkMenuTrackerInsertFunc insert_func, @@ -587,7 +587,7 @@ gtk_menu_tracker_new_for_item_link (GtkMenuTrackerItem *item, { GtkMenuTracker *tracker; GMenuModel *submenu; - gchar *namespace; + char *namespace; submenu = _gtk_menu_tracker_item_get_link (item, link_name); namespace = _gtk_menu_tracker_item_get_link_namespace (item); diff --git a/gtk/gtkmenutrackeritem.c b/gtk/gtkmenutrackeritem.c index 2cf2effa8a..6390ba8a64 100644 --- a/gtk/gtkmenutrackeritem.c +++ b/gtk/gtkmenutrackeritem.c @@ -85,8 +85,8 @@ struct _GtkMenuTrackerItem GObject parent_instance; GtkActionObservable *observable; - gchar *action_namespace; - gchar *action_and_target; + char *action_namespace; + char *action_and_target; GMenuItem *item; GtkMenuTrackerItemRole role : 4; guint is_separator : 1; @@ -289,7 +289,7 @@ gtk_menu_tracker_item_update_visibility (GtkMenuTrackerItem *self) static void gtk_menu_tracker_item_action_added (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, const GVariantType *parameter_type, gboolean enabled, GVariant *state) @@ -362,7 +362,7 @@ gtk_menu_tracker_item_action_added (GtkActionObserver *observer, static void gtk_menu_tracker_item_action_enabled_changed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, gboolean enabled) { GtkMenuTrackerItem *self = GTK_MENU_TRACKER_ITEM (observer); @@ -385,7 +385,7 @@ gtk_menu_tracker_item_action_enabled_changed (GtkActionObserver *observer, static void gtk_menu_tracker_item_action_state_changed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, + const char *action_name, GVariant *state) { GtkMenuTrackerItem *self = GTK_MENU_TRACKER_ITEM (observer); @@ -419,7 +419,7 @@ gtk_menu_tracker_item_action_state_changed (GtkActionObserver *observer, static void gtk_menu_tracker_item_action_removed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name) + const char *action_name) { GtkMenuTrackerItem *self = GTK_MENU_TRACKER_ITEM (observer); gboolean was_sensitive, was_toggled; @@ -461,8 +461,8 @@ gtk_menu_tracker_item_action_removed (GtkActionObserver *observer, static void gtk_menu_tracker_item_primary_accel_changed (GtkActionObserver *observer, GtkActionObservable *observable, - const gchar *action_name, - const gchar *action_and_target) + const char *action_name, + const char *action_and_target) { GtkMenuTrackerItem *self = GTK_MENU_TRACKER_ITEM (observer); @@ -485,12 +485,12 @@ _gtk_menu_tracker_item_new (GtkActionObservable *observable, GMenuModel *model, int item_index, gboolean mac_os_mode, - const gchar *action_namespace, + const char *action_namespace, gboolean is_separator) { GtkMenuTrackerItem *self; - const gchar *action_name; - const gchar *hidden_when; + const char *action_name; + const char *hidden_when; g_return_val_if_fail (GTK_IS_ACTION_OBSERVABLE (observable), NULL); g_return_val_if_fail (G_IS_MENU_MODEL (model), NULL); @@ -601,7 +601,7 @@ gtk_menu_tracker_item_get_is_separator (GtkMenuTrackerItem *self) */ gboolean gtk_menu_tracker_item_get_has_link (GtkMenuTrackerItem *self, - const gchar *link_name) + const char *link_name) { GMenuModel *link; @@ -616,10 +616,10 @@ gtk_menu_tracker_item_get_has_link (GtkMenuTrackerItem *self, return FALSE; } -const gchar * +const char * gtk_menu_tracker_item_get_label (GtkMenuTrackerItem *self) { - const gchar *label = NULL; + const char *label = NULL; g_menu_item_get_attribute (self->item, G_MENU_ATTRIBUTE_LABEL, "&s", &label); @@ -688,10 +688,10 @@ gtk_menu_tracker_item_get_toggled (GtkMenuTrackerItem *self) return self->toggled; } -const gchar * +const char * gtk_menu_tracker_item_get_accel (GtkMenuTrackerItem *self) { - const gchar *accel; + const char *accel; if (!self->action_and_target) return NULL; @@ -705,30 +705,30 @@ gtk_menu_tracker_item_get_accel (GtkMenuTrackerItem *self) return gtk_action_muxer_get_primary_accel (GTK_ACTION_MUXER (self->observable), self->action_and_target); } -const gchar * +const char * gtk_menu_tracker_item_get_special (GtkMenuTrackerItem *self) { - const gchar *special = NULL; + const char *special = NULL; g_menu_item_get_attribute (self->item, "x-gtk-private-special", "&s", &special); return special; } -const gchar * +const char * gtk_menu_tracker_item_get_display_hint (GtkMenuTrackerItem *self) { - const gchar *display_hint = NULL; + const char *display_hint = NULL; g_menu_item_get_attribute (self->item, "display-hint", "&s", &display_hint); return display_hint; } -const gchar * +const char * gtk_menu_tracker_item_get_text_direction (GtkMenuTrackerItem *self) { - const gchar *text_direction = NULL; + const char *text_direction = NULL; g_menu_item_get_attribute (self->item, "text-direction", "&s", &text_direction); @@ -737,15 +737,15 @@ gtk_menu_tracker_item_get_text_direction (GtkMenuTrackerItem *self) GMenuModel * _gtk_menu_tracker_item_get_link (GtkMenuTrackerItem *self, - const gchar *link_name) + const char *link_name) { return g_menu_item_get_link (self->item, link_name); } -gchar * +char * _gtk_menu_tracker_item_get_link_namespace (GtkMenuTrackerItem *self) { - const gchar *namespace; + const char *namespace; if (g_menu_item_get_attribute (self->item, "action-namespace", "&s", &namespace)) { @@ -784,7 +784,7 @@ gtk_menu_tracker_item_set_submenu_shown (GtkMenuTrackerItem *self, void gtk_menu_tracker_item_activated (GtkMenuTrackerItem *self) { - const gchar *action_name; + const char *action_name; GVariant *action_target; g_return_if_fail (GTK_IS_MENU_TRACKER_ITEM (self)); @@ -804,7 +804,7 @@ gtk_menu_tracker_item_activated (GtkMenuTrackerItem *self) typedef struct { GtkMenuTrackerItem *item; - gchar *submenu_action; + char *submenu_action; gboolean first_time; } GtkMenuTrackerOpener; @@ -855,7 +855,7 @@ gtk_menu_tracker_opener_update (GtkMenuTrackerOpener *opener) static void gtk_menu_tracker_opener_added (GActionGroup *group, - const gchar *action_name, + const char *action_name, gpointer user_data) { GtkMenuTrackerOpener *opener = user_data; @@ -866,7 +866,7 @@ gtk_menu_tracker_opener_added (GActionGroup *group, static void gtk_menu_tracker_opener_removed (GActionGroup *action_group, - const gchar *action_name, + const char *action_name, gpointer user_data) { GtkMenuTrackerOpener *opener = user_data; @@ -877,7 +877,7 @@ gtk_menu_tracker_opener_removed (GActionGroup *action_group, static void gtk_menu_tracker_opener_changed (GActionGroup *action_group, - const gchar *action_name, + const char *action_name, GVariant *new_state, gpointer user_data) { @@ -909,7 +909,7 @@ gtk_menu_tracker_opener_free (gpointer data) static GtkMenuTrackerOpener * gtk_menu_tracker_opener_new (GtkMenuTrackerItem *item, - const gchar *submenu_action) + const char *submenu_action) { GtkMenuTrackerOpener *opener; @@ -935,7 +935,7 @@ void gtk_menu_tracker_item_request_submenu_shown (GtkMenuTrackerItem *self, gboolean shown) { - const gchar *submenu_action; + const char *submenu_action; gboolean has_submenu_action; if (shown == self->submenu_requested) diff --git a/gtk/gtkmenutrackeritemprivate.h b/gtk/gtkmenutrackeritemprivate.h index 2b81866314..a3c9164053 100644 --- a/gtk/gtkmenutrackeritemprivate.h +++ b/gtk/gtkmenutrackeritemprivate.h @@ -46,23 +46,23 @@ GtkMenuTrackerItem * _gtk_menu_tracker_item_new (GtkActi GMenuModel *model, int item_index, gboolean mac_os_mode, - const gchar *action_namespace, + const char *action_namespace, gboolean is_separator); -const gchar * gtk_menu_tracker_item_get_special (GtkMenuTrackerItem *self); +const char * gtk_menu_tracker_item_get_special (GtkMenuTrackerItem *self); -const gchar * gtk_menu_tracker_item_get_display_hint (GtkMenuTrackerItem *self); +const char * gtk_menu_tracker_item_get_display_hint (GtkMenuTrackerItem *self); -const gchar * gtk_menu_tracker_item_get_text_direction (GtkMenuTrackerItem *self); +const char * gtk_menu_tracker_item_get_text_direction (GtkMenuTrackerItem *self); GtkActionObservable * _gtk_menu_tracker_item_get_observable (GtkMenuTrackerItem *self); gboolean gtk_menu_tracker_item_get_is_separator (GtkMenuTrackerItem *self); gboolean gtk_menu_tracker_item_get_has_link (GtkMenuTrackerItem *self, - const gchar *link_name); + const char *link_name); -const gchar * gtk_menu_tracker_item_get_label (GtkMenuTrackerItem *self); +const char * gtk_menu_tracker_item_get_label (GtkMenuTrackerItem *self); GIcon * gtk_menu_tracker_item_get_icon (GtkMenuTrackerItem *self); @@ -74,12 +74,12 @@ GtkMenuTrackerItemRole gtk_menu_tracker_item_get_role (GtkMenu gboolean gtk_menu_tracker_item_get_toggled (GtkMenuTrackerItem *self); -const gchar * gtk_menu_tracker_item_get_accel (GtkMenuTrackerItem *self); +const char * gtk_menu_tracker_item_get_accel (GtkMenuTrackerItem *self); GMenuModel * _gtk_menu_tracker_item_get_link (GtkMenuTrackerItem *self, - const gchar *link_name); + const char *link_name); -gchar * _gtk_menu_tracker_item_get_link_namespace (GtkMenuTrackerItem *self); +char * _gtk_menu_tracker_item_get_link_namespace (GtkMenuTrackerItem *self); gboolean gtk_menu_tracker_item_may_disappear (GtkMenuTrackerItem *self); diff --git a/gtk/gtkmenutrackerprivate.h b/gtk/gtkmenutrackerprivate.h index 92a0f47739..9d2602cbfb 100644 --- a/gtk/gtkmenutrackerprivate.h +++ b/gtk/gtkmenutrackerprivate.h @@ -37,13 +37,13 @@ GtkMenuTracker * gtk_menu_tracker_new (GtkActi gboolean with_separators, gboolean merge_sections, gboolean mac_os_mode, - const gchar *action_namespace, + const char *action_namespace, GtkMenuTrackerInsertFunc insert_func, GtkMenuTrackerRemoveFunc remove_func, gpointer user_data); GtkMenuTracker * gtk_menu_tracker_new_for_item_link (GtkMenuTrackerItem *item, - const gchar *link_name, + const char *link_name, gboolean merge_sections, gboolean mac_os_mode, GtkMenuTrackerInsertFunc insert_func, diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c index b3c9278146..0f4b49f20d 100644 --- a/gtk/gtkmessagedialog.c +++ b/gtk/gtkmessagedialog.c @@ -287,7 +287,7 @@ setup_type (GtkMessageDialog *dialog, GtkMessageType type) { GtkMessageDialogPrivate *priv = gtk_message_dialog_get_instance_private (dialog); - const gchar *name = NULL; + const char *name = NULL; AtkObject *atk_obj; if (priv->message_type == type) @@ -337,7 +337,7 @@ update_title (GObject *dialog, GParamSpec *pspec, GtkWidget *label) { - const gchar *title; + const char *title; title = gtk_window_get_title (GTK_WINDOW (dialog)); gtk_label_set_label (GTK_LABEL (label), title); @@ -413,7 +413,7 @@ gtk_message_dialog_set_property (GObject *object, break; case PROP_SECONDARY_TEXT: { - const gchar *txt = g_value_get_string (value); + const char *txt = g_value_get_string (value); if (gtk_label_get_use_markup (GTK_LABEL (priv->secondary_label))) gtk_label_set_markup (GTK_LABEL (priv->secondary_label), txt); @@ -510,12 +510,12 @@ gtk_message_dialog_new (GtkWindow *parent, GtkDialogFlags flags, GtkMessageType type, GtkButtonsType buttons, - const gchar *message_format, + const char *message_format, ...) { GtkWidget *widget; GtkDialog *dialog; - gchar* msg = NULL; + char * msg = NULL; va_list args; g_return_val_if_fail (parent == NULL || GTK_IS_WINDOW (parent), NULL); @@ -593,12 +593,12 @@ gtk_message_dialog_new_with_markup (GtkWindow *parent, GtkDialogFlags flags, GtkMessageType type, GtkButtonsType buttons, - const gchar *message_format, + const char *message_format, ...) { GtkWidget *widget; va_list args; - gchar *msg = NULL; + char *msg = NULL; g_return_val_if_fail (parent == NULL || GTK_IS_WINDOW (parent), NULL); @@ -628,7 +628,7 @@ gtk_message_dialog_new_with_markup (GtkWindow *parent, **/ void gtk_message_dialog_set_markup (GtkMessageDialog *message_dialog, - const gchar *str) + const char *str) { GtkMessageDialogPrivate *priv = gtk_message_dialog_get_instance_private (message_dialog); @@ -649,12 +649,12 @@ gtk_message_dialog_set_markup (GtkMessageDialog *message_dialog, */ void gtk_message_dialog_format_secondary_text (GtkMessageDialog *message_dialog, - const gchar *message_format, + const char *message_format, ...) { GtkMessageDialogPrivate *priv = gtk_message_dialog_get_instance_private (message_dialog); va_list args; - gchar *msg = NULL; + char *msg = NULL; g_return_if_fail (GTK_IS_MESSAGE_DIALOG (message_dialog)); @@ -695,7 +695,7 @@ gtk_message_dialog_format_secondary_text (GtkMessageDialog *message_dialog, * to escape it. * |[ - * gchar *msg; + * char *msg; * * msg = g_markup_printf_escaped (message_format, ...); * gtk_message_dialog_format_secondary_markup (message_dialog, @@ -705,12 +705,12 @@ gtk_message_dialog_format_secondary_text (GtkMessageDialog *message_dialog, */ void gtk_message_dialog_format_secondary_markup (GtkMessageDialog *message_dialog, - const gchar *message_format, + const char *message_format, ...) { GtkMessageDialogPrivate *priv = gtk_message_dialog_get_instance_private (message_dialog); va_list args; - gchar *msg = NULL; + char *msg = NULL; g_return_if_fail (GTK_IS_MESSAGE_DIALOG (message_dialog)); diff --git a/gtk/gtkmessagedialog.h b/gtk/gtkmessagedialog.h index ddfca46465..4a1ababd74 100644 --- a/gtk/gtkmessagedialog.h +++ b/gtk/gtkmessagedialog.h @@ -82,7 +82,7 @@ GtkWidget* gtk_message_dialog_new (GtkWindow *parent, GtkDialogFlags flags, GtkMessageType type, GtkButtonsType buttons, - const gchar *message_format, + const char *message_format, ...) G_GNUC_PRINTF (5, 6); GDK_AVAILABLE_IN_ALL @@ -90,21 +90,21 @@ GtkWidget* gtk_message_dialog_new_with_markup (GtkWindow *parent, GtkDialogFlags flags, GtkMessageType type, GtkButtonsType buttons, - const gchar *message_format, + const char *message_format, ...) G_GNUC_PRINTF (5, 6); GDK_AVAILABLE_IN_ALL void gtk_message_dialog_set_markup (GtkMessageDialog *message_dialog, - const gchar *str); + const char *str); GDK_AVAILABLE_IN_ALL void gtk_message_dialog_format_secondary_text (GtkMessageDialog *message_dialog, - const gchar *message_format, + const char *message_format, ...) G_GNUC_PRINTF (2, 3); GDK_AVAILABLE_IN_ALL void gtk_message_dialog_format_secondary_markup (GtkMessageDialog *message_dialog, - const gchar *message_format, + const char *message_format, ...) G_GNUC_PRINTF (2, 3); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c index d6147d6327..c577accb6b 100644 --- a/gtk/gtkmodelbutton.c +++ b/gtk/gtkmodelbutton.c @@ -171,7 +171,7 @@ struct _GtkModelButton GtkWidget *end_indicator; GtkWidget *popover; GtkActionHelper *action_helper; - gchar *menu_name; + char *menu_name; GtkButtonRole role; GtkSizeGroup *indicators; char *accel; @@ -458,8 +458,8 @@ update_node_name (GtkModelButton *self) { AtkObject *accessible; AtkRole a11y_role; - const gchar *start_name; - const gchar *end_name; + const char *start_name; + const char *end_name; accessible = gtk_widget_get_accessible (GTK_WIDGET (self)); switch (self->role) @@ -613,7 +613,7 @@ gtk_model_button_set_icon (GtkModelButton *self, static void gtk_model_button_set_text (GtkModelButton *button, - const gchar *text) + const char *text) { gtk_label_set_text_with_mnemonic (GTK_LABEL (button->label), text ? text : ""); @@ -650,7 +650,7 @@ gtk_model_button_set_active (GtkModelButton *button, static void gtk_model_button_set_menu_name (GtkModelButton *button, - const gchar *menu_name) + const char *menu_name) { g_free (button->menu_name); button->menu_name = g_strdup (menu_name); diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c index c6d81cbd4b..9e487a64d6 100644 --- a/gtk/gtkmodules.c +++ b/gtk/gtkmodules.c @@ -101,14 +101,14 @@ split_file_list (const char *str) return files; } -static gchar ** +static char ** get_module_path (void) { - const gchar *module_path_env; - const gchar *exe_prefix; - gchar *module_path; - gchar *default_dir; - static gchar **result = NULL; + const char *module_path_env; + const char *exe_prefix; + char *module_path; + char *default_dir; + static char **result = NULL; if (result) return result; @@ -144,18 +144,18 @@ get_module_path (void) * * Returns: the search path for the module type. Free with g_strfreev(). **/ -gchar ** -_gtk_get_module_path (const gchar *type) +char ** +_gtk_get_module_path (const char *type) { - gchar **paths = get_module_path(); - gchar **path; - gchar **result; + char **paths = get_module_path(); + char **path; + char **result; int count = 0; for (path = paths; *path; path++) count++; - result = g_new (gchar *, count * 4 + 1); + result = g_new (char *, count * 4 + 1); count = 0; for (path = get_module_path (); *path; path++) @@ -165,7 +165,7 @@ _gtk_get_module_path (const gchar *type) for (use_version = TRUE; use_version >= FALSE; use_version--) for (use_host = TRUE; use_host >= FALSE; use_host--) { - gchar *tmp_dir; + char *tmp_dir; if (use_version && use_host) tmp_dir = g_build_filename (*path, GTK_BINARY_VERSION, GTK_HOST, type, NULL); diff --git a/gtk/gtkmodulesprivate.h b/gtk/gtkmodulesprivate.h index b02455d765..c3a1ea59ab 100644 --- a/gtk/gtkmodulesprivate.h +++ b/gtk/gtkmodulesprivate.h @@ -27,7 +27,7 @@ G_BEGIN_DECLS -gchar ** _gtk_get_module_path (const gchar *type); +char ** _gtk_get_module_path (const char *type); G_END_DECLS diff --git a/gtk/gtkmountoperation-stub.c b/gtk/gtkmountoperation-stub.c index be8472a016..afcf474440 100644 --- a/gtk/gtkmountoperation-stub.c +++ b/gtk/gtkmountoperation-stub.c @@ -45,8 +45,8 @@ gboolean _gtk_mount_operation_lookup_info (GtkMountOperationLookupContext *context, GPid pid, int size_pixels, - gchar **out_name, - gchar **out_command_line, + char **out_name, + char **out_command_line, GdkTexture **out_texture) { return FALSE; diff --git a/gtk/gtkmountoperation-x11.c b/gtk/gtkmountoperation-x11.c index 5d2f10c01b..0dd2ae7480 100644 --- a/gtk/gtkmountoperation-x11.c +++ b/gtk/gtkmountoperation-x11.c @@ -131,7 +131,7 @@ get_utf8_property (GdkDisplay *display, int format; gulong nitems; gulong bytes_after; - gchar *val; + char *val; int err, result; char *retval; Atom utf8_string; @@ -588,9 +588,9 @@ static GPid pid_get_parent (GPid pid) { GPid ppid; - gchar **tokens; - gchar *stat_filename; - gchar *stat_contents; + char **tokens; + char *stat_filename; + char *stat_contents; gsize stat_len; ppid = 0; @@ -616,7 +616,7 @@ pid_get_parent (GPid pid) { if (g_str_has_prefix (tokens[n], "PPid:")) { - gchar *endp; + char *endp; endp = NULL; ppid = strtoll (tokens[n] + sizeof "PPid:" - 1, &endp, 10); @@ -641,16 +641,16 @@ pid_get_parent (GPid pid) return ppid; } -static gchar * +static char * pid_get_env (GPid pid, - const gchar *key) + const char *key) { - gchar *ret; - gchar *env_filename; - gchar *env; + char *ret; + char *env_filename; + char *env; gsize env_len; gsize key_len; - gchar *end; + char *end; ret = NULL; @@ -676,7 +676,7 @@ pid_get_env (GPid pid, ret = g_strdup (env + n + key_len + 1); /* skip invalid UTF-8 */ - if (!g_utf8_validate (ret, -1, (const gchar **) &end)) + if (!g_utf8_validate (ret, -1, (const char **) &end)) *end = '\0'; break; } @@ -692,14 +692,14 @@ pid_get_env (GPid pid, return ret; } -static gchar * +static char * pid_get_command_line (GPid pid) { - gchar *cmdline_filename; - gchar *cmdline_contents; + char *cmdline_filename; + char *cmdline_contents; gsize cmdline_len; guint n; - gchar *end; + char *end; cmdline_contents = NULL; @@ -718,7 +718,7 @@ pid_get_command_line (GPid pid) } /* skip invalid UTF-8 */ - if (!g_utf8_validate (cmdline_contents, -1, (const gchar **) &end)) + if (!g_utf8_validate (cmdline_contents, -1, (const char **) &end)) *end = '\0'; out: @@ -765,8 +765,8 @@ out: return ppid; } -static gchar * -pid_get_env (GPid pid, const gchar *key) +static char * +pid_get_env (GPid pid, const char *key) { size_t len; char **strs; @@ -793,7 +793,7 @@ pid_get_env (GPid pid, const gchar *key) ret = g_strdup (strs[i] + key_len + 1); /* skip invalid UTF-8 */ - if (!g_utf8_validate (ret, -1, (const gchar **) &end)) + if (!g_utf8_validate (ret, -1, (const char **) &end)) *end = '\0'; break; } @@ -804,7 +804,7 @@ pid_get_env (GPid pid, const gchar *key) return ret; } -static gchar * +static char * pid_get_command_line (GPid pid) { size_t len; @@ -825,7 +825,7 @@ pid_get_command_line (GPid pid) ret = g_strjoinv (" ", strs); /* skip invalid UTF-8 */ - if (!g_utf8_validate (ret, -1, (const gchar **) &end)) + if (!g_utf8_validate (ret, -1, (const char **) &end)) *end = '\0'; g_free (strs); @@ -842,14 +842,14 @@ pid_get_parent (GPid pid) return 0; } -static gchar * +static char * pid_get_env (GPid pid, - const gchar *key) + const char *key) { return NULL; } -static gchar * +static char * pid_get_command_line (GPid pid) { return NULL; @@ -859,26 +859,26 @@ pid_get_command_line (GPid pid) /* ---------------------------------------------------------------------------------------------------- */ -static gchar * +static char * get_name_for_window_with_pid (GtkMountOperationLookupContext *context, GPid pid) { Window window; Window windowid_window; - gchar *ret; + char *ret; ret = NULL; window = GPOINTER_TO_INT (g_hash_table_lookup (context->pid_to_window, GINT_TO_POINTER (pid))); if (window == None) { - gchar *windowid_value; + char *windowid_value; /* check for $WINDOWID (set by terminals) and see if we can get the title that way */ windowid_value = pid_get_env (pid, "WINDOWID"); if (windowid_value != NULL) { - gchar *endp; + char *endp; endp = NULL; windowid_window = (Window) g_ascii_strtoll (windowid_value, &endp, 10); @@ -978,7 +978,7 @@ get_texture_for_window_with_pid (GtkMountOperationLookupContext *context, /* ---------------------------------------------------------------------------------------------------- */ -static const gchar *well_known_commands[] = +static const char *well_known_commands[] = { /* translators: this string is a name for the 'less' command */ "less", N_("Terminal Pager"), @@ -993,8 +993,8 @@ gboolean _gtk_mount_operation_lookup_info (GtkMountOperationLookupContext *context, GPid pid, int size_pixels, - gchar **out_name, - gchar **out_command_line, + char **out_name, + char **out_command_line, GdkTexture **out_texture) { g_return_val_if_fail (out_name != NULL && *out_name == NULL, FALSE); @@ -1024,8 +1024,8 @@ _gtk_mount_operation_lookup_info (GtkMountOperationLookupContext *context, strlen (*out_command_line) > 0 && (*out_command_line)[0] != ' ') { guint n; - gchar *s; - gchar *p; + char *s; + char *p; /* find the first character after the first argument */ s = strchr (*out_command_line, ' '); diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c index a54d109f58..20dc09b097 100644 --- a/gtk/gtkmountoperation.c +++ b/gtk/gtkmountoperation.c @@ -197,7 +197,7 @@ gtk_mount_operation_class_init (GtkMountOperationClass *klass) static void gtk_mount_operation_init (GtkMountOperation *operation) { - gchar *name_owner; + char *name_owner; operation->priv = gtk_mount_operation_get_instance_private (operation); @@ -375,7 +375,7 @@ pw_dialog_got_response (GtkDialog *dialog, if (text && strlen (text) > 0) { guint64 pim; - gchar *end = NULL; + char *end = NULL; errno = 0; pim = g_ascii_strtoull (text, &end, 10); @@ -421,7 +421,7 @@ static gboolean pim_entry_is_valid (GtkWidget *entry_widget) { const char *text; - gchar *end = NULL; + char *end = NULL; guint64 pim; if (entry_widget == NULL) @@ -561,9 +561,9 @@ table_add_entry (GtkMountOperation *operation, static void gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation, - const gchar *message, - const gchar *default_user, - const gchar *default_domain) + const char *message, + const char *default_user, + const char *default_domain) { GtkMountOperationPrivate *priv; GtkWidget *widget; @@ -575,8 +575,8 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation, GtkWidget *content_area, *action_area; gboolean can_anonymous; guint rows; - gchar *primary; - const gchar *secondary; + char *primary; + const char *secondary; PangoAttrList *attrs; gboolean use_header; @@ -826,7 +826,7 @@ call_password_proxy_cb (GObject *source, GMountOperationResult result; GVariant *result_details; GVariantIter iter; - const gchar *key; + const char *key; GVariant *value; GError *error = NULL; @@ -867,7 +867,7 @@ gtk_mount_operation_ask_password_do_proxy (GtkMountOperation *operation, const char *default_user, const char *default_domain) { - gchar id[255]; + char id[255]; g_sprintf(id, "GtkMountOperation%p", operation); operation->priv->handler_showing = TRUE; @@ -999,7 +999,7 @@ call_question_proxy_cb (GObject *source, GMountOperationResult result; GVariant *result_details; GVariantIter iter; - const gchar *key; + const char *key; GVariant *value; GError *error = NULL; @@ -1031,7 +1031,7 @@ gtk_mount_operation_ask_question_do_proxy (GtkMountOperation *operation, const char *message, const char *choices[]) { - gchar id[255]; + char id[255]; g_sprintf(id, "GtkMountOperation%p", operation); operation->priv->handler_showing = TRUE; @@ -1186,10 +1186,10 @@ add_pid_to_process_list_store (GtkMountOperation *mount_operation, GtkListStore *list_store, GPid pid) { - gchar *command_line; - gchar *name; + char *command_line; + char *name; GdkTexture *texture; - gchar *markup; + char *markup; GtkTreeIter iter; name = NULL; @@ -1514,7 +1514,7 @@ create_show_processes_dialog (GtkMountOperation *op, GtkTreeViewColumn *column; GtkCellRenderer *renderer; GtkListStore *list_store; - gchar *s; + char *s; gboolean use_header; GtkGesture *gesture; GtkEventController *controller; @@ -1652,7 +1652,7 @@ call_processes_proxy_cb (GObject *source, GMountOperationResult result; GVariant *result_details; GVariantIter iter; - const gchar *key; + const char *key; GVariant *value; GError *error = NULL; @@ -1691,7 +1691,7 @@ gtk_mount_operation_show_processes_do_proxy (GtkMountOperation *operation, GArray *processes, const char *choices[]) { - gchar id[255]; + char id[255]; g_sprintf(id, "GtkMountOperation%p", operation); operation->priv->handler_showing = TRUE; diff --git a/gtk/gtkmountoperationprivate.h b/gtk/gtkmountoperationprivate.h index 7750946368..522970772c 100644 --- a/gtk/gtkmountoperationprivate.h +++ b/gtk/gtkmountoperationprivate.h @@ -38,8 +38,8 @@ GtkMountOperationLookupContext *_gtk_mount_operation_lookup_context_get (GdkDis gboolean _gtk_mount_operation_lookup_info (GtkMountOperationLookupContext *context, GPid pid, int size_pixels, - gchar **out_name, - gchar **out_command_line, + char **out_name, + char **out_command_line, GdkTexture **out_texture); void _gtk_mount_operation_lookup_context_free (GtkMountOperationLookupContext *context); diff --git a/gtk/gtkmultifilter.c b/gtk/gtkmultifilter.c index 4fb5e9af77..922b8fb868 100644 --- a/gtk/gtkmultifilter.c +++ b/gtk/gtkmultifilter.c @@ -103,7 +103,7 @@ static void gtk_multi_filter_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_FILTER (child)) gtk_multi_filter_append (GTK_MULTI_FILTER (buildable), g_object_ref (GTK_FILTER (child))); diff --git a/gtk/gtkmultisorter.c b/gtk/gtkmultisorter.c index d25753c6e1..bbdaf13cc6 100644 --- a/gtk/gtkmultisorter.c +++ b/gtk/gtkmultisorter.c @@ -224,7 +224,7 @@ static void gtk_multi_sorter_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_SORTER (child)) gtk_multi_sorter_append (GTK_MULTI_SORTER (buildable), g_object_ref (GTK_SORTER (child))); diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index b0c6cacedb..a96e704475 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -897,7 +897,7 @@ static void gtk_notebook_buildable_init (GtkBuildableIface *iface); static void gtk_notebook_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type); + const char *type); static void gtk_notebook_gesture_pressed (GtkGestureClick *gesture, int n_press, @@ -1461,7 +1461,7 @@ static void gtk_notebook_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { GtkNotebook *notebook = GTK_NOTEBOOK (buildable); @@ -6439,7 +6439,7 @@ gtk_notebook_set_tab_label (GtkNotebook *notebook, if (notebook->show_tabs) { - gchar string[32]; + char string[32]; g_snprintf (string, sizeof(string), _("Page %u"), g_list_position (notebook->children, list)); @@ -6480,7 +6480,7 @@ gtk_notebook_set_tab_label (GtkNotebook *notebook, void gtk_notebook_set_tab_label_text (GtkNotebook *notebook, GtkWidget *child, - const gchar *tab_text) + const char *tab_text) { GtkWidget *tab_label = NULL; @@ -6503,7 +6503,7 @@ gtk_notebook_set_tab_label_text (GtkNotebook *notebook, * widget is not a #GtkLabel. The string is owned by the widget and must not be * freed. */ -const gchar * +const char * gtk_notebook_get_tab_label_text (GtkNotebook *notebook, GtkWidget *child) { @@ -6605,7 +6605,7 @@ gtk_notebook_set_menu_label (GtkNotebook *notebook, void gtk_notebook_set_menu_label_text (GtkNotebook *notebook, GtkWidget *child, - const gchar *menu_text) + const char *menu_text) { GtkWidget *menu_label = NULL; @@ -6633,7 +6633,7 @@ gtk_notebook_set_menu_label_text (GtkNotebook *notebook, * widget is not a #GtkLabel. The string is owned by the widget and must not be * freed. */ -const gchar * +const char * gtk_notebook_get_menu_label_text (GtkNotebook *notebook, GtkWidget *child) { @@ -6759,7 +6759,7 @@ gtk_notebook_reorder_child (GtkNotebook *notebook, */ void gtk_notebook_set_group_name (GtkNotebook *notebook, - const gchar *group_name) + const char *group_name) { GQuark group; @@ -6783,7 +6783,7 @@ gtk_notebook_set_group_name (GtkNotebook *notebook, * * Returns: (nullable) (transfer none): the group name, or %NULL if none is set */ -const gchar * +const char * gtk_notebook_get_group_name (GtkNotebook *notebook) { g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), NULL); diff --git a/gtk/gtknotebook.h b/gtk/gtknotebook.h index 9d869fe5f8..d02e384e74 100644 --- a/gtk/gtknotebook.h +++ b/gtk/gtknotebook.h @@ -101,9 +101,9 @@ void gtk_notebook_remove_page (GtkNotebook *notebook, GDK_AVAILABLE_IN_ALL void gtk_notebook_set_group_name (GtkNotebook *notebook, - const gchar *group_name); + const char *group_name); GDK_AVAILABLE_IN_ALL -const gchar *gtk_notebook_get_group_name (GtkNotebook *notebook); +const char *gtk_notebook_get_group_name (GtkNotebook *notebook); @@ -177,9 +177,9 @@ void gtk_notebook_set_tab_label (GtkNotebook *notebook, GDK_AVAILABLE_IN_ALL void gtk_notebook_set_tab_label_text (GtkNotebook *notebook, GtkWidget *child, - const gchar *tab_text); + const char *tab_text); GDK_AVAILABLE_IN_ALL -const gchar * gtk_notebook_get_tab_label_text (GtkNotebook *notebook, +const char * gtk_notebook_get_tab_label_text (GtkNotebook *notebook, GtkWidget *child); GDK_AVAILABLE_IN_ALL GtkWidget * gtk_notebook_get_menu_label (GtkNotebook *notebook, @@ -191,10 +191,10 @@ void gtk_notebook_set_menu_label (GtkNotebook *notebook, GDK_AVAILABLE_IN_ALL void gtk_notebook_set_menu_label_text (GtkNotebook *notebook, GtkWidget *child, - const gchar *menu_text); + const char *menu_text); GDK_AVAILABLE_IN_ALL -const gchar * gtk_notebook_get_menu_label_text (GtkNotebook *notebook, - GtkWidget *child); +const char * gtk_notebook_get_menu_label_text (GtkNotebook *notebook, + GtkWidget *child); GDK_AVAILABLE_IN_ALL void gtk_notebook_reorder_child (GtkNotebook *notebook, GtkWidget *child, diff --git a/gtk/gtkoverlay.c b/gtk/gtkoverlay.c index 9444cfd96a..c1c641f012 100644 --- a/gtk/gtkoverlay.c +++ b/gtk/gtkoverlay.c @@ -374,7 +374,7 @@ static void gtk_overlay_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) { diff --git a/gtk/gtkpadcontroller.h b/gtk/gtkpadcontroller.h index 40a6a2fc20..c1163d13c3 100644 --- a/gtk/gtkpadcontroller.h +++ b/gtk/gtkpadcontroller.h @@ -90,8 +90,8 @@ void gtk_pad_controller_set_action (GtkPadController *controller, GtkPadActionType type, int index, int mode, - const gchar *label, - const gchar *action_name); + const char *label, + const char *action_name); G_END_DECLS diff --git a/gtk/gtkpagesetup.c b/gtk/gtkpagesetup.c index b84e7e21e3..94f7748785 100644 --- a/gtk/gtkpagesetup.c +++ b/gtk/gtkpagesetup.c @@ -502,7 +502,7 @@ gtk_page_setup_get_page_height (GtkPageSetup *setup, */ gboolean gtk_page_setup_load_file (GtkPageSetup *setup, - const gchar *file_name, + const char *file_name, GError **error) { gboolean retval = FALSE; @@ -534,7 +534,7 @@ gtk_page_setup_load_file (GtkPageSetup *setup, * Returns: the restored #GtkPageSetup */ GtkPageSetup * -gtk_page_setup_new_from_file (const gchar *file_name, +gtk_page_setup_new_from_file (const char *file_name, GError **error) { GtkPageSetup *setup = gtk_page_setup_new (); @@ -585,7 +585,7 @@ string_to_enum (GType type, gboolean gtk_page_setup_load_key_file (GtkPageSetup *setup, GKeyFile *key_file, - const gchar *group_name, + const char *group_name, GError **error) { GtkPaperSize *paper_size; @@ -671,7 +671,7 @@ out: */ GtkPageSetup * gtk_page_setup_new_from_key_file (GKeyFile *key_file, - const gchar *group_name, + const char *group_name, GError **error) { GtkPageSetup *setup = gtk_page_setup_new (); @@ -756,7 +756,7 @@ enum_to_string (GType type, void gtk_page_setup_to_key_file (GtkPageSetup *setup, GKeyFile *key_file, - const gchar *group_name) + const char *group_name) { GtkPaperSize *paper_size; char *orientation; diff --git a/gtk/gtkpagesetup.h b/gtk/gtkpagesetup.h index a8a7f3e344..7c081e1cd2 100644 --- a/gtk/gtkpagesetup.h +++ b/gtk/gtkpagesetup.h @@ -103,7 +103,7 @@ gdouble gtk_page_setup_get_page_height (GtkPageSetup *setup, /* Saving and restoring page setup */ GDK_AVAILABLE_IN_ALL -GtkPageSetup *gtk_page_setup_new_from_file (const gchar *file_name, +GtkPageSetup *gtk_page_setup_new_from_file (const char *file_name, GError **error); GDK_AVAILABLE_IN_ALL gboolean gtk_page_setup_load_file (GtkPageSetup *setup, @@ -115,17 +115,17 @@ gboolean gtk_page_setup_to_file (GtkPageSetup *setup, GError **error); GDK_AVAILABLE_IN_ALL GtkPageSetup *gtk_page_setup_new_from_key_file (GKeyFile *key_file, - const gchar *group_name, + const char *group_name, GError **error); GDK_AVAILABLE_IN_ALL gboolean gtk_page_setup_load_key_file (GtkPageSetup *setup, GKeyFile *key_file, - const gchar *group_name, + const char *group_name, GError **error); GDK_AVAILABLE_IN_ALL void gtk_page_setup_to_key_file (GtkPageSetup *setup, GKeyFile *key_file, - const gchar *group_name); + const char *group_name); GDK_AVAILABLE_IN_ALL GVariant *gtk_page_setup_to_gvariant (GtkPageSetup *setup); diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c index b45913dc3d..d641151b95 100644 --- a/gtk/gtkpagesetupunixdialog.c +++ b/gtk/gtkpagesetupunixdialog.c @@ -118,7 +118,7 @@ static void paper_size_changed (GtkDropDown *combo_ static void load_print_backends (GtkPageSetupUnixDialog *dialog); -static const gchar common_paper_sizes[][16] = { +static const char common_paper_sizes[][16] = { "na_letter", "na_legal", "iso_a4", @@ -601,13 +601,13 @@ printer_changed_callback (GtkDropDown *combo_box, /* We do this munging because we don't want to show zero digits after the decimal point, and not to many such digits if they are nonzero. I wish printf let you specify max precision for %f... */ -static gchar * +static char * double_to_string (gdouble d, GtkUnit unit) { - gchar *val, *p; + char *val, *p; struct lconv *locale_data; - const gchar *decimal_point; + const char *decimal_point; int decimal_point_len; locale_data = localeconv (); @@ -658,10 +658,10 @@ paper_size_changed (GtkDropDown *combo_box, GtkPageSetup *page_setup, *last_page_setup; guint selected; GtkUnit unit; - gchar *str, *w, *h; - gchar *top, *bottom, *left, *right; + char *str, *w, *h; + char *top, *bottom, *left, *right; GtkLabel *label; - const gchar *unit_str; + const char *unit_str; label = GTK_LABEL (dialog->paper_size_label); @@ -764,7 +764,7 @@ paper_size_changed (GtkDropDown *combo_box, * Returns: the new #GtkPageSetupUnixDialog */ GtkWidget * -gtk_page_setup_unix_dialog_new (const gchar *title, +gtk_page_setup_unix_dialog_new (const char *title, GtkWindow *parent) { GtkWidget *result; @@ -858,7 +858,7 @@ gtk_page_setup_unix_dialog_get_page_setup (GtkPageSetupUnixDialog *dialog) static gboolean set_active_printer (GtkPageSetupUnixDialog *dialog, - const gchar *printer_name) + const char *printer_name) { GtkTreeModel *model; GtkTreeIter iter; @@ -903,7 +903,7 @@ void gtk_page_setup_unix_dialog_set_print_settings (GtkPageSetupUnixDialog *dialog, GtkPrintSettings *print_settings) { - const gchar *format_for_printer; + const char *format_for_printer; if (dialog->print_settings == print_settings) return; diff --git a/gtk/gtkpagesetupunixdialog.h b/gtk/gtkpagesetupunixdialog.h index 06cee9dc32..9d8f6047fb 100644 --- a/gtk/gtkpagesetupunixdialog.h +++ b/gtk/gtkpagesetupunixdialog.h @@ -37,7 +37,7 @@ typedef struct _GtkPageSetupUnixDialog GtkPageSetupUnixDialog; GDK_AVAILABLE_IN_ALL GType gtk_page_setup_unix_dialog_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget * gtk_page_setup_unix_dialog_new (const gchar *title, +GtkWidget * gtk_page_setup_unix_dialog_new (const char *title, GtkWindow *parent); GDK_AVAILABLE_IN_ALL void gtk_page_setup_unix_dialog_set_page_setup (GtkPageSetupUnixDialog *dialog, diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index 7c6d07ab4d..a930450e64 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -785,7 +785,7 @@ static void gtk_paned_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { GtkPaned *self = GTK_PANED (buildable); diff --git a/gtk/gtkpango.c b/gtk/gtkpango.c index bce931cdf0..f8b0a54866 100644 --- a/gtk/gtkpango.c +++ b/gtk/gtkpango.c @@ -31,7 +31,7 @@ static AtkAttributeSet * add_attribute (AtkAttributeSet *attributes, AtkTextAttribute attr, - const gchar *value) + const char *value) { AtkAttribute *at; @@ -78,7 +78,7 @@ _gtk_pango_get_default_attributes (AtkAttributeSet *attributes, font = pango_context_get_font_description (context); if (font) { - gchar buf[60]; + char buf[60]; attributes = add_attribute (attributes, ATK_TEXT_ATTR_STYLE, atk_text_attribute_get_value (ATK_TEXT_ATTR_STYLE, pango_font_description_get_style (font))); @@ -183,8 +183,8 @@ _gtk_pango_get_run_attributes (AtkAttributeSet *attributes, int index, start_index, end_index; gboolean is_next; glong len; - const gchar *text; - gchar *value; + const char *text; + char *value; text = pango_layout_get_text (layout); len = g_utf8_strlen (text, -1); @@ -526,7 +526,7 @@ pango_layout_get_line_before (PangoLayout *layout, PangoLayoutIter *iter; PangoLayoutLine *line, *prev_line = NULL, *prev_prev_line = NULL; int index, start_index, end_index; - const gchar *text; + const char *text; gboolean found = FALSE; text = pango_layout_get_text (layout); @@ -599,7 +599,7 @@ pango_layout_get_line_at (PangoLayout *layout, PangoLayoutIter *iter; PangoLayoutLine *line, *prev_line = NULL; int index, start_index, end_index; - const gchar *text; + const char *text; gboolean found = FALSE; text = pango_layout_get_text (layout); @@ -663,7 +663,7 @@ pango_layout_get_line_after (PangoLayout *layout, PangoLayoutIter *iter; PangoLayoutLine *line, *prev_line = NULL; int index, start_index, end_index; - const gchar *text; + const char *text; gboolean found = FALSE; text = pango_layout_get_text (layout); @@ -743,14 +743,14 @@ pango_layout_get_line_after (PangoLayout *layout, * Returns: a newly allocated string containing a slice of text * from layout. Free with g_free(). */ -gchar * +char * _gtk_pango_get_text_before (PangoLayout *layout, AtkTextBoundary boundary_type, int offset, int *start_offset, int *end_offset) { - const gchar *text; + const char *text; int start, end; const PangoLogAttr *attrs; int n_attrs; @@ -848,14 +848,14 @@ _gtk_pango_get_text_before (PangoLayout *layout, * Returns: a newly allocated string containing a slice of text * from layout. Free with g_free(). */ -gchar * +char * _gtk_pango_get_text_after (PangoLayout *layout, AtkTextBoundary boundary_type, int offset, int *start_offset, int *end_offset) { - const gchar *text; + const char *text; int start, end; const PangoLogAttr *attrs; int n_attrs; @@ -959,14 +959,14 @@ _gtk_pango_get_text_after (PangoLayout *layout, * Returns: a newly allocated string containing a slice of text * from layout. Free with g_free(). */ -gchar * +char * _gtk_pango_get_text_at (PangoLayout *layout, AtkTextBoundary boundary_type, int offset, int *start_offset, int *end_offset) { - const gchar *text; + const char *text; int start, end; const PangoLogAttr *attrs; int n_attrs; diff --git a/gtk/gtkpango.h b/gtk/gtkpango.h index 6bffb9223d..1f60925a98 100644 --- a/gtk/gtkpango.h +++ b/gtk/gtkpango.h @@ -41,17 +41,17 @@ AtkAttributeSet *_gtk_pango_get_run_attributes (AtkAttributeSet *attributes, int *start_offset, int *end_offset); -gchar *_gtk_pango_get_text_before (PangoLayout *layout, +char *_gtk_pango_get_text_before (PangoLayout *layout, AtkTextBoundary boundary_type, int offset, int *start_offset, int *end_offset); -gchar *_gtk_pango_get_text_at (PangoLayout *layout, +char *_gtk_pango_get_text_at (PangoLayout *layout, AtkTextBoundary boundary_type, int offset, int *start_offset, int *end_offset); -gchar *_gtk_pango_get_text_after (PangoLayout *layout, +char *_gtk_pango_get_text_after (PangoLayout *layout, AtkTextBoundary boundary_type, int offset, int *start_offset, @@ -63,7 +63,7 @@ PangoAttrList *_gtk_pango_attr_list_merge (PangoAttrList *into, gboolean gtk_buildable_attribute_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); diff --git a/gtk/gtkpapersize.c b/gtk/gtkpapersize.c index 0144425fc5..7dbddd65af 100644 --- a/gtk/gtkpapersize.c +++ b/gtk/gtkpapersize.c @@ -64,9 +64,9 @@ struct _GtkPaperSize const PaperInfo *info; /* If these are not set we fall back to info */ - gchar *name; - gchar *display_name; - gchar *ppd_name; + char *name; + char *display_name; + char *ppd_name; gdouble width, height; /* Stored in mm */ gboolean is_custom; @@ -78,7 +78,7 @@ G_DEFINE_BOXED_TYPE (GtkPaperSize, gtk_paper_size, gtk_paper_size_free) static const PaperInfo * -lookup_paper_info (const gchar *name) +lookup_paper_info (const char *name) { int lower = 0; int upper = G_N_ELEMENTS (standard_names_offsets) - 1; @@ -102,7 +102,7 @@ lookup_paper_info (const gchar *name) } static gboolean -parse_media_size (const gchar *size, +parse_media_size (const char *size, gdouble *width_mm, gdouble *height_mm) { @@ -143,8 +143,8 @@ parse_media_size (const gchar *size, } static gboolean -parse_full_media_size_name (const gchar *full_name, - gchar **name, +parse_full_media_size_name (const char *full_name, + char **name, gdouble *width_mm, gdouble *height_mm) { @@ -221,7 +221,7 @@ gtk_paper_size_new_from_info (const PaperInfo *info) * to free it */ GtkPaperSize * -gtk_paper_size_new (const gchar *name) +gtk_paper_size_new (const char *name) { GtkPaperSize *size; char *short_name; @@ -271,10 +271,10 @@ gtk_paper_size_new (const gchar *name) return size; } -static gchar * -improve_displayname (const gchar *name) +static char * +improve_displayname (const char *name) { - gchar *p, *p1, *p2, *s; + char *p, *p1, *p2, *s; p = strrchr (name, 'x'); if (p && p != name && @@ -311,8 +311,8 @@ improve_displayname (const gchar *name) * to free it */ GtkPaperSize * -gtk_paper_size_new_from_ppd (const gchar *ppd_name, - const gchar *ppd_display_name, +gtk_paper_size_new_from_ppd (const char *ppd_name, + const char *ppd_display_name, gdouble width, gdouble height) { @@ -390,16 +390,16 @@ gtk_paper_size_new_from_ppd (const gchar *ppd_name, * to free it */ GtkPaperSize * -gtk_paper_size_new_from_ipp (const gchar *ipp_name, +gtk_paper_size_new_from_ipp (const char *ipp_name, gdouble width, gdouble height) { GtkPaperSize *size; - const gchar *name = NULL; + const char *name = NULL; gboolean found = FALSE; float x_dimension; float y_dimension; - gchar *display_name = NULL; + char *display_name = NULL; int i; /* Find paper size according to its name */ @@ -477,8 +477,8 @@ gtk_paper_size_new_from_ipp (const gchar *ipp_name, * to free it */ GtkPaperSize * -gtk_paper_size_new_custom (const gchar *name, - const gchar *display_name, +gtk_paper_size_new_custom (const char *name, + const char *display_name, gdouble width, gdouble height, GtkUnit unit) @@ -621,7 +621,7 @@ gtk_paper_size_get_paper_sizes (gboolean include_custom) * * Returns: the name of @size */ -const gchar * +const char * gtk_paper_size_get_name (GtkPaperSize *size) { if (size->name) @@ -638,10 +638,10 @@ gtk_paper_size_get_name (GtkPaperSize *size) * * Returns: the human-readable name of @size */ -const gchar * +const char * gtk_paper_size_get_display_name (GtkPaperSize *size) { - const gchar *display_name; + const char *display_name; if (size->display_name) return size->display_name; @@ -661,7 +661,7 @@ gtk_paper_size_get_display_name (GtkPaperSize *size) * * Returns: the PPD name of @size */ -const gchar * +const char * gtk_paper_size_get_ppd_name (GtkPaperSize *size) { if (size->ppd_name) @@ -767,7 +767,7 @@ gtk_paper_size_set_size (GtkPaperSize *size, * Returns: the name of the default paper size. The string * is owned by GTK and should not be modified. */ -const gchar * +const char * gtk_paper_size_get_default (void) { char *locale, *freeme = NULL; @@ -857,7 +857,7 @@ gtk_paper_size_get_default_bottom_margin (GtkPaperSize *size, GtkUnit unit) { gdouble margin; - const gchar *name; + const char *name; margin = _gtk_print_convert_to_mm (0.25, GTK_UNIT_INCH); @@ -923,14 +923,14 @@ gtk_paper_size_get_default_right_margin (GtkPaperSize *size, */ GtkPaperSize * gtk_paper_size_new_from_key_file (GKeyFile *key_file, - const gchar *group_name, + const char *group_name, GError **error) { GtkPaperSize *paper_size = NULL; - gchar *name = NULL; - gchar *ppd_name = NULL; - gchar *display_name = NULL; - gchar *freeme = NULL; + char *name = NULL; + char *ppd_name = NULL; + char *display_name = NULL; + char *freeme = NULL; gdouble width, height; GError *err = NULL; @@ -1009,7 +1009,7 @@ out: void gtk_paper_size_to_key_file (GtkPaperSize *size, GKeyFile *key_file, - const gchar *group_name) + const char *group_name) { const char *name, *ppd_name, *display_name; diff --git a/gtk/gtkpapersize.h b/gtk/gtkpapersize.h index eafe75a76e..04e7389fab 100644 --- a/gtk/gtkpapersize.h +++ b/gtk/gtkpapersize.h @@ -88,19 +88,19 @@ GDK_AVAILABLE_IN_ALL GType gtk_paper_size_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkPaperSize *gtk_paper_size_new (const gchar *name); +GtkPaperSize *gtk_paper_size_new (const char *name); GDK_AVAILABLE_IN_ALL -GtkPaperSize *gtk_paper_size_new_from_ppd (const gchar *ppd_name, - const gchar *ppd_display_name, +GtkPaperSize *gtk_paper_size_new_from_ppd (const char *ppd_name, + const char *ppd_display_name, gdouble width, gdouble height); GDK_AVAILABLE_IN_ALL -GtkPaperSize *gtk_paper_size_new_from_ipp (const gchar *ipp_name, +GtkPaperSize *gtk_paper_size_new_from_ipp (const char *ipp_name, gdouble width, gdouble height); GDK_AVAILABLE_IN_ALL -GtkPaperSize *gtk_paper_size_new_custom (const gchar *name, - const gchar *display_name, +GtkPaperSize *gtk_paper_size_new_custom (const char *name, + const char *display_name, gdouble width, gdouble height, GtkUnit unit); @@ -117,11 +117,11 @@ GList *gtk_paper_size_get_paper_sizes (gboolean include_custom); /* The width is always the shortest side, measure in mm */ GDK_AVAILABLE_IN_ALL -const gchar *gtk_paper_size_get_name (GtkPaperSize *size); +const char *gtk_paper_size_get_name (GtkPaperSize *size); GDK_AVAILABLE_IN_ALL -const gchar *gtk_paper_size_get_display_name (GtkPaperSize *size); +const char *gtk_paper_size_get_display_name (GtkPaperSize *size); GDK_AVAILABLE_IN_ALL -const gchar *gtk_paper_size_get_ppd_name (GtkPaperSize *size); +const char *gtk_paper_size_get_ppd_name (GtkPaperSize *size); GDK_AVAILABLE_IN_ALL gdouble gtk_paper_size_get_width (GtkPaperSize *size, GtkUnit unit); @@ -153,16 +153,16 @@ gdouble gtk_paper_size_get_default_right_margin (GtkPaperSize *size, GtkUnit unit); GDK_AVAILABLE_IN_ALL -const gchar *gtk_paper_size_get_default (void); +const char *gtk_paper_size_get_default (void); GDK_AVAILABLE_IN_ALL GtkPaperSize *gtk_paper_size_new_from_key_file (GKeyFile *key_file, - const gchar *group_name, + const char *group_name, GError **error); GDK_AVAILABLE_IN_ALL void gtk_paper_size_to_key_file (GtkPaperSize *size, GKeyFile *key_file, - const gchar *group_name); + const char *group_name); GDK_AVAILABLE_IN_ALL GtkPaperSize *gtk_paper_size_new_from_gvariant (GVariant *variant); diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index d4f74d8016..c24b931e02 100644 --- a/gtk/gtkpathbar.c +++ b/gtk/gtkpathbar.c @@ -238,7 +238,7 @@ gtk_path_bar_init (GtkPathBar *path_bar) home = g_get_home_dir (); if (home != NULL) { - const gchar *desktop; + const char *desktop; path_bar->home_file = g_file_new_for_path (home); /* FIXME: Need file system backend specific way of getting the @@ -986,7 +986,7 @@ gtk_path_bar_update_button_appearance (GtkPathBar *path_bar, ButtonData *button_data, gboolean current_dir) { - const gchar *dir_name = get_dir_name (button_data); + const char *dir_name = get_dir_name (button_data); gtk_widget_remove_css_class (button_data->button, "text-button"); gtk_widget_remove_css_class (button_data->button, "image-button"); @@ -1217,7 +1217,7 @@ gtk_path_bar_get_info_callback (GObject *source, struct SetFileInfo *file_info = data; GFileInfo *info; ButtonData *button_data; - const gchar *display_name; + const char *display_name; gboolean is_hidden; info = g_file_query_info_finish (file, result, NULL); diff --git a/gtk/gtkpicture.h b/gtk/gtkpicture.h index b4076365c6..80f0334f0e 100644 --- a/gtk/gtkpicture.h +++ b/gtk/gtkpicture.h @@ -45,9 +45,9 @@ GtkWidget* gtk_picture_new_for_pixbuf (GdkPixbuf GDK_AVAILABLE_IN_ALL GtkWidget* gtk_picture_new_for_file (GFile *file); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_picture_new_for_filename (const gchar *filename); +GtkWidget* gtk_picture_new_for_filename (const char *filename); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_picture_new_for_resource (const gchar *resource_path); +GtkWidget* gtk_picture_new_for_resource (const char *resource_path); GDK_AVAILABLE_IN_ALL void gtk_picture_set_paintable (GtkPicture *self, @@ -61,10 +61,10 @@ GDK_AVAILABLE_IN_ALL GFile * gtk_picture_get_file (GtkPicture *self); GDK_AVAILABLE_IN_ALL void gtk_picture_set_filename (GtkPicture *self, - const gchar *filename); + const char *filename); GDK_AVAILABLE_IN_ALL void gtk_picture_set_resource (GtkPicture *self, - const gchar *resource_path); + const char *resource_path); GDK_AVAILABLE_IN_ALL void gtk_picture_set_pixbuf (GtkPicture *self, GdkPixbuf *pixbuf); diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index 03a5cf05e7..a0f3a9c070 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -142,7 +142,7 @@ struct _GtkPlacesSidebar { GtkWidget *rename_entry; GtkWidget *rename_button; GtkWidget *rename_error; - gchar *rename_uri; + char *rename_uri; gulong trash_monitor_changed_id; GtkWidget *trash_row; @@ -166,7 +166,7 @@ struct _GtkPlacesSidebar { GDBusProxy *hostnamed_proxy; GCancellable *hostnamed_cancellable; - gchar *hostname; + char *hostname; GtkPlacesOpenFlags open_flags; @@ -188,8 +188,8 @@ struct _GtkPlacesSidebarClass { GFile *location, GtkPlacesOpenFlags open_flags); void (* show_error_message) (GtkPlacesSidebar *sidebar, - const gchar *primary, - const gchar *secondary); + const char *primary, + const char *secondary); GdkDragAction (* drag_action_requested) (GtkPlacesSidebar *sidebar, GFile *dest_file, GSList *source_file_list); @@ -310,8 +310,8 @@ emit_open_location (GtkPlacesSidebar *sidebar, static void emit_show_error_message (GtkPlacesSidebar *sidebar, - const gchar *primary, - const gchar *secondary) + const char *primary, + const char *secondary) { g_signal_emit (sidebar, places_sidebar_signals[SHOW_ERROR_MESSAGE], 0, primary, secondary); @@ -411,10 +411,10 @@ static GtkWidget* add_place (GtkPlacesSidebar *sidebar, GtkPlacesSidebarPlaceType place_type, GtkPlacesSidebarSectionType section_type, - const gchar *name, + const char *name, GIcon *start_icon, GIcon *end_icon, - const gchar *uri, + const char *uri, GDrive *drive, GVolume *volume, GMount *mount, @@ -424,7 +424,7 @@ add_place (GtkPlacesSidebar *sidebar, gpointer *cloud_provider_account, #endif const int index, - const gchar *tooltip) + const char *tooltip) { gboolean show_eject, show_unmount; gboolean show_eject_button; @@ -524,7 +524,7 @@ recent_files_setting_is_enabled (GtkPlacesSidebar *sidebar) static gboolean recent_scheme_is_supported (void) { - const gchar * const *supported; + const char * const *supported; supported = g_vfs_get_supported_uri_schemes (g_vfs_get_default ()); if (supported != NULL) @@ -542,11 +542,11 @@ should_show_recent (GtkPlacesSidebar *sidebar) } static gboolean -path_is_home_dir (const gchar *path) +path_is_home_dir (const char *path) { GFile *home_dir; GFile *location; - const gchar *home_path; + const char *home_path; gboolean res; home_path = g_get_home_dir (); @@ -566,7 +566,7 @@ path_is_home_dir (const gchar *path) static void open_home (GtkPlacesSidebar *sidebar) { - const gchar *home_path; + const char *home_path; GFile *home_dir; home_path = g_get_home_dir (); @@ -588,12 +588,12 @@ add_special_dirs (GtkPlacesSidebar *sidebar) dirs = NULL; for (index = 0; index < G_USER_N_DIRECTORIES; index++) { - const gchar *path; + const char *path; GFile *root; GIcon *start_icon; - gchar *name; - gchar *mount_uri; - gchar *tooltip; + char *name; + char *mount_uri; + char *tooltip; if (!_gtk_bookmarks_manager_get_is_xdg_dir_builtin (index)) continue; @@ -630,16 +630,16 @@ add_special_dirs (GtkPlacesSidebar *sidebar) g_free (mount_uri); g_free (tooltip); - dirs = g_list_prepend (dirs, (gchar *)path); + dirs = g_list_prepend (dirs, (char *)path); } g_list_free (dirs); } -static gchar * +static char * get_home_directory_uri (void) { - const gchar *home; + const char *home; home = g_get_home_dir (); if (!home) @@ -648,10 +648,10 @@ get_home_directory_uri (void) return g_filename_to_uri (home, NULL, NULL); } -static gchar * +static char * get_desktop_directory_uri (void) { - const gchar *name; + const char *name; name = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP); @@ -668,7 +668,7 @@ static gboolean should_show_file (GtkPlacesSidebar *sidebar, GFile *file) { - gchar *path; + char *path; path = g_file_get_path (file); if (path) @@ -684,7 +684,7 @@ static gboolean file_is_shown (GtkPlacesSidebar *sidebar, GFile *file) { - gchar *uri; + char *uri; GtkWidget *row; gboolean found = FALSE; @@ -732,9 +732,9 @@ on_app_shortcuts_query_complete (GObject *source, if (info) { - gchar *uri; - gchar *tooltip; - const gchar *name; + char *uri; + char *tooltip; + const char *name; GIcon *start_icon; name = g_file_info_get_display_name (info); @@ -804,9 +804,9 @@ on_bookmark_query_info_complete (GObject *source, GFile *root = G_FILE (source); GError *error = NULL; GFileInfo *info; - gchar *bookmark_name; - gchar *mount_uri; - gchar *tooltip; + char *bookmark_name; + char *mount_uri; + char *tooltip; GIcon *start_icon; info = g_file_query_info_finish (root, result, &error); @@ -857,7 +857,7 @@ is_external_volume (GVolume *volume) { gboolean is_external; GDrive *drive; - gchar *id; + char *id; drive = g_volume_get_drive (volume); id = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_CLASS); @@ -897,10 +897,10 @@ create_cloud_provider_account_row (GtkPlacesSidebar *sidebar, { GIcon *end_icon; GIcon *start_icon; - const gchar *mount_path; - const gchar *name; - gchar *mount_uri; - gchar *tooltip; + const char *mount_path; + const char *name; + char *mount_uri; + char *tooltip; guint provider_account_status; start_icon = cloud_providers_account_get_icon (account); @@ -981,12 +981,12 @@ update_places (GtkPlacesSidebar *sidebar) GVolume *volume; GSList *bookmarks, *sl; int index; - gchar *original_uri, *name, *identifier; + char *original_uri, *name, *identifier; GtkListBoxRow *selected; - gchar *home_uri; + char *home_uri; GIcon *start_icon; GFile *root; - gchar *tooltip; + char *tooltip; GList *network_mounts, *network_volumes; GIcon *new_bookmark_icon; GtkWidget *child; @@ -1504,7 +1504,7 @@ check_valid_drop_target (GtkPlacesSidebar *sidebar, GtkPlacesSidebarPlaceType place_type; GtkPlacesSidebarSectionType section_type; gboolean valid = FALSE; - gchar *uri; + char *uri; GFile *dest_file; int drag_action; @@ -1658,7 +1658,7 @@ drag_motion_callback (GtkDropTarget *target, GdkDragAction action; GtkListBoxRow *row; GtkPlacesSidebarPlaceType place_type; - gchar *drop_target_uri = NULL; + char *drop_target_uri = NULL; int row_index; int row_placeholder_index; const GValue *value; @@ -1777,7 +1777,7 @@ reorder_bookmarks (GtkPlacesSidebar *sidebar, GtkSidebarRow *row, int new_position) { - gchar *uri; + char *uri; GFile *file; g_object_get (row, "uri", &uri, NULL); @@ -1825,7 +1825,7 @@ drag_drop_callback (GtkDropTarget *target, int target_order_index; GtkPlacesSidebarPlaceType target_place_type; GtkPlacesSidebarSectionType target_section_type; - gchar *target_uri; + char *target_uri; GtkListBoxRow *target_row; gboolean result; @@ -1961,8 +1961,8 @@ drive_start_from_bookmark_cb (GObject *source_object, { GtkPlacesSidebar *sidebar; GError *error; - gchar *primary; - gchar *name; + char *primary; + char *name; sidebar = GTK_PLACES_SIDEBAR (user_data); @@ -1990,8 +1990,8 @@ volume_mount_cb (GObject *source_object, GtkPlacesSidebar *sidebar; GVolume *volume; GError *error; - gchar *primary; - gchar *name; + char *primary; + char *name; GMount *mount; volume = G_VOLUME (source_object); @@ -2095,7 +2095,7 @@ open_volume (GtkSidebarRow *row, static void open_uri (GtkPlacesSidebar *sidebar, - const gchar *uri, + const char *uri, GtkPlacesOpenFlags open_flags) { GFile *location; @@ -2109,7 +2109,7 @@ static void open_row (GtkSidebarRow *row, GtkPlacesOpenFlags open_flags) { - gchar *uri; + char *uri; GDrive *drive; GVolume *volume; GtkPlacesSidebarPlaceType place_type; @@ -2176,8 +2176,8 @@ add_shortcut_cb (GSimpleAction *action, gpointer data) { GtkPlacesSidebar *sidebar = data; - gchar *uri; - gchar *name; + char *uri; + char *name; GFile *location; g_object_get (sidebar->context_row, @@ -2202,9 +2202,9 @@ rename_entry_changed (GtkEntry *entry, GtkPlacesSidebar *sidebar) { GtkPlacesSidebarPlaceType type; - gchar *name; - gchar *uri; - const gchar *new_name; + char *name; + char *uri; + const char *new_name; gboolean found = FALSE; GtkWidget *row; @@ -2248,7 +2248,7 @@ static void do_rename (GtkButton *button, GtkPlacesSidebar *sidebar) { - gchar *new_text; + char *new_text; GFile *file; new_text = g_strdup (gtk_editable_get_text (GTK_EDITABLE (sidebar->rename_entry))); @@ -2290,7 +2290,7 @@ create_rename_popover (GtkPlacesSidebar *sidebar) GtkWidget *entry; GtkWidget *button; GtkWidget *error; - gchar *str; + char *str; if (sidebar->rename_popover) return; @@ -2385,8 +2385,8 @@ setup_popover_shadowing (GtkWidget *popover) static void show_rename_popover (GtkSidebarRow *row) { - gchar *name; - gchar *uri; + char *name; + char *uri; GtkPlacesSidebar *sidebar; g_object_get (row, @@ -2444,7 +2444,7 @@ static void remove_bookmark (GtkSidebarRow *row) { GtkPlacesSidebarPlaceType type; - gchar *uri; + char *uri; GFile *file; GtkPlacesSidebar *sidebar; @@ -2510,8 +2510,8 @@ unmount_mount_cb (GObject *source_object, { if (error->code != G_IO_ERROR_FAILED_HANDLED) { - gchar *name; - gchar *primary; + char *name; + char *primary; name = g_mount_get_name (mount); primary = g_strdup_printf (_("Unable to unmount “%s”"), name); @@ -2679,8 +2679,8 @@ drive_stop_cb (GObject *source_object, { GtkPlacesSidebar *sidebar; GError *error; - gchar *primary; - gchar *name; + char *primary; + char *name; sidebar = user_data; @@ -2708,8 +2708,8 @@ drive_eject_cb (GObject *source_object, { GtkPlacesSidebar *sidebar; GError *error; - gchar *primary; - gchar *name; + char *primary; + char *name; sidebar = user_data; @@ -2737,8 +2737,8 @@ volume_eject_cb (GObject *source_object, { GtkPlacesSidebar *sidebar; GError *error; - gchar *primary; - gchar *name; + char *primary; + char *name; sidebar = user_data; @@ -2766,8 +2766,8 @@ mount_eject_cb (GObject *source_object, { GtkPlacesSidebar *sidebar; GError *error; - gchar *primary; - gchar *name; + char *primary; + char *name; sidebar = user_data; @@ -2914,8 +2914,8 @@ drive_poll_for_media_cb (GObject *source_object, { GtkPlacesSidebar *sidebar; GError *error; - gchar *primary; - gchar *name; + char *primary; + char *name; sidebar = GTK_PLACES_SIDEBAR (user_data); @@ -2962,8 +2962,8 @@ drive_start_cb (GObject *source_object, { GtkPlacesSidebar *sidebar; GError *error; - gchar *primary; - gchar *name; + char *primary; + char *name; sidebar = GTK_PLACES_SIDEBAR (user_data); @@ -3550,7 +3550,7 @@ list_box_sort_func (GtkListBoxRow *row1, { GtkPlacesSidebarSectionType section_type_1, section_type_2; GtkPlacesSidebarPlaceType place_type_1, place_type_2; - gchar *label_1, *label_2; + char *label_1, *label_2; int index_1, index_2; int retval = 0; @@ -3636,7 +3636,7 @@ update_hostname (GtkPlacesSidebar *sidebar) { GVariant *variant; gsize len; - const gchar *hostname; + const char *hostname; if (sidebar->hostnamed_proxy == NULL) return; @@ -4478,8 +4478,8 @@ gtk_places_sidebar_set_location (GtkPlacesSidebar *sidebar, GFile *location) { GtkWidget *row; - gchar *row_uri; - gchar *uri; + char *row_uri; + char *uri; gboolean found = FALSE; g_return_if_fail (GTK_IS_PLACES_SIDEBAR (sidebar)); @@ -4548,7 +4548,7 @@ gtk_places_sidebar_get_location (GtkPlacesSidebar *sidebar) if (selected) { - gchar *uri; + char *uri; g_object_get (selected, "uri", &uri, NULL); file = g_file_new_for_uri (uri); @@ -4558,11 +4558,11 @@ gtk_places_sidebar_get_location (GtkPlacesSidebar *sidebar) return file; } -gchar * +char * gtk_places_sidebar_get_location_title (GtkPlacesSidebar *sidebar) { GtkListBoxRow *selected; - gchar *title; + char *title; g_return_val_if_fail (sidebar != NULL, NULL); @@ -4904,7 +4904,7 @@ gtk_places_sidebar_get_nth_bookmark (GtkPlacesSidebar *sidebar, row = gtk_widget_get_next_sibling (row)) { GtkPlacesSidebarPlaceType place_type; - gchar *uri; + char *uri; if (!GTK_IS_LIST_BOX_ROW (row)) continue; diff --git a/gtk/gtkplacessidebarprivate.h b/gtk/gtkplacessidebarprivate.h index 8d037a0d84..512ef23cf3 100644 --- a/gtk/gtkplacessidebarprivate.h +++ b/gtk/gtkplacessidebarprivate.h @@ -137,7 +137,7 @@ typedef enum { N_PLACES } GtkPlacesSidebarPlaceType; -gchar *gtk_places_sidebar_get_location_title (GtkPlacesSidebar *sidebar); +char *gtk_places_sidebar_get_location_title (GtkPlacesSidebar *sidebar); G_END_DECLS diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c index 7316bd1478..cdf88ae974 100644 --- a/gtk/gtkplacesview.c +++ b/gtk/gtkplacesview.c @@ -60,8 +60,8 @@ struct _GtkPlacesViewClass GtkPlacesOpenFlags open_flags); void (* show_error_message) (GtkPlacesSidebar *sidebar, - const gchar *primary, - const gchar *secondary); + const char *primary, + const char *secondary); }; struct _GtkPlacesView @@ -78,7 +78,7 @@ struct _GtkPlacesView GCancellable *cancellable; - gchar *search_query; + char *search_query; GtkWidget *actionbar; GtkWidget *address_entry; @@ -160,7 +160,7 @@ enum { LAST_SIGNAL }; -const gchar *unsupported_protocols [] = +const char *unsupported_protocols [] = { "file", "afc", "obex", "http", "trash", "burn", "computer", @@ -184,8 +184,8 @@ emit_open_location (GtkPlacesView *view, static void emit_show_error_message (GtkPlacesView *view, - gchar *primary_message, - gchar *secondary_message) + char *primary_message, + char *secondary_message) { g_signal_emit (view, places_view_signals[SHOW_ERROR_MESSAGE], 0, primary_message, secondary_message); @@ -202,8 +202,8 @@ server_list_load (GtkPlacesView *view) { GBookmarkFile *bookmarks; GError *error = NULL; - gchar *datadir; - gchar *filename; + char *datadir; + char *filename; bookmarks = g_bookmark_file_new (); datadir = g_build_filename (g_get_user_config_dir (), "gtk-4.0", NULL); @@ -262,7 +262,7 @@ server_list_load (GtkPlacesView *view) static void server_list_save (GBookmarkFile *bookmarks) { - gchar *filename; + char *filename; filename = g_build_filename (g_get_user_config_dir (), "gtk-4.0", "servers", NULL); g_bookmark_file_to_file (bookmarks, filename, NULL); @@ -276,8 +276,8 @@ server_list_add_server (GtkPlacesView *view, GBookmarkFile *bookmarks; GFileInfo *info; GError *error; - gchar *title; - gchar *uri; + char *title; + char *uri; error = NULL; bookmarks = server_list_load (view); @@ -308,7 +308,7 @@ server_list_add_server (GtkPlacesView *view, static void server_list_remove_server (GtkPlacesView *view, - const gchar *uri) + const char *uri) { GBookmarkFile *bookmarks; @@ -489,7 +489,7 @@ is_external_volume (GVolume *volume) { gboolean is_external; GDrive *drive; - gchar *id; + char *id; drive = g_volume_get_drive (volume); id = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_CLASS); @@ -510,7 +510,7 @@ is_external_volume (GVolume *volume) typedef struct { - gchar *uri; + char *uri; GtkPlacesView *view; } RemoveServerData; @@ -527,7 +527,7 @@ populate_servers (GtkPlacesView *view) { GBookmarkFile *server_list; GtkWidget *child; - gchar **uris; + char **uris; gsize num_uris; int i; @@ -561,8 +561,8 @@ populate_servers (GtkPlacesView *view) GtkWidget *grid; GtkWidget *button; GtkWidget *label; - gchar *name; - gchar *dup_uri; + char *name; + char *dup_uri; name = g_bookmark_file_get_title (server_list, uris[i], NULL); dup_uri = g_strdup (uris[i]); @@ -706,9 +706,9 @@ add_volume (GtkPlacesView *view, GMount *mount; GFile *root; GIcon *icon; - gchar *identifier; - gchar *name; - gchar *path; + char *identifier; + char *name; + char *path; if (is_external_volume (volume)) return; @@ -754,10 +754,10 @@ add_mount (GtkPlacesView *view, gboolean is_network; GFile *root; GIcon *icon; - gchar *name; - gchar *path; - gchar *uri; - gchar *schema; + char *name; + char *path; + char *uri; + char *schema; icon = g_mount_get_icon (mount); name = g_mount_get_name (mount); @@ -814,8 +814,8 @@ static void add_file (GtkPlacesView *view, GFile *file, GIcon *icon, - const gchar *display_name, - const gchar *path, + const char *display_name, + const char *path, gboolean is_network) { GtkWidget *row; @@ -939,10 +939,10 @@ populate_networks (GtkPlacesView *view, GList *l; GFile *file; GFile *activatable_file; - gchar *uri; + char *uri; GFileType type; GIcon *icon; - gchar *display_name; + char *display_name; for (l = detected_networks; l != NULL; l = l->next) { @@ -1044,7 +1044,7 @@ static void fetch_networks (GtkPlacesView *view) { GFile *network_file; - const gchar * const *supported_uris; + const char * const *supported_uris; gboolean found; supported_uris = g_vfs_get_supported_uri_schemes (g_vfs_get_default ()); @@ -1565,8 +1565,8 @@ unmount_cb (GtkWidget *widget, static void attach_protocol_row_to_grid (GtkGrid *grid, - const gchar *protocol_name, - const gchar *protocol_prefix) + const char *protocol_name, + const char *protocol_prefix) { GtkWidget *name_label; GtkWidget *prefix_label; @@ -1583,7 +1583,7 @@ attach_protocol_row_to_grid (GtkGrid *grid, static void populate_available_protocols_grid (GtkGrid *grid) { - const gchar* const *supported_protocols; + const char * const *supported_protocols; gboolean has_any = FALSE; supported_protocols = g_vfs_get_supported_uri_schemes (g_vfs_get_default ()); @@ -1830,7 +1830,7 @@ on_eject_button_clicked (GtkWidget *widget, static void on_connect_button_clicked (GtkPlacesView *view) { - const gchar *uri; + const char *uri; GFile *file; file = NULL; @@ -1863,8 +1863,8 @@ on_connect_button_clicked (GtkPlacesView *view) static void on_address_entry_text_changed (GtkPlacesView *view) { - const gchar* const *supported_protocols; - gchar *address, *scheme; + const char * const *supported_protocols; + char *address, *scheme; gboolean supported; supported = FALSE; @@ -1918,7 +1918,7 @@ on_recent_servers_listbox_row_activated (GtkPlacesView *view, GtkPlacesViewRow *row, GtkWidget *listbox) { - gchar *uri; + char *uri; uri = g_object_get_data (G_OBJECT (row), "uri"); @@ -1943,8 +1943,8 @@ listbox_filter_func (GtkListBoxRow *row, gboolean is_placeholder; gboolean retval; gboolean searching; - gchar *name; - gchar *path; + char *name; + char *path; retval = FALSE; searching = view->search_query && view->search_query[0] != '\0'; @@ -1992,7 +1992,7 @@ listbox_header_func (GtkListBoxRow *row, gpointer user_data) { gboolean row_is_network; - gchar *text; + char *text; text = NULL; row_is_network = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "is-network")); @@ -2074,8 +2074,8 @@ listbox_sort_func (GtkListBoxRow *row1, { gboolean row1_is_network; gboolean row2_is_network; - gchar *path1; - gchar *path2; + char *path1; + char *path2; gboolean *is_placeholder1; gboolean *is_placeholder2; int retval; @@ -2443,7 +2443,7 @@ gtk_places_view_get_open_flags (GtkPlacesView *view) * * Returns: (transfer none): the current search query. */ -const gchar* +const char * gtk_places_view_get_search_query (GtkPlacesView *view) { g_return_val_if_fail (GTK_IS_PLACES_VIEW (view), NULL); @@ -2461,7 +2461,7 @@ gtk_places_view_get_search_query (GtkPlacesView *view) */ void gtk_places_view_set_search_query (GtkPlacesView *view, - const gchar *query_text) + const char *query_text) { g_return_if_fail (GTK_IS_PLACES_VIEW (view)); diff --git a/gtk/gtkplacesviewprivate.h b/gtk/gtkplacesviewprivate.h index 368649b1c5..90f954812d 100644 --- a/gtk/gtkplacesviewprivate.h +++ b/gtk/gtkplacesviewprivate.h @@ -44,9 +44,9 @@ GtkPlacesOpenFlags gtk_places_view_get_open_flags (GtkPlacesView void gtk_places_view_set_open_flags (GtkPlacesView *view, GtkPlacesOpenFlags flags); -const gchar* gtk_places_view_get_search_query (GtkPlacesView *view); +const char * gtk_places_view_get_search_query (GtkPlacesView *view); void gtk_places_view_set_search_query (GtkPlacesView *view, - const gchar *query_text); + const char *query_text); gboolean gtk_places_view_get_loading (GtkPlacesView *view); diff --git a/gtk/gtkplacesviewrow.c b/gtk/gtkplacesviewrow.c index cc23339311..8d8611bc1c 100644 --- a/gtk/gtkplacesviewrow.c +++ b/gtk/gtkplacesviewrow.c @@ -88,9 +88,9 @@ measure_available_space_finished (GObject *object, GError *error; guint64 free_space; guint64 total_space; - gchar *formatted_free_size; - gchar *formatted_total_size; - gchar *label; + char *formatted_free_size; + char *formatted_total_size; + char *label; guint plural_form; error = NULL; diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c index 90a19cb6e0..62ae3c902a 100644 --- a/gtk/gtkpopover.c +++ b/gtk/gtkpopover.c @@ -1831,7 +1831,7 @@ static void gtk_popover_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) gtk_popover_set_child (GTK_POPOVER (buildable), GTK_WIDGET (child)); diff --git a/gtk/gtkpopovermenu.c b/gtk/gtkpopovermenu.c index 127683ea3e..2108f15535 100644 --- a/gtk/gtkpopovermenu.c +++ b/gtk/gtkpopovermenu.c @@ -577,7 +577,7 @@ gtk_popover_menu_new (void) */ void gtk_popover_menu_open_submenu (GtkPopoverMenu *popover, - const gchar *name) + const char *name) { GtkWidget *stack; diff --git a/gtk/gtkpopovermenuprivate.h b/gtk/gtkpopovermenuprivate.h index 215fa1ea99..6c3da47950 100644 --- a/gtk/gtkpopovermenuprivate.h +++ b/gtk/gtkpopovermenuprivate.h @@ -38,7 +38,7 @@ void gtk_popover_menu_add_submenu (GtkPopoverMenu *popover, GtkWidget *submenu, const char *name); void gtk_popover_menu_open_submenu (GtkPopoverMenu *popover, - const gchar *name); + const char *name); G_END_DECLS diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c index d89cd02182..0dd6d5ddc7 100644 --- a/gtk/gtkprintbackend.c +++ b/gtk/gtkprintbackend.c @@ -132,8 +132,8 @@ gtk_print_backend_load_modules (void) { GList *result; GtkPrintBackend *backend; - gchar *setting; - gchar **backends; + char *setting; + char **backends; int i; GtkSettings *settings; GIOExtensionPoint *ep; @@ -201,7 +201,7 @@ static void request_password (GtkPrintBack gpointer auth_info_default, gpointer auth_info_display, gpointer auth_info_visible, - const gchar *prompt, + const char *prompt, gboolean can_store_auth_info); static void @@ -506,7 +506,7 @@ gtk_print_backend_printer_list_is_done (GtkPrintBackend *backend) GtkPrinter * gtk_print_backend_find_printer (GtkPrintBackend *backend, - const gchar *printer_name) + const char *printer_name) { GtkPrinter *result = NULL; guint i; @@ -544,8 +544,8 @@ gtk_print_backend_print_stream (GtkPrintBackend *backend, void gtk_print_backend_set_password (GtkPrintBackend *backend, - gchar **auth_info_required, - gchar **auth_info, + char **auth_info_required, + char **auth_info, gboolean store_auth_info) { g_return_if_fail (GTK_IS_PRINT_BACKEND (backend)); @@ -569,7 +569,7 @@ static void store_entry (GtkEntry *entry, gpointer user_data) { - gchar **data = (gchar **) user_data; + char **data = (char **) user_data; if (*data != NULL) { @@ -619,24 +619,24 @@ request_password (GtkPrintBackend *backend, gpointer auth_info_default, gpointer auth_info_display, gpointer auth_info_visible, - const gchar *prompt, + const char *prompt, gboolean can_store_auth_info) { GtkPrintBackendPrivate *priv = backend->priv; GtkWidget *dialog, *box, *main_box, *label, *icon, *vbox, *entry, *chkbtn; GtkWidget *focus = NULL; GtkWidget *content_area; - gchar *markup; + char *markup; int length; int i; - gchar **ai_required = (gchar **) auth_info_required; - gchar **ai_default = (gchar **) auth_info_default; - gchar **ai_display = (gchar **) auth_info_display; + char **ai_required = (char **) auth_info_required; + char **ai_default = (char **) auth_info_default; + char **ai_display = (char **) auth_info_display; gboolean *ai_visible = (gboolean *) auth_info_visible; priv->auth_info_required = g_strdupv (ai_required); length = g_strv_length (ai_required); - priv->auth_info = g_new0 (gchar *, length + 1); + priv->auth_info = g_new0 (char *, length + 1); priv->store_auth_info = FALSE; dialog = gtk_dialog_new_with_buttons ( _("Authentication"), NULL, GTK_DIALOG_MODAL, diff --git a/gtk/gtkprintbackendprivate.h b/gtk/gtkprintbackendprivate.h index 54d8347d1c..60bf250949 100644 --- a/gtk/gtkprintbackendprivate.h +++ b/gtk/gtkprintbackendprivate.h @@ -124,13 +124,13 @@ struct _GtkPrintBackendClass gpointer auth_info_default, gpointer auth_info_display, gpointer auth_info_visible, - const gchar *prompt, + const char *prompt, gboolean can_store_auth_info); /* not a signal */ void (*set_password) (GtkPrintBackend *backend, - gchar **auth_info_required, - gchar **auth_info, + char **auth_info_required, + char **auth_info, gboolean store_auth_info); gboolean (*printer_get_hard_margins_for_paper_size) (GtkPrinter *printer, @@ -154,7 +154,7 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_print_backend_printer_list_is_done (GtkPrintBackend *print_backend); GDK_AVAILABLE_IN_ALL GtkPrinter *gtk_print_backend_find_printer (GtkPrintBackend *print_backend, - const gchar *printer_name); + const char *printer_name); GDK_AVAILABLE_IN_ALL void gtk_print_backend_print_stream (GtkPrintBackend *print_backend, GtkPrintJob *job, @@ -168,8 +168,8 @@ GDK_AVAILABLE_IN_ALL void gtk_print_backend_destroy (GtkPrintBackend *print_backend); GDK_AVAILABLE_IN_ALL void gtk_print_backend_set_password (GtkPrintBackend *backend, - gchar **auth_info_required, - gchar **auth_info, + char **auth_info_required, + char **auth_info, gboolean can_store_auth_info); /* Backend-only functions for GtkPrintBackend */ @@ -213,19 +213,19 @@ void gtk_printer_set_is_default (GtkPrinter *printer, gboolean val); GDK_AVAILABLE_IN_ALL void gtk_printer_set_icon_name (GtkPrinter *printer, - const gchar *icon); + const char *icon); GDK_AVAILABLE_IN_ALL gboolean gtk_printer_set_job_count (GtkPrinter *printer, int count); GDK_AVAILABLE_IN_ALL gboolean gtk_printer_set_location (GtkPrinter *printer, - const gchar *location); + const char *location); GDK_AVAILABLE_IN_ALL gboolean gtk_printer_set_description (GtkPrinter *printer, - const gchar *description); + const char *description); GDK_AVAILABLE_IN_ALL gboolean gtk_printer_set_state_message (GtkPrinter *printer, - const gchar *message); + const char *message); void gtk_print_backends_init (void); diff --git a/gtk/gtkprinter.c b/gtk/gtkprinter.c index b74a8c63c0..f10b3f7043 100644 --- a/gtk/gtkprinter.c +++ b/gtk/gtkprinter.c @@ -50,10 +50,10 @@ static void gtk_printer_finalize (GObject *object); struct _GtkPrinterPrivate { - gchar *name; - gchar *location; - gchar *description; - gchar *icon_name; + char *name; + char *location; + char *description; + char *icon_name; guint is_active : 1; guint is_paused : 1; @@ -65,7 +65,7 @@ struct _GtkPrinterPrivate guint accepts_pdf : 1; guint accepts_ps : 1; - gchar *state_message; + char *state_message; int job_count; GtkPrintBackend *backend; @@ -377,7 +377,7 @@ gtk_printer_get_property (GObject *object, * Returns: a new #GtkPrinter **/ GtkPrinter * -gtk_printer_new (const gchar *name, +gtk_printer_new (const char *name, GtkPrintBackend *backend, gboolean virtual_) { @@ -418,7 +418,7 @@ gtk_printer_get_backend (GtkPrinter *printer) * * Returns: the name of @printer */ -const gchar * +const char * gtk_printer_get_name (GtkPrinter *printer) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); @@ -436,7 +436,7 @@ gtk_printer_get_name (GtkPrinter *printer) * * Returns: the description of @printer */ -const gchar * +const char * gtk_printer_get_description (GtkPrinter *printer) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); @@ -448,7 +448,7 @@ gtk_printer_get_description (GtkPrinter *printer) gboolean gtk_printer_set_description (GtkPrinter *printer, - const gchar *description) + const char *description) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); @@ -472,7 +472,7 @@ gtk_printer_set_description (GtkPrinter *printer, * * Returns: the state message of @printer */ -const gchar * +const char * gtk_printer_get_state_message (GtkPrinter *printer) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); @@ -484,7 +484,7 @@ gtk_printer_get_state_message (GtkPrinter *printer) gboolean gtk_printer_set_state_message (GtkPrinter *printer, - const gchar *message) + const char *message) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); @@ -508,7 +508,7 @@ gtk_printer_set_state_message (GtkPrinter *printer, * * Returns: the location of @printer */ -const gchar * +const char * gtk_printer_get_location (GtkPrinter *printer) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); @@ -520,7 +520,7 @@ gtk_printer_get_location (GtkPrinter *printer) gboolean gtk_printer_set_location (GtkPrinter *printer, - const gchar *location) + const char *location) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); @@ -544,7 +544,7 @@ gtk_printer_set_location (GtkPrinter *printer, * * Returns: the icon name for @printer */ -const gchar * +const char * gtk_printer_get_icon_name (GtkPrinter *printer) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); @@ -556,7 +556,7 @@ gtk_printer_get_icon_name (GtkPrinter *printer) void gtk_printer_set_icon_name (GtkPrinter *printer, - const gchar *icon) + const char *icon) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); diff --git a/gtk/gtkprinter.h b/gtk/gtkprinter.h index dea92fcfd3..71a55bab46 100644 --- a/gtk/gtkprinter.h +++ b/gtk/gtkprinter.h @@ -81,21 +81,21 @@ typedef struct _GtkPrintBackend GtkPrintBackend; GDK_AVAILABLE_IN_ALL GType gtk_printer_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkPrinter *gtk_printer_new (const gchar *name, +GtkPrinter *gtk_printer_new (const char *name, GtkPrintBackend *backend, gboolean virtual_); GDK_AVAILABLE_IN_ALL GtkPrintBackend *gtk_printer_get_backend (GtkPrinter *printer); GDK_AVAILABLE_IN_ALL -const gchar * gtk_printer_get_name (GtkPrinter *printer); +const char * gtk_printer_get_name (GtkPrinter *printer); GDK_AVAILABLE_IN_ALL -const gchar * gtk_printer_get_state_message (GtkPrinter *printer); +const char * gtk_printer_get_state_message (GtkPrinter *printer); GDK_AVAILABLE_IN_ALL -const gchar * gtk_printer_get_description (GtkPrinter *printer); +const char * gtk_printer_get_description (GtkPrinter *printer); GDK_AVAILABLE_IN_ALL -const gchar * gtk_printer_get_location (GtkPrinter *printer); +const char * gtk_printer_get_location (GtkPrinter *printer); GDK_AVAILABLE_IN_ALL -const gchar * gtk_printer_get_icon_name (GtkPrinter *printer); +const char * gtk_printer_get_icon_name (GtkPrinter *printer); GDK_AVAILABLE_IN_ALL int gtk_printer_get_job_count (GtkPrinter *printer); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkprinteroptionwidget.c b/gtk/gtkprinteroptionwidget.c index 800b76ed88..59cb79b113 100644 --- a/gtk/gtkprinteroptionwidget.c +++ b/gtk/gtkprinteroptionwidget.c @@ -53,7 +53,7 @@ static void deconstruct_widgets (GtkPrinterOptionWidget *widget); static void construct_widgets (GtkPrinterOptionWidget *widget); static void update_widgets (GtkPrinterOptionWidget *widget); -static gchar *trim_long_filename (const gchar *filename); +static char *trim_long_filename (const char *filename); struct GtkPrinterOptionWidgetPrivate { @@ -516,8 +516,8 @@ combo_box_new (void) static void combo_box_append (GtkWidget *combo, - const gchar *display_text, - const gchar *value) + const char *display_text, + const char *value) { GtkWidget *dropdown; GListModel *model; @@ -537,7 +537,7 @@ combo_box_append (GtkWidget *combo, static void combo_box_set (GtkWidget *combo, - const gchar *value) + const char *value) { GtkWidget *dropdown; GListModel *model; @@ -563,7 +563,7 @@ combo_box_set (GtkWidget *combo, } } -static gchar * +static char * combo_box_get (GtkWidget *combo, gboolean *custom) { GtkWidget *dropdown; @@ -739,13 +739,13 @@ filesave_choose_cb (GtkWidget *button, gtk_window_present (GTK_WINDOW (dialog)); } -static gchar * -filter_numeric (const gchar *val, +static char * +filter_numeric (const char *val, gboolean allow_neg, gboolean allow_dec, gboolean *changed_out) { - gchar *filtered_val; + char *filtered_val; int i, j; int len = strlen (val); gboolean dec_set = FALSE; @@ -789,8 +789,8 @@ combo_changed_cb (GtkWidget *combo, GtkPrinterOptionWidget *widget) { GtkPrinterOptionWidgetPrivate *priv = widget->priv; - gchar *value; - gchar *filtered_val = NULL; + char *value; + char *filtered_val = NULL; gboolean changed; gboolean custom = TRUE; @@ -849,7 +849,7 @@ entry_changed_cb (GtkWidget *entry, GtkPrinterOptionWidget *widget) { GtkPrinterOptionWidgetPrivate *priv = widget->priv; - const gchar *value; + const char *value; g_signal_handler_block (priv->source, priv->source_changed_handler); value = gtk_editable_get_text (GTK_EDITABLE (entry)); @@ -865,7 +865,7 @@ radio_changed_cb (GtkWidget *button, GtkPrinterOptionWidget *widget) { GtkPrinterOptionWidgetPrivate *priv = widget->priv; - gchar *value; + char *value; g_signal_handler_block (priv->source, priv->source_changed_handler); value = g_object_get_data (G_OBJECT (button), "value"); @@ -877,9 +877,9 @@ radio_changed_cb (GtkWidget *button, static void select_maybe (GtkWidget *widget, - const gchar *value) + const char *value) { - gchar *v = g_object_get_data (G_OBJECT (widget), "value"); + char *v = g_object_get_data (G_OBJECT (widget), "value"); if (strcmp (value, v) == 0) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); @@ -887,7 +887,7 @@ select_maybe (GtkWidget *widget, static void alternative_set (GtkWidget *box, - const gchar *value) + const char *value) { GtkWidget *child; @@ -899,8 +899,8 @@ alternative_set (GtkWidget *box, static GSList * alternative_append (GtkWidget *box, - const gchar *label, - const gchar *value, + const char *label, + const char *value, GtkPrinterOptionWidget *widget, GSList *group) { @@ -1071,17 +1071,17 @@ construct_widgets (GtkPrinterOptionWidget *widget) * If the filename exceeds FILENAME_LENGTH_MAX, then trim it and replace * the first three letters with three dots. */ -static gchar * -trim_long_filename (const gchar *filename) +static char * +trim_long_filename (const char *filename) { - const gchar *home; + const char *home; int len, offset; - gchar *result; + char *result; home = g_get_home_dir (); if (g_str_has_prefix (filename, home)) { - gchar *homeless_filename; + char *homeless_filename; offset = g_utf8_strlen (home, -1); len = g_utf8_strlen (filename, -1); @@ -1095,7 +1095,7 @@ trim_long_filename (const gchar *filename) len = g_utf8_strlen (result, -1); if (len > FILENAME_LENGTH_MAX) { - gchar *suffix; + char *suffix; suffix = g_utf8_substring (result, len - FILENAME_LENGTH_MAX, len); g_free (result); @@ -1153,8 +1153,8 @@ update_widgets (GtkPrinterOptionWidget *widget) } case GTK_PRINTER_OPTION_TYPE_FILESAVE: { - gchar *text; - gchar *filename; + char *text; + char *filename; filename = g_filename_from_uri (source->value, NULL, NULL); if (filename != NULL) @@ -1162,7 +1162,7 @@ update_widgets (GtkPrinterOptionWidget *widget) text = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); if (text != NULL) { - gchar *short_filename; + char *short_filename; short_filename = trim_long_filename (text); gtk_button_set_label (GTK_BUTTON (priv->button), short_filename); @@ -1201,7 +1201,7 @@ gtk_printer_option_widget_get_external_label (GtkPrinterOptionWidget *widget) return widget->priv->label; } -const gchar * +const char * gtk_printer_option_widget_get_value (GtkPrinterOptionWidget *widget) { GtkPrinterOptionWidgetPrivate *priv = widget->priv; diff --git a/gtk/gtkprinteroptionwidget.h b/gtk/gtkprinteroptionwidget.h index 30f77f40f9..bb39fd25cb 100644 --- a/gtk/gtkprinteroptionwidget.h +++ b/gtk/gtkprinteroptionwidget.h @@ -67,7 +67,7 @@ gboolean gtk_printer_option_widget_has_external_label (GtkPrinterOptionWidge GDK_AVAILABLE_IN_ALL GtkWidget *gtk_printer_option_widget_get_external_label (GtkPrinterOptionWidget *setting); GDK_AVAILABLE_IN_ALL -const gchar *gtk_printer_option_widget_get_value (GtkPrinterOptionWidget *setting); +const char *gtk_printer_option_widget_get_value (GtkPrinterOptionWidget *setting); G_END_DECLS diff --git a/gtk/gtkprintjob.c b/gtk/gtkprintjob.c index 2e6dfbca9c..50f3d68db8 100644 --- a/gtk/gtkprintjob.c +++ b/gtk/gtkprintjob.c @@ -62,7 +62,7 @@ struct _GtkPrintJob { GObject parent_instance; - gchar *title; + char *title; GIOChannel *spool_io; cairo_surface_t *surface; @@ -297,7 +297,7 @@ gtk_print_job_finalize (GObject *object) * Returns: a new #GtkPrintJob **/ GtkPrintJob * -gtk_print_job_new (const gchar *title, +gtk_print_job_new (const char *title, GtkPrinter *printer, GtkPrintSettings *settings, GtkPageSetup *page_setup) @@ -352,7 +352,7 @@ gtk_print_job_get_printer (GtkPrintJob *job) * * Returns: the title of @job */ -const gchar * +const char * gtk_print_job_get_title (GtkPrintJob *job) { g_return_val_if_fail (GTK_IS_PRINT_JOB (job), NULL); @@ -405,7 +405,7 @@ gtk_print_job_set_status (GtkPrintJob *job, **/ gboolean gtk_print_job_set_source_file (GtkPrintJob *job, - const gchar *filename, + const char *filename, GError **error) { GError *tmp_error; @@ -475,7 +475,7 @@ cairo_surface_t * gtk_print_job_get_surface (GtkPrintJob *job, GError **error) { - gchar *filename = NULL; + char *filename = NULL; gdouble width, height; GtkPaperSize *paper_size; int fd; diff --git a/gtk/gtkprintjob.h b/gtk/gtkprintjob.h index 25983ad602..cc300aa10e 100644 --- a/gtk/gtkprintjob.h +++ b/gtk/gtkprintjob.h @@ -53,7 +53,7 @@ typedef void (*GtkPrintJobCompleteFunc) (GtkPrintJob *print_job, GDK_AVAILABLE_IN_ALL GType gtk_print_job_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkPrintJob *gtk_print_job_new (const gchar *title, +GtkPrintJob *gtk_print_job_new (const char *title, GtkPrinter *printer, GtkPrintSettings *settings, GtkPageSetup *page_setup); @@ -62,12 +62,12 @@ GtkPrintSettings *gtk_print_job_get_settings (GtkPrintJob GDK_AVAILABLE_IN_ALL GtkPrinter *gtk_print_job_get_printer (GtkPrintJob *job); GDK_AVAILABLE_IN_ALL -const gchar * gtk_print_job_get_title (GtkPrintJob *job); +const char * gtk_print_job_get_title (GtkPrintJob *job); GDK_AVAILABLE_IN_ALL GtkPrintStatus gtk_print_job_get_status (GtkPrintJob *job); GDK_AVAILABLE_IN_ALL gboolean gtk_print_job_set_source_file (GtkPrintJob *job, - const gchar *filename, + const char *filename, GError **error); GDK_AVAILABLE_IN_ALL gboolean gtk_print_job_set_source_fd (GtkPrintJob *job, diff --git a/gtk/gtkprintoperation-private.h b/gtk/gtkprintoperation-private.h index 15708a03d2..5f178fc4dc 100644 --- a/gtk/gtkprintoperation-private.h +++ b/gtk/gtkprintoperation-private.h @@ -36,16 +36,16 @@ struct _GtkPrintOperationPrivate GtkPrintOperationAction action; GtkPrintStatus status; GError *error; - gchar *status_string; + char *status_string; GtkPageSetup *default_page_setup; GtkPrintSettings *print_settings; - gchar *job_name; + char *job_name; int nr_of_pages; int nr_of_pages_to_print; int page_position; int current_page; GtkUnit unit; - gchar *export_filename; + char *export_filename; guint use_full_page : 1; guint track_print_status : 1; guint show_progress : 1; @@ -77,7 +77,7 @@ struct _GtkPrintOperationPrivate GtkNumberUpLayout manual_number_up_layout; GtkWidget *custom_widget; - gchar *custom_tab_label; + char *custom_tab_label; gpointer platform_data; GDestroyNotify free_platform_data; @@ -116,7 +116,7 @@ cairo_surface_t * _gtk_print_operation_platform_backend_create_preview_sur GtkPageSetup *page_setup, gdouble *dpi_x, gdouble *dpi_y, - gchar **target); + char **target); void _gtk_print_operation_platform_backend_resize_preview_surface (GtkPrintOperation *op, GtkPageSetup *page_setup, cairo_surface_t *surface); @@ -129,7 +129,7 @@ void _gtk_print_operation_platform_backend_preview_end_page void _gtk_print_operation_set_status (GtkPrintOperation *op, GtkPrintStatus status, - const gchar *string); + const char *string); /* GtkPrintContext private functions: */ diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c index 1095d7440c..61391de98a 100644 --- a/gtk/gtkprintoperation-unix.c +++ b/gtk/gtkprintoperation-unix.c @@ -62,7 +62,7 @@ typedef struct typedef struct _PrinterFinder PrinterFinder; static void printer_finder_free (PrinterFinder *finder); -static void find_printer (const gchar *printer, +static void find_printer (const char *printer, GFunc func, gpointer data); @@ -147,14 +147,14 @@ op_unix_free (GtkPrintOperationUnix *op_unix) g_free (op_unix); } -static gchar * -shell_command_substitute_file (const gchar *cmd, - const gchar *pdf_filename, - const gchar *settings_filename, +static char * +shell_command_substitute_file (const char *cmd, + const char *pdf_filename, + const char *settings_filename, gboolean *pdf_filename_replaced, gboolean *settings_filename_replaced) { - const gchar *inptr, *start; + const char *inptr, *start; GString *final; g_return_val_if_fail (cmd != NULL, NULL); @@ -206,21 +206,21 @@ static void gtk_print_operation_unix_launch_preview (GtkPrintOperation *op, cairo_surface_t *surface, GtkWindow *parent, - const gchar *filename) + const char *filename) { GAppInfo *appinfo; GdkAppLaunchContext *context; - gchar *cmd; - gchar *preview_cmd; + char *cmd; + char *preview_cmd; GtkSettings *settings; GtkPrintSettings *print_settings = NULL; GtkPageSetup *page_setup; GKeyFile *key_file = NULL; - gchar *data = NULL; + char *data = NULL; gsize data_len; - gchar *settings_filename = NULL; - gchar *quoted_filename; - gchar *quoted_settings_filename; + char *settings_filename = NULL; + char *quoted_filename; + char *quoted_settings_filename; gboolean filename_used = FALSE; gboolean settings_used = FALSE; GdkDisplay *display; @@ -305,7 +305,7 @@ gtk_print_operation_unix_launch_preview (GtkPrintOperation *op, if (error != NULL) { - gchar* uri; + char * uri; g_warning ("Error launching preview: %s", error->message); @@ -431,7 +431,7 @@ get_print_dialog (GtkPrintOperation *op, { GtkPrintOperationPrivate *priv = op->priv; GtkWidget *pd, *label; - const gchar *custom_tab_label; + const char *custom_tab_label; pd = gtk_print_unix_dialog_new (NULL, parent); @@ -712,7 +712,7 @@ gtk_print_operation_unix_run_dialog_async (GtkPrintOperation *op, { GtkWidget *pd; PrintResponseData *rdata; - const gchar *printer_name; + const char *printer_name; rdata = g_new (PrintResponseData, 1); rdata->op = g_object_ref (op); @@ -784,9 +784,9 @@ gtk_print_operation_unix_create_preview_surface (GtkPrintOperation *op, GtkPageSetup *page_setup, gdouble *dpi_x, gdouble *dpi_y, - gchar **target) + char **target) { - gchar *filename; + char *filename; int fd; GtkPaperSize *paper_size; gdouble w, h; @@ -851,7 +851,7 @@ gtk_print_operation_unix_run_dialog (GtkPrintOperation *op, { GtkWidget *pd; PrintResponseData rdata; - const gchar *printer_name; + const char *printer_name; rdata.op = op; rdata.do_print = FALSE; @@ -1056,7 +1056,7 @@ struct _PrinterFinder gboolean found_printer; GFunc func; gpointer data; - gchar *printer_name; + char *printer_name; GList *backends; guint timeout_tag; GtkPrinter *printer; @@ -1205,7 +1205,7 @@ printer_finder_free (PrinterFinder *finder) } static void -find_printer (const gchar *printer, +find_printer (const char *printer, GFunc func, gpointer data) { @@ -1260,7 +1260,7 @@ void _gtk_print_operation_platform_backend_launch_preview (GtkPrintOperation *op, cairo_surface_t *surface, GtkWindow *parent, - const gchar *filename) + const char *filename) { if (gdk_should_use_portal ()) gtk_print_operation_portal_launch_preview (op, surface, parent, filename); @@ -1273,7 +1273,7 @@ _gtk_print_operation_platform_backend_create_preview_surface (GtkPrintOperation GtkPageSetup *page_setup, gdouble *dpi_x, gdouble *dpi_y, - gchar **target) + char **target) { return gtk_print_operation_unix_create_preview_surface (op, page_setup, dpi_x, dpi_y, target); } diff --git a/gtk/gtkprintoperation-win32.c b/gtk/gtkprintoperation-win32.c index ad430760d4..55c0a554fd 100644 --- a/gtk/gtkprintoperation-win32.c +++ b/gtk/gtkprintoperation-win32.c @@ -435,11 +435,11 @@ paper_size_to_win32 (GtkPaperSize *paper_size) return 0; } -static gchar* +static char * get_default_printer (void) { wchar_t *win32_printer_name = NULL; - gchar *printer_name = NULL; + char *printer_name = NULL; DWORD needed; GetDefaultPrinterW (NULL, &needed); @@ -1585,7 +1585,7 @@ gtk_print_operation_run_without_dialog (GtkPrintOperation *op, /* No printer selected. Get the system default printer and store * it in settings. */ - gchar *tmp_printer = get_default_printer (); + char *tmp_printer = get_default_printer (); if (!tmp_printer) { result = GTK_PRINT_OPERATION_RESULT_ERROR; @@ -1970,7 +1970,7 @@ void _gtk_print_operation_platform_backend_launch_preview (GtkPrintOperation *op, cairo_surface_t *surface, GtkWindow *parent, - const gchar *filename) + const char *filename) { HDC dc; HENHMETAFILE metafile; @@ -2012,7 +2012,7 @@ _gtk_print_operation_platform_backend_create_preview_surface (GtkPrintOperation GtkPageSetup *page_setup, gdouble *dpi_x, gdouble *dpi_y, - gchar **target) + char **target) { GtkPaperSize *paper_size; HDC metafile_dc; diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c index 1410eea5a0..5a43683afb 100644 --- a/gtk/gtkprintoperation.c +++ b/gtk/gtkprintoperation.c @@ -528,7 +528,7 @@ typedef struct GtkPrintContext *print_context; GtkWindow *parent; cairo_surface_t *surface; - gchar *filename; + char *filename; gboolean wait; PrintPagesData *pages_data; } PreviewOp; @@ -1520,7 +1520,7 @@ gtk_print_operation_get_print_settings (GtkPrintOperation *op) **/ void gtk_print_operation_set_job_name (GtkPrintOperation *op, - const gchar *job_name) + const char *job_name) { GtkPrintOperationPrivate *priv = gtk_print_operation_get_instance_private (op); @@ -1690,10 +1690,10 @@ gtk_print_operation_set_track_print_status (GtkPrintOperation *op, void _gtk_print_operation_set_status (GtkPrintOperation *op, GtkPrintStatus status, - const gchar *string) + const char *string) { GtkPrintOperationPrivate *priv = gtk_print_operation_get_instance_private (op); - static const gchar *status_strs[] = { + static const char *status_strs[] = { NC_("print operation status", "Initial state"), NC_("print operation status", "Preparing to print"), NC_("print operation status", "Generating data"), @@ -1758,7 +1758,7 @@ gtk_print_operation_get_status (GtkPrintOperation *op) * Returns: a string representation of the status * of the print operation **/ -const gchar * +const char * gtk_print_operation_get_status_string (GtkPrintOperation *op) { g_return_val_if_fail (GTK_IS_PRINT_OPERATION (op), ""); @@ -1855,7 +1855,7 @@ gtk_print_operation_set_allow_async (GtkPrintOperation *op, */ void gtk_print_operation_set_custom_tab_label (GtkPrintOperation *op, - const gchar *label) + const char *label) { GtkPrintOperationPrivate *priv = gtk_print_operation_get_instance_private (op); @@ -1884,7 +1884,7 @@ gtk_print_operation_set_custom_tab_label (GtkPrintOperation *op, */ void gtk_print_operation_set_export_filename (GtkPrintOperation *op, - const gchar *filename) + const char *filename) { GtkPrintOperationPrivate *priv = gtk_print_operation_get_instance_private (op); @@ -2231,7 +2231,7 @@ static void update_progress (PrintPagesData *data) { GtkPrintOperationPrivate *priv = gtk_print_operation_get_instance_private (data->op); - gchar *text = NULL; + char *text = NULL; if (data->progress) { diff --git a/gtk/gtkprintoperation.h b/gtk/gtkprintoperation.h index 4751290210..8055e57e31 100644 --- a/gtk/gtkprintoperation.h +++ b/gtk/gtkprintoperation.h @@ -234,7 +234,7 @@ GDK_AVAILABLE_IN_ALL GtkPrintSettings * gtk_print_operation_get_print_settings (GtkPrintOperation *op); GDK_AVAILABLE_IN_ALL void gtk_print_operation_set_job_name (GtkPrintOperation *op, - const gchar *job_name); + const char *job_name); GDK_AVAILABLE_IN_ALL void gtk_print_operation_set_n_pages (GtkPrintOperation *op, int n_pages); @@ -249,7 +249,7 @@ void gtk_print_operation_set_unit (GtkPrintOper GtkUnit unit); GDK_AVAILABLE_IN_ALL void gtk_print_operation_set_export_filename (GtkPrintOperation *op, - const gchar *filename); + const char *filename); GDK_AVAILABLE_IN_ALL void gtk_print_operation_set_track_print_status (GtkPrintOperation *op, gboolean track_status); @@ -261,7 +261,7 @@ void gtk_print_operation_set_allow_async (GtkPrintOper gboolean allow_async); GDK_AVAILABLE_IN_ALL void gtk_print_operation_set_custom_tab_label (GtkPrintOperation *op, - const gchar *label); + const char *label); GDK_AVAILABLE_IN_ALL GtkPrintOperationResult gtk_print_operation_run (GtkPrintOperation *op, GtkPrintOperationAction action, @@ -273,7 +273,7 @@ void gtk_print_operation_get_error (GtkPrintOper GDK_AVAILABLE_IN_ALL GtkPrintStatus gtk_print_operation_get_status (GtkPrintOperation *op); GDK_AVAILABLE_IN_ALL -const gchar * gtk_print_operation_get_status_string (GtkPrintOperation *op); +const char * gtk_print_operation_get_status_string (GtkPrintOperation *op); GDK_AVAILABLE_IN_ALL gboolean gtk_print_operation_is_finished (GtkPrintOperation *op); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkprintsettings.c b/gtk/gtkprintsettings.c index e0a1e9582f..261e2c74e2 100644 --- a/gtk/gtkprintsettings.c +++ b/gtk/gtkprintsettings.c @@ -158,9 +158,9 @@ gtk_print_settings_copy (GtkPrintSettings *other) * * Returns: the string value for @key */ -const gchar * +const char * gtk_print_settings_get (GtkPrintSettings *settings, - const gchar *key) + const char *key) { return g_hash_table_lookup (settings->hash, key); } @@ -175,8 +175,8 @@ gtk_print_settings_get (GtkPrintSettings *settings, */ void gtk_print_settings_set (GtkPrintSettings *settings, - const gchar *key, - const gchar *value) + const char *key, + const char *value) { if (value == NULL) gtk_print_settings_unset (settings, key); @@ -196,7 +196,7 @@ gtk_print_settings_set (GtkPrintSettings *settings, */ void gtk_print_settings_unset (GtkPrintSettings *settings, - const gchar *key) + const char *key) { g_hash_table_remove (settings->hash, key); } @@ -212,7 +212,7 @@ gtk_print_settings_unset (GtkPrintSettings *settings, */ gboolean gtk_print_settings_has_key (GtkPrintSettings *settings, - const gchar *key) + const char *key) { return gtk_print_settings_get (settings, key) != NULL; } @@ -233,9 +233,9 @@ gtk_print_settings_has_key (GtkPrintSettings *settings, **/ gboolean gtk_print_settings_get_bool (GtkPrintSettings *settings, - const gchar *key) + const char *key) { - const gchar *val; + const char *val; val = gtk_print_settings_get (settings, key); if (g_strcmp0 (val, "true") == 0) @@ -261,10 +261,10 @@ gtk_print_settings_get_bool (GtkPrintSettings *settings, */ static gboolean gtk_print_settings_get_bool_with_default (GtkPrintSettings *settings, - const gchar *key, + const char *key, gboolean default_val) { - const gchar *val; + const char *val; val = gtk_print_settings_get (settings, key); if (g_strcmp0 (val, "true") == 0) @@ -286,7 +286,7 @@ gtk_print_settings_get_bool_with_default (GtkPrintSettings *settings, */ void gtk_print_settings_set_bool (GtkPrintSettings *settings, - const gchar *key, + const char *key, gboolean value) { if (value) @@ -311,10 +311,10 @@ gtk_print_settings_set_bool (GtkPrintSettings *settings, */ gdouble gtk_print_settings_get_double_with_default (GtkPrintSettings *settings, - const gchar *key, + const char *key, gdouble def) { - const gchar *val; + const char *val; val = gtk_print_settings_get (settings, key); if (val == NULL) @@ -334,7 +334,7 @@ gtk_print_settings_get_double_with_default (GtkPrintSettings *settings, */ gdouble gtk_print_settings_get_double (GtkPrintSettings *settings, - const gchar *key) + const char *key) { return gtk_print_settings_get_double_with_default (settings, key, 0.0); } @@ -349,10 +349,10 @@ gtk_print_settings_get_double (GtkPrintSettings *settings, */ void gtk_print_settings_set_double (GtkPrintSettings *settings, - const gchar *key, + const char *key, gdouble value) { - gchar buf[G_ASCII_DTOSTR_BUF_SIZE]; + char buf[G_ASCII_DTOSTR_BUF_SIZE]; g_ascii_dtostr (buf, G_ASCII_DTOSTR_BUF_SIZE, value); gtk_print_settings_set (settings, key, buf); @@ -371,7 +371,7 @@ gtk_print_settings_set_double (GtkPrintSettings *settings, */ gdouble gtk_print_settings_get_length (GtkPrintSettings *settings, - const gchar *key, + const char *key, GtkUnit unit) { gdouble length = gtk_print_settings_get_double (settings, key); @@ -389,7 +389,7 @@ gtk_print_settings_get_length (GtkPrintSettings *settings, */ void gtk_print_settings_set_length (GtkPrintSettings *settings, - const gchar *key, + const char *key, gdouble value, GtkUnit unit) { @@ -410,10 +410,10 @@ gtk_print_settings_set_length (GtkPrintSettings *settings, */ int gtk_print_settings_get_int_with_default (GtkPrintSettings *settings, - const gchar *key, + const char *key, int def) { - const gchar *val; + const char *val; val = gtk_print_settings_get (settings, key); if (val == NULL) @@ -433,7 +433,7 @@ gtk_print_settings_get_int_with_default (GtkPrintSettings *settings, */ int gtk_print_settings_get_int (GtkPrintSettings *settings, - const gchar *key) + const char *key) { return gtk_print_settings_get_int_with_default (settings, key, 0); } @@ -448,10 +448,10 @@ gtk_print_settings_get_int (GtkPrintSettings *settings, */ void gtk_print_settings_set_int (GtkPrintSettings *settings, - const gchar *key, + const char *key, int value) { - gchar buf[128]; + char buf[128]; g_sprintf (buf, "%d", value); gtk_print_settings_set (settings, key, buf); } @@ -481,7 +481,7 @@ gtk_print_settings_foreach (GtkPrintSettings *settings, * * Returns: the printer name */ -const gchar * +const char * gtk_print_settings_get_printer (GtkPrintSettings *settings) { return gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_PRINTER); @@ -498,7 +498,7 @@ gtk_print_settings_get_printer (GtkPrintSettings *settings) */ void gtk_print_settings_set_printer (GtkPrintSettings *settings, - const gchar *printer) + const char *printer) { gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_PRINTER, printer); } @@ -515,7 +515,7 @@ gtk_print_settings_set_printer (GtkPrintSettings *settings, GtkPageOrientation gtk_print_settings_get_orientation (GtkPrintSettings *settings) { - const gchar *val; + const char *val; val = gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_ORIENTATION); @@ -545,7 +545,7 @@ void gtk_print_settings_set_orientation (GtkPrintSettings *settings, GtkPageOrientation orientation) { - const gchar *val; + const char *val; switch (orientation) { @@ -578,8 +578,8 @@ gtk_print_settings_set_orientation (GtkPrintSettings *settings, GtkPaperSize * gtk_print_settings_get_paper_size (GtkPrintSettings *settings) { - const gchar *val; - const gchar *name; + const char *val; + const char *name; gdouble w, h; val = gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_PAPER_FORMAT); @@ -610,7 +610,7 @@ void gtk_print_settings_set_paper_size (GtkPrintSettings *settings, GtkPaperSize *paper_size) { - gchar *custom_name; + char *custom_name; if (paper_size == NULL) { @@ -814,7 +814,7 @@ gtk_print_settings_set_reverse (GtkPrintSettings *settings, GtkPrintDuplex gtk_print_settings_get_duplex (GtkPrintSettings *settings) { - const gchar *val; + const char *val; val = gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_DUPLEX); @@ -841,7 +841,7 @@ void gtk_print_settings_set_duplex (GtkPrintSettings *settings, GtkPrintDuplex duplex) { - const gchar *str; + const char *str; switch (duplex) { @@ -871,7 +871,7 @@ gtk_print_settings_set_duplex (GtkPrintSettings *settings, GtkPrintQuality gtk_print_settings_get_quality (GtkPrintSettings *settings) { - const gchar *val; + const char *val; val = gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_QUALITY); @@ -901,7 +901,7 @@ void gtk_print_settings_set_quality (GtkPrintSettings *settings, GtkPrintQuality quality) { - const gchar *str; + const char *str; switch (quality) { @@ -934,7 +934,7 @@ gtk_print_settings_set_quality (GtkPrintSettings *settings, GtkPageSet gtk_print_settings_get_page_set (GtkPrintSettings *settings) { - const gchar *val; + const char *val; val = gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_PAGE_SET); @@ -961,7 +961,7 @@ void gtk_print_settings_set_page_set (GtkPrintSettings *settings, GtkPageSet page_set) { - const gchar *str; + const char *str; switch (page_set) { @@ -995,7 +995,7 @@ gtk_print_settings_get_number_up_layout (GtkPrintSettings *settings) GtkTextDirection text_direction; GEnumClass *enum_class; GEnumValue *enum_value; - const gchar *val; + const char *val; g_return_val_if_fail (GTK_IS_PRINT_SETTINGS (settings), GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM); @@ -1258,7 +1258,7 @@ gtk_print_settings_set_scale (GtkPrintSettings *settings, GtkPrintPages gtk_print_settings_get_print_pages (GtkPrintSettings *settings) { - const gchar *val; + const char *val; val = gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_PRINT_PAGES); @@ -1288,7 +1288,7 @@ void gtk_print_settings_set_print_pages (GtkPrintSettings *settings, GtkPrintPages pages) { - const gchar *str; + const char *str; switch (pages) { @@ -1325,8 +1325,8 @@ GtkPageRange * gtk_print_settings_get_page_ranges (GtkPrintSettings *settings, int *num_ranges) { - const gchar *val; - gchar **range_strs; + const char *val; + char **range_strs; GtkPageRange *ranges; int i, n; @@ -1350,7 +1350,7 @@ gtk_print_settings_get_page_ranges (GtkPrintSettings *settings, for (i = 0; i < n; i++) { int start, end; - gchar *str; + char *str; start = (int)strtol (range_strs[i], &str, 10); end = start; @@ -1416,7 +1416,7 @@ gtk_print_settings_set_page_ranges (GtkPrintSettings *settings, * * Returns: the default source */ -const gchar * +const char * gtk_print_settings_get_default_source (GtkPrintSettings *settings) { return gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_DEFAULT_SOURCE); @@ -1431,7 +1431,7 @@ gtk_print_settings_get_default_source (GtkPrintSettings *settings) */ void gtk_print_settings_set_default_source (GtkPrintSettings *settings, - const gchar *default_source) + const char *default_source) { gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_DEFAULT_SOURCE, default_source); } @@ -1446,7 +1446,7 @@ gtk_print_settings_set_default_source (GtkPrintSettings *settings, * * Returns: the media type */ -const gchar * +const char * gtk_print_settings_get_media_type (GtkPrintSettings *settings) { return gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_MEDIA_TYPE); @@ -1463,7 +1463,7 @@ gtk_print_settings_get_media_type (GtkPrintSettings *settings) */ void gtk_print_settings_set_media_type (GtkPrintSettings *settings, - const gchar *media_type) + const char *media_type) { gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_MEDIA_TYPE, media_type); } @@ -1476,7 +1476,7 @@ gtk_print_settings_set_media_type (GtkPrintSettings *settings, * * Returns: the dithering that is used */ -const gchar * +const char * gtk_print_settings_get_dither (GtkPrintSettings *settings) { return gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_DITHER); @@ -1491,7 +1491,7 @@ gtk_print_settings_get_dither (GtkPrintSettings *settings) */ void gtk_print_settings_set_dither (GtkPrintSettings *settings, - const gchar *dither) + const char *dither) { gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_DITHER, dither); } @@ -1504,7 +1504,7 @@ gtk_print_settings_set_dither (GtkPrintSettings *settings, * * Returns: the finishings */ -const gchar * +const char * gtk_print_settings_get_finishings (GtkPrintSettings *settings) { return gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_FINISHINGS); @@ -1519,7 +1519,7 @@ gtk_print_settings_get_finishings (GtkPrintSettings *settings) */ void gtk_print_settings_set_finishings (GtkPrintSettings *settings, - const gchar *finishings) + const char *finishings) { gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_FINISHINGS, finishings); } @@ -1532,7 +1532,7 @@ gtk_print_settings_set_finishings (GtkPrintSettings *settings, * * Returns: the output bin */ -const gchar * +const char * gtk_print_settings_get_output_bin (GtkPrintSettings *settings) { return gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_OUTPUT_BIN); @@ -1547,7 +1547,7 @@ gtk_print_settings_get_output_bin (GtkPrintSettings *settings) */ void gtk_print_settings_set_output_bin (GtkPrintSettings *settings, - const gchar *output_bin) + const char *output_bin) { gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_OUTPUT_BIN, output_bin); } @@ -1566,7 +1566,7 @@ gtk_print_settings_set_output_bin (GtkPrintSettings *settings, */ gboolean gtk_print_settings_load_file (GtkPrintSettings *settings, - const gchar *file_name, + const char *file_name, GError **error) { gboolean retval = FALSE; @@ -1599,7 +1599,7 @@ gtk_print_settings_load_file (GtkPrintSettings *settings, * Returns: the restored #GtkPrintSettings */ GtkPrintSettings * -gtk_print_settings_new_from_file (const gchar *file_name, +gtk_print_settings_new_from_file (const char *file_name, GError **error) { GtkPrintSettings *settings = gtk_print_settings_new (); @@ -1630,10 +1630,10 @@ gtk_print_settings_new_from_file (const gchar *file_name, gboolean gtk_print_settings_load_key_file (GtkPrintSettings *settings, GKeyFile *key_file, - const gchar *group_name, + const char *group_name, GError **error) { - gchar **keys; + char **keys; gsize n_keys, i; GError *err = NULL; @@ -1655,7 +1655,7 @@ gtk_print_settings_load_key_file (GtkPrintSettings *settings, for (i = 0 ; i < n_keys; ++i) { - gchar *value; + char *value; value = g_key_file_get_string (key_file, group_name, @@ -1689,7 +1689,7 @@ gtk_print_settings_load_key_file (GtkPrintSettings *settings, */ GtkPrintSettings * gtk_print_settings_new_from_key_file (GKeyFile *key_file, - const gchar *group_name, + const char *group_name, GError **error) { GtkPrintSettings *settings = gtk_print_settings_new (); @@ -1718,7 +1718,7 @@ gtk_print_settings_new_from_key_file (GKeyFile *key_file, */ gboolean gtk_print_settings_to_file (GtkPrintSettings *settings, - const gchar *file_name, + const char *file_name, GError **error) { GKeyFile *key_file; @@ -1751,12 +1751,12 @@ out: typedef struct { GKeyFile *key_file; - const gchar *group_name; + const char *group_name; } SettingsData; static void -add_value_to_key_file (const gchar *key, - const gchar *value, +add_value_to_key_file (const char *key, + const char *value, SettingsData *data) { g_key_file_set_string (data->key_file, data->group_name, key, value); @@ -1774,7 +1774,7 @@ add_value_to_key_file (const gchar *key, void gtk_print_settings_to_key_file (GtkPrintSettings *settings, GKeyFile *key_file, - const gchar *group_name) + const char *group_name) { SettingsData data; @@ -1793,8 +1793,8 @@ gtk_print_settings_to_key_file (GtkPrintSettings *settings, } static void -add_to_variant (const gchar *key, - const gchar *value, +add_to_variant (const char *key, + const char *value, gpointer data) { GVariantBuilder *builder = data; diff --git a/gtk/gtkprintsettings.h b/gtk/gtkprintsettings.h index e019a54323..2b624c06ef 100644 --- a/gtk/gtkprintsettings.h +++ b/gtk/gtkprintsettings.h @@ -33,8 +33,8 @@ typedef struct _GtkPrintSettings GtkPrintSettings; #define GTK_PRINT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PRINT_SETTINGS, GtkPrintSettings)) #define GTK_IS_PRINT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PRINT_SETTINGS)) -typedef void (*GtkPrintSettingsFunc) (const gchar *key, - const gchar *value, +typedef void (*GtkPrintSettingsFunc) (const char *key, + const char *value, gpointer user_data); typedef struct _GtkPageRange GtkPageRange; @@ -60,83 +60,83 @@ GDK_AVAILABLE_IN_ALL GtkPrintSettings *gtk_print_settings_copy (GtkPrintSettings *other); GDK_AVAILABLE_IN_ALL -GtkPrintSettings *gtk_print_settings_new_from_file (const gchar *file_name, +GtkPrintSettings *gtk_print_settings_new_from_file (const char *file_name, GError **error); GDK_AVAILABLE_IN_ALL gboolean gtk_print_settings_load_file (GtkPrintSettings *settings, - const gchar *file_name, + const char *file_name, GError **error); GDK_AVAILABLE_IN_ALL gboolean gtk_print_settings_to_file (GtkPrintSettings *settings, - const gchar *file_name, + const char *file_name, GError **error); GDK_AVAILABLE_IN_ALL GtkPrintSettings *gtk_print_settings_new_from_key_file (GKeyFile *key_file, - const gchar *group_name, + const char *group_name, GError **error); GDK_AVAILABLE_IN_ALL gboolean gtk_print_settings_load_key_file (GtkPrintSettings *settings, GKeyFile *key_file, - const gchar *group_name, + const char *group_name, GError **error); GDK_AVAILABLE_IN_ALL void gtk_print_settings_to_key_file (GtkPrintSettings *settings, GKeyFile *key_file, - const gchar *group_name); + const char *group_name); GDK_AVAILABLE_IN_ALL gboolean gtk_print_settings_has_key (GtkPrintSettings *settings, - const gchar *key); + const char *key); GDK_AVAILABLE_IN_ALL -const gchar * gtk_print_settings_get (GtkPrintSettings *settings, - const gchar *key); +const char * gtk_print_settings_get (GtkPrintSettings *settings, + const char *key); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set (GtkPrintSettings *settings, - const gchar *key, - const gchar *value); + const char *key, + const char *value); GDK_AVAILABLE_IN_ALL void gtk_print_settings_unset (GtkPrintSettings *settings, - const gchar *key); + const char *key); GDK_AVAILABLE_IN_ALL void gtk_print_settings_foreach (GtkPrintSettings *settings, GtkPrintSettingsFunc func, gpointer user_data); GDK_AVAILABLE_IN_ALL gboolean gtk_print_settings_get_bool (GtkPrintSettings *settings, - const gchar *key); + const char *key); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_bool (GtkPrintSettings *settings, - const gchar *key, + const char *key, gboolean value); GDK_AVAILABLE_IN_ALL gdouble gtk_print_settings_get_double (GtkPrintSettings *settings, - const gchar *key); + const char *key); GDK_AVAILABLE_IN_ALL gdouble gtk_print_settings_get_double_with_default (GtkPrintSettings *settings, - const gchar *key, + const char *key, gdouble def); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_double (GtkPrintSettings *settings, - const gchar *key, + const char *key, gdouble value); GDK_AVAILABLE_IN_ALL gdouble gtk_print_settings_get_length (GtkPrintSettings *settings, - const gchar *key, + const char *key, GtkUnit unit); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_length (GtkPrintSettings *settings, - const gchar *key, + const char *key, gdouble value, GtkUnit unit); GDK_AVAILABLE_IN_ALL int gtk_print_settings_get_int (GtkPrintSettings *settings, - const gchar *key); + const char *key); GDK_AVAILABLE_IN_ALL int gtk_print_settings_get_int_with_default (GtkPrintSettings *settings, - const gchar *key, + const char *key, int def); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_int (GtkPrintSettings *settings, - const gchar *key, + const char *key, int value); #define GTK_PRINT_SETTINGS_PRINTER "printer" @@ -206,10 +206,10 @@ void gtk_print_settings_set_int (GtkPrintSettings /* Helpers: */ GDK_AVAILABLE_IN_ALL -const gchar * gtk_print_settings_get_printer (GtkPrintSettings *settings); +const char * gtk_print_settings_get_printer (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_printer (GtkPrintSettings *settings, - const gchar *printer); + const char *printer); GDK_AVAILABLE_IN_ALL GtkPageOrientation gtk_print_settings_get_orientation (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL @@ -315,30 +315,30 @@ GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_page_set (GtkPrintSettings *settings, GtkPageSet page_set); GDK_AVAILABLE_IN_ALL -const gchar * gtk_print_settings_get_default_source (GtkPrintSettings *settings); +const char * gtk_print_settings_get_default_source (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_default_source (GtkPrintSettings *settings, - const gchar *default_source); + const char *default_source); GDK_AVAILABLE_IN_ALL -const gchar * gtk_print_settings_get_media_type (GtkPrintSettings *settings); +const char * gtk_print_settings_get_media_type (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_media_type (GtkPrintSettings *settings, - const gchar *media_type); + const char *media_type); GDK_AVAILABLE_IN_ALL -const gchar * gtk_print_settings_get_dither (GtkPrintSettings *settings); +const char * gtk_print_settings_get_dither (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_dither (GtkPrintSettings *settings, - const gchar *dither); + const char *dither); GDK_AVAILABLE_IN_ALL -const gchar * gtk_print_settings_get_finishings (GtkPrintSettings *settings); +const char * gtk_print_settings_get_finishings (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_finishings (GtkPrintSettings *settings, - const gchar *finishings); + const char *finishings); GDK_AVAILABLE_IN_ALL -const gchar * gtk_print_settings_get_output_bin (GtkPrintSettings *settings); +const char * gtk_print_settings_get_output_bin (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_output_bin (GtkPrintSettings *settings, - const gchar *output_bin); + const char *output_bin); GDK_AVAILABLE_IN_ALL GVariant *gtk_print_settings_to_gvariant (GtkPrintSettings *settings); diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index 75645e0b7c..2b1c89e346 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -180,7 +180,7 @@ static gboolean dialog_get_reverse (GtkPrintUnixDialog *dialog); static int dialog_get_n_copies (GtkPrintUnixDialog *dialog); static gboolean set_active_printer (GtkPrintUnixDialog *dialog, - const gchar *printer_name); + const char *printer_name); static void redraw_page_layout_preview (GtkPrintUnixDialog *dialog); static GListModel *load_print_backends (GtkPrintUnixDialog *dialog); @@ -188,9 +188,9 @@ static GListModel *load_print_backends (GtkPrintUnixDialog *dialog); static void gtk_print_unix_dialog_buildable_init (GtkBuildableIface *iface); static GObject *gtk_print_unix_dialog_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *childname); + const char *childname); -static const gchar common_paper_sizes[][16] = { +static const char common_paper_sizes[][16] = { "na_letter", "na_legal", "iso_a4", @@ -332,7 +332,7 @@ struct _GtkPrintUnixDialog gulong options_changed_handler; gulong mark_conflicts_id; - gchar *format_for_printer; + char *format_for_printer; int current_page; GtkCssNode *collate_paper_node; @@ -968,7 +968,7 @@ gtk_print_unix_dialog_buildable_init (GtkBuildableIface *iface) static GObject * gtk_print_unix_dialog_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *childname) + const char *childname) { GtkPrintUnixDialog *dialog = GTK_PRINT_UNIX_DIALOG (buildable); @@ -1201,11 +1201,11 @@ default_printer_list_sort_func (gconstpointer a, } static GtkWidget * -wrap_in_frame (const gchar *label, +wrap_in_frame (const char *label, GtkWidget *child) { GtkWidget *box, *label_widget; - gchar *bold_text; + char *bold_text; label_widget = gtk_label_new (NULL); gtk_widget_set_halign (label_widget, GTK_ALIGN_START); @@ -1230,7 +1230,7 @@ wrap_in_frame (const gchar *label, static gboolean setup_option (GtkPrintUnixDialog *dialog, - const gchar *option_name, + const char *option_name, GtkPrinterOptionWidget *widget) { GtkPrinterOption *option; @@ -1341,7 +1341,7 @@ add_option_to_table (GtkPrinterOption *option, static void setup_page_table (GtkPrinterOptionSet *options, - const gchar *group, + const char *group, GtkWidget *table, GtkWidget *page) { @@ -1381,7 +1381,7 @@ update_print_at_option (GtkPrintUnixDialog *dialog) option = gtk_printer_option_set_lookup (dialog->options, "gtk-print-time-text"); if (option != NULL) { - const gchar *text; + const char *text; text = gtk_editable_get_text (GTK_EDITABLE (dialog->print_at_entry)); gtk_printer_option_set (option, text); @@ -1441,7 +1441,7 @@ static void update_dialog_from_settings (GtkPrintUnixDialog *dialog) { GList *groups, *l; - gchar *group; + char *group; GtkWidget *table, *frame; gboolean has_advanced, has_job; guint nrows; @@ -1559,7 +1559,7 @@ update_dialog_from_capabilities (GtkPrintUnixDialog *dialog) { GtkPrintCapabilities caps; gboolean can_collate; - const gchar *copies; + const char *copies; GtkWidget *button; copies = gtk_editable_get_text (GTK_EDITABLE (dialog->copies_spin)); @@ -2055,7 +2055,7 @@ update_print_at_entry_sensitivity (GtkWidget *button, } static gboolean -is_range_separator (gchar c) +is_range_separator (char c) { return (c == ',' || c == ';' || c == ':'); } @@ -2065,8 +2065,8 @@ dialog_get_page_ranges (GtkPrintUnixDialog *dialog, int *n_ranges_out) { int i, n_ranges; - const gchar *text, *p; - gchar *next; + const char *text, *p; + char *next; GtkPageRange *ranges; int start, end; @@ -2228,8 +2228,8 @@ static int dialog_get_n_copies (GtkPrintUnixDialog *dialog) { GtkAdjustment *adjustment; - const gchar *text; - gchar *endptr = NULL; + const char *text; + char *endptr = NULL; int n_copies; adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (dialog->copies_spin)); @@ -2292,7 +2292,7 @@ dialog_set_reverse (GtkPrintUnixDialog *dialog, static int dialog_get_pages_per_sheet (GtkPrintUnixDialog *dialog) { - const gchar *val; + const char *val; int num; val = gtk_printer_option_widget_get_value (dialog->pages_per_sheet); @@ -2314,7 +2314,7 @@ dialog_get_number_up_layout (GtkPrintUnixDialog *dialog) { GtkPrintCapabilities caps; GtkNumberUpLayout layout; - const gchar *val; + const char *val; GEnumClass *enum_class; GEnumValue *enum_value; @@ -2367,7 +2367,7 @@ draw_page (GtkDrawingArea *da, gboolean landscape; PangoLayout *layout; PangoFontDescription *font; - gchar *text; + char *text; GdkRGBA color; GtkNumberUpLayout number_up_layout; int start_x, end_x, start_y, end_y; @@ -3035,7 +3035,7 @@ paper_size_changed (GtkDropDown *combo_box, * Returns: a new #GtkPrintUnixDialog */ GtkWidget * -gtk_print_unix_dialog_new (const gchar *title, +gtk_print_unix_dialog_new (const char *title, GtkWindow *parent) { GtkWidget *result; @@ -3164,7 +3164,7 @@ gtk_print_unix_dialog_get_current_page (GtkPrintUnixDialog *dialog) static gboolean set_active_printer (GtkPrintUnixDialog *dialog, - const gchar *printer_name) + const char *printer_name) { GListModel *model; GtkPrinter *printer; @@ -3206,7 +3206,7 @@ void gtk_print_unix_dialog_set_settings (GtkPrintUnixDialog *dialog, GtkPrintSettings *settings) { - const gchar *printer; + const char *printer; GtkPageRange *ranges; int num_ranges; diff --git a/gtk/gtkprintunixdialog.h b/gtk/gtkprintunixdialog.h index 1555668358..fa0b231833 100644 --- a/gtk/gtkprintunixdialog.h +++ b/gtk/gtkprintunixdialog.h @@ -39,7 +39,7 @@ typedef struct _GtkPrintUnixDialog GtkPrintUnixDialog; GDK_AVAILABLE_IN_ALL GType gtk_print_unix_dialog_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget * gtk_print_unix_dialog_new (const gchar *title, +GtkWidget * gtk_print_unix_dialog_new (const char *title, GtkWindow *parent); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkprivate.c b/gtk/gtkprivate.c index 105cf4a8ce..8f3babd83c 100644 --- a/gtk/gtkprivate.c +++ b/gtk/gtkprivate.c @@ -35,31 +35,31 @@ #if !defined G_OS_WIN32 && !(defined GDK_WINDOWING_QUARTZ && defined QUARTZ_RELOCATION) -const gchar * +const char * _gtk_get_datadir (void) { return GTK_DATADIR; } -const gchar * +const char * _gtk_get_libdir (void) { return GTK_LIBDIR; } -const gchar * +const char * _gtk_get_sysconfdir (void) { return GTK_SYSCONFDIR; } -const gchar * +const char * _gtk_get_localedir (void) { return GTK_LOCALEDIR; } -const gchar * +const char * _gtk_get_data_prefix (void) { return GTK_DATA_PREFIX; @@ -92,7 +92,7 @@ _gtk_get_data_prefix (void) * Returns: a dynamically allocated string, free with g_free(). */ -gchar * +char * _gtk_get_lc_ctype (void) { #ifdef G_OS_WIN32 @@ -106,7 +106,7 @@ _gtk_get_lc_ctype (void) * don't have to clickety-click in the Control Panel, you can simply * start the program with LC_ALL=something on the command line.) */ - gchar *p; + char *p; p = getenv ("LC_ALL"); if (p != NULL) @@ -149,7 +149,7 @@ _gtk_single_string_accumulator (GSignalInvocationHint *ihint, gpointer dummy) { gboolean continue_emission; - const gchar *str; + const char *str; str = g_value_get_string (handler_return); g_value_set_string (return_accu, str); diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h index 4985f2d125..f3c7148b2e 100644 --- a/gtk/gtkprivate.h +++ b/gtk/gtkprivate.h @@ -52,17 +52,17 @@ G_BEGIN_DECLS #define gtk_internal_return_val_if_fail(__expr, __val) g_return_val_if_fail(__expr, __val) #endif -const gchar * _gtk_get_datadir (void); -const gchar * _gtk_get_libdir (void); -const gchar * _gtk_get_sysconfdir (void); -const gchar * _gtk_get_localedir (void); -const gchar * _gtk_get_data_prefix (void); +const char * _gtk_get_datadir (void); +const char * _gtk_get_libdir (void); +const char * _gtk_get_sysconfdir (void); +const char * _gtk_get_localedir (void); +const char * _gtk_get_data_prefix (void); gboolean _gtk_fnmatch (const char *pattern, const char *string, gboolean no_leading_period); -gchar * _gtk_get_lc_ctype (void); +char * _gtk_get_lc_ctype (void); void _gtk_ensure_resources (void); diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c index 8490024f4b..7f020026ed 100644 --- a/gtk/gtkprogressbar.c +++ b/gtk/gtkprogressbar.c @@ -95,7 +95,7 @@ struct _GtkProgressBar { GtkWidget parent_instance; - gchar *text; + char *text; GtkWidget *label; GtkWidget *trough_widget; @@ -571,7 +571,7 @@ gtk_progress_bar_finalize (GObject *object) G_OBJECT_CLASS (gtk_progress_bar_parent_class)->finalize (object); } -static gchar * +static char * get_current_text (GtkProgressBar *pbar) { if (pbar->text) @@ -792,7 +792,7 @@ gtk_progress_bar_pulse (GtkProgressBar *pbar) */ void gtk_progress_bar_set_text (GtkProgressBar *pbar, - const gchar *text) + const char *text) { g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar)); @@ -975,7 +975,7 @@ gtk_progress_bar_set_inverted (GtkProgressBar *pbar, * Returns: (nullable): text, or %NULL; this string is owned by the widget * and should not be modified or freed. */ -const gchar* +const char * gtk_progress_bar_get_text (GtkProgressBar *pbar) { g_return_val_if_fail (GTK_IS_PROGRESS_BAR (pbar), NULL); diff --git a/gtk/gtkprogressbar.h b/gtk/gtkprogressbar.h index 48a05984a0..dcacd26b8a 100644 --- a/gtk/gtkprogressbar.h +++ b/gtk/gtkprogressbar.h @@ -50,7 +50,7 @@ GDK_AVAILABLE_IN_ALL void gtk_progress_bar_pulse (GtkProgressBar *pbar); GDK_AVAILABLE_IN_ALL void gtk_progress_bar_set_text (GtkProgressBar *pbar, - const gchar *text); + const char *text); GDK_AVAILABLE_IN_ALL void gtk_progress_bar_set_fraction (GtkProgressBar *pbar, gdouble fraction); @@ -63,7 +63,7 @@ void gtk_progress_bar_set_inverted (GtkProgressBar *pbar, gboolean inverted); GDK_AVAILABLE_IN_ALL -const gchar * gtk_progress_bar_get_text (GtkProgressBar *pbar); +const char * gtk_progress_bar_get_text (GtkProgressBar *pbar); GDK_AVAILABLE_IN_ALL gdouble gtk_progress_bar_get_fraction (GtkProgressBar *pbar); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkquartz.c b/gtk/gtkquartz.c index cb375a2f14..dc32364879 100644 --- a/gtk/gtkquartz.c +++ b/gtk/gtkquartz.c @@ -216,20 +216,20 @@ _gtk_quartz_get_selection_data_from_pasteboard (NSPasteboard *pasteboard, { if ([[pasteboard types] containsObject:NSFilenamesPboardType]) { - gchar **uris; + char **uris; NSArray *files = [pasteboard propertyListForType:NSFilenamesPboardType]; int n_files = [files count]; int i; selection_data->target = g_intern_static_string ("text/uri-list"); - uris = (gchar **) g_malloc (sizeof (gchar*) * (n_files + 1)); + uris = (char **) g_malloc (sizeof (char *) * (n_files + 1)); for (i = 0; i < n_files; ++i) { NSString* uriString = [files objectAtIndex:i]; uriString = [@"file://" stringByAppendingString:uriString]; uriString = [uriString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - uris[i] = (gchar *) [uriString cStringUsingEncoding:NSUTF8StringEncoding]; + uris[i] = (char *) [uriString cStringUsingEncoding:NSUTF8StringEncoding]; } uris[i] = NULL; @@ -238,12 +238,12 @@ _gtk_quartz_get_selection_data_from_pasteboard (NSPasteboard *pasteboard, } else if ([[pasteboard types] containsObject:NSURLPboardType]) { - gchar *uris[2]; + char *uris[2]; NSURL *url = [NSURL URLFromPasteboard:pasteboard]; selection_data->target = g_intern_static_string ("text/uri-list"); - uris[0] = (gchar *) [[url description] UTF8String]; + uris[0] = (char *) [[url description] UTF8String]; uris[1] = NULL; gtk_selection_data_set_uris (selection_data, uris); @@ -308,7 +308,7 @@ _gtk_quartz_set_selection_data_for_pasteboard (NSPasteboard *pasteboard, } else if ([type isEqualTo:NSURLPboardType]) { - gchar **uris; + char **uris; uris = gtk_selection_data_get_uris (selection_data); if (uris != NULL) @@ -335,16 +335,16 @@ _gtk_quartz_set_selection_data_for_pasteboard (NSPasteboard *pasteboard, * to test for that and remove the last element. */ -static const gchar * +static const char * get_bundle_path (void) { - static gchar *path = NULL; + static char *path = NULL; if (path == NULL) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - gchar *resource_path = g_strdup ([[[NSBundle mainBundle] resourcePath] UTF8String]); - gchar *base; + char *resource_path = g_strdup ([[[NSBundle mainBundle] resourcePath] UTF8String]); + char *base; [pool drain]; base = g_path_get_basename (resource_path); @@ -360,10 +360,10 @@ get_bundle_path (void) return path; } -const gchar * +const char * _gtk_get_datadir (void) { - static gchar *path = NULL; + static char *path = NULL; if (path == NULL) path = g_build_filename (get_bundle_path (), "share", NULL); @@ -371,10 +371,10 @@ _gtk_get_datadir (void) return path; } -const gchar * +const char * _gtk_get_libdir (void) { - static gchar *path = NULL; + static char *path = NULL; if (path == NULL) path = g_build_filename (get_bundle_path (), "lib", NULL); @@ -382,10 +382,10 @@ _gtk_get_libdir (void) return path; } -const gchar * +const char * _gtk_get_localedir (void) { - static gchar *path = NULL; + static char *path = NULL; if (path == NULL) path = g_build_filename (get_bundle_path (), "share", "locale", NULL); @@ -393,10 +393,10 @@ _gtk_get_localedir (void) return path; } -const gchar * +const char * _gtk_get_sysconfdir (void) { - static gchar *path = NULL; + static char *path = NULL; if (path == NULL) path = g_build_filename (get_bundle_path (), "etc", NULL); @@ -404,7 +404,7 @@ _gtk_get_sysconfdir (void) return path; } -const gchar * +const char * _gtk_get_data_prefix (void) { return get_bundle_path (); diff --git a/gtk/gtkquartz.h b/gtk/gtkquartz.h index bf7dee6df1..f55ac8518a 100644 --- a/gtk/gtkquartz.h +++ b/gtk/gtkquartz.h @@ -40,11 +40,11 @@ void _gtk_quartz_set_selection_data_for_pasteboard (NSPasteboard *pasteboard, NSImage *_gtk_quartz_create_image_from_surface (cairo_surface_t *surface); void _gtk_clipboard_handle_event (GdkEventOwnerChange *event); void _gtk_clipboard_store_all (void); -const gchar * _gtk_get_datadir (void); -const gchar * _gtk_get_libdir (void); -const gchar * _gtk_get_localedir (void); -const gchar * _gtk_get_sysconfdir (void); -const gchar * _gtk_get_data_prefix (void); +const char * _gtk_get_datadir (void); +const char * _gtk_get_libdir (void); +const char * _gtk_get_localedir (void); +const char * _gtk_get_sysconfdir (void); +const char * _gtk_get_data_prefix (void); G_END_DECLS diff --git a/gtk/gtkquery.c b/gtk/gtkquery.c index 0078baae37..cabaa0338b 100644 --- a/gtk/gtkquery.c +++ b/gtk/gtkquery.c @@ -26,10 +26,10 @@ struct _GtkQueryPrivate { - gchar *text; + char *text; GFile *location; GList *mime_types; - gchar **words; + char **words; }; G_DEFINE_TYPE_WITH_PRIVATE (GtkQuery, gtk_query, G_TYPE_OBJECT) @@ -68,7 +68,7 @@ gtk_query_new (void) } -const gchar * +const char * gtk_query_get_text (GtkQuery *query) { GtkQueryPrivate *priv = gtk_query_get_instance_private (query); @@ -78,7 +78,7 @@ gtk_query_get_text (GtkQuery *query) void gtk_query_set_text (GtkQuery *query, - const gchar *text) + const char *text) { GtkQueryPrivate *priv = gtk_query_get_instance_private (query); @@ -106,10 +106,10 @@ gtk_query_set_location (GtkQuery *query, g_set_object (&priv->location, file); } -static gchar * -prepare_string_for_compare (const gchar *string) +static char * +prepare_string_for_compare (const char *string) { - gchar *normalized, *res; + char *normalized, *res; normalized = g_utf8_normalize (string, -1, G_NORMALIZE_NFD); res = g_utf8_strdown (normalized, -1); @@ -120,10 +120,10 @@ prepare_string_for_compare (const gchar *string) gboolean gtk_query_matches_string (GtkQuery *query, - const gchar *string) + const char *string) { GtkQueryPrivate *priv = gtk_query_get_instance_private (query); - gchar *prepared; + char *prepared; gboolean found; int i; diff --git a/gtk/gtkquery.h b/gtk/gtkquery.h index 4d18ae3e80..9bff68a476 100644 --- a/gtk/gtkquery.h +++ b/gtk/gtkquery.h @@ -51,16 +51,16 @@ GType gtk_query_get_type (void); GtkQuery *gtk_query_new (void); -const gchar *gtk_query_get_text (GtkQuery *query); +const char *gtk_query_get_text (GtkQuery *query); void gtk_query_set_text (GtkQuery *query, - const gchar *text); + const char *text); GFile *gtk_query_get_location (GtkQuery *query); void gtk_query_set_location (GtkQuery *query, GFile *file); gboolean gtk_query_matches_string (GtkQuery *query, - const gchar *string); + const char *string); G_END_DECLS diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c index 4d67d0ddca..5a7e4a825b 100644 --- a/gtk/gtkradiobutton.c +++ b/gtk/gtkradiobutton.c @@ -464,7 +464,7 @@ gtk_radio_button_new (GSList *group) */ GtkWidget* gtk_radio_button_new_with_label (GSList *group, - const gchar *label) + const char *label) { GtkWidget *radio_button; @@ -493,7 +493,7 @@ gtk_radio_button_new_with_label (GSList *group, */ GtkWidget* gtk_radio_button_new_with_mnemonic (GSList *group, - const gchar *label) + const char *label) { GtkWidget *radio_button; @@ -539,7 +539,7 @@ gtk_radio_button_new_from_widget (GtkRadioButton *radio_group_member) */ GtkWidget* gtk_radio_button_new_with_label_from_widget (GtkRadioButton *radio_group_member, - const gchar *label) + const char *label) { GSList *l = NULL; if (radio_group_member) @@ -561,7 +561,7 @@ gtk_radio_button_new_with_label_from_widget (GtkRadioButton *radio_group_member, **/ GtkWidget* gtk_radio_button_new_with_mnemonic_from_widget (GtkRadioButton *radio_group_member, - const gchar *label) + const char *label) { GSList *l = NULL; if (radio_group_member) diff --git a/gtk/gtkradiobutton.h b/gtk/gtkradiobutton.h index eb2d74582c..d2922fd3da 100644 --- a/gtk/gtkradiobutton.h +++ b/gtk/gtkradiobutton.h @@ -51,16 +51,16 @@ GDK_AVAILABLE_IN_ALL GtkWidget* gtk_radio_button_new_from_widget (GtkRadioButton *radio_group_member); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_radio_button_new_with_label (GSList *group, - const gchar *label); + const char *label); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_radio_button_new_with_label_from_widget (GtkRadioButton *radio_group_member, - const gchar *label); + const char *label); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_radio_button_new_with_mnemonic (GSList *group, - const gchar *label); + const char *label); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_radio_button_new_with_mnemonic_from_widget (GtkRadioButton *radio_group_member, - const gchar *label); + const char *label); GDK_AVAILABLE_IN_ALL GSList* gtk_radio_button_get_group (GtkRadioButton *radio_button); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c index 8a6ae8c23d..2422f20d85 100644 --- a/gtk/gtkrecentmanager.c +++ b/gtk/gtkrecentmanager.c @@ -120,8 +120,8 @@ typedef struct { - gchar *name; - gchar *exec; + char *name; + char *exec; guint count; @@ -139,16 +139,16 @@ typedef struct */ struct _GtkRecentInfo { - gchar *uri; + char *uri; - gchar *display_name; - gchar *description; + char *display_name; + char *description; time_t added; time_t modified; time_t visited; - gchar *mime_type; + char *mime_type; RecentAppInfo *applications; int n_applications; @@ -164,7 +164,7 @@ struct _GtkRecentInfo struct _GtkRecentManagerPrivate { - gchar *filename; + char *filename; guint is_dirty : 1; @@ -208,7 +208,7 @@ static void gtk_recent_manager_monitor_changed (GFileMonitor *monit static void gtk_recent_manager_changed (GtkRecentManager *manager); static void gtk_recent_manager_real_changed (GtkRecentManager *manager); static void gtk_recent_manager_set_filename (GtkRecentManager *manager, - const gchar *filename); + const char *filename); static void gtk_recent_manager_clamp_to_age (GtkRecentManager *manager, int age); static void gtk_recent_manager_clamp_to_size (GtkRecentManager *manager, @@ -221,7 +221,7 @@ static void build_recent_items_list (GtkRecentManager *manag static void purge_recent_items_list (GtkRecentManager *manager, GError **error); -static GtkRecentInfo *gtk_recent_info_new (const gchar *uri); +static GtkRecentInfo *gtk_recent_info_new (const char *uri); static void gtk_recent_info_free (GtkRecentInfo *recent_info); static guint signal_changed = 0; @@ -235,10 +235,10 @@ G_DEFINE_TYPE_WITH_PRIVATE (GtkRecentManager, gtk_recent_manager, G_TYPE_OBJECT) * contain only lowercase ascii. */ static gboolean -has_case_prefix (const gchar *haystack, - const gchar *needle) +has_case_prefix (const char *haystack, + const char *needle) { - const gchar *h, *n; + const char *h, *n; /* Eat one character at a time. */ h = haystack; @@ -490,7 +490,7 @@ gtk_recent_manager_real_changed (GtkRecentManager *manager) g_bookmark_file_to_file (priv->recent_items, priv->filename, &write_error); if (write_error) { - gchar *utf8 = g_filename_to_utf8 (priv->filename, -1, NULL, NULL, NULL); + char *utf8 = g_filename_to_utf8 (priv->filename, -1, NULL, NULL, NULL); g_warning ("Attempting to store changes into '%s', but failed: %s", utf8 ? utf8 : "(invalid filename)", write_error->message); @@ -500,7 +500,7 @@ gtk_recent_manager_real_changed (GtkRecentManager *manager) if (g_chmod (priv->filename, 0600) < 0) { - gchar *utf8 = g_filename_to_utf8 (priv->filename, -1, NULL, NULL, NULL); + char *utf8 = g_filename_to_utf8 (priv->filename, -1, NULL, NULL, NULL); g_warning ("Attempting to set the permissions of '%s', but failed: %s", utf8 ? utf8 : "(invalid filename)", g_strerror (errno)); @@ -554,7 +554,7 @@ gtk_recent_manager_monitor_changed (GFileMonitor *monitor, } } -static gchar * +static char * get_default_filename (void) { if (g_mkdir_with_parents (g_get_user_data_dir (), 0755) == -1) @@ -576,7 +576,7 @@ get_default_filename (void) static void gtk_recent_manager_set_filename (GtkRecentManager *manager, - const gchar *filename) + const char *filename) { GtkRecentManagerPrivate *priv; GFile *file; @@ -627,7 +627,7 @@ gtk_recent_manager_set_filename (GtkRecentManager *manager, priv->monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL, &error); if (error) { - gchar *utf8 = g_filename_to_utf8 (priv->filename, -1, NULL, NULL, NULL); + char *utf8 = g_filename_to_utf8 (priv->filename, -1, NULL, NULL, NULL); g_warning ("Unable to monitor '%s': %s\n" "The GtkRecentManager will not update its contents " "if the file is changed from other instances", @@ -683,7 +683,7 @@ build_recent_items_list (GtkRecentManager *manager) if (read_error->domain == G_FILE_ERROR && read_error->code != G_FILE_ERROR_NOENT) { - gchar *utf8 = g_filename_to_utf8 (priv->filename, -1, NULL, NULL, NULL); + char *utf8 = g_filename_to_utf8 (priv->filename, -1, NULL, NULL, NULL); g_warning ("Attempting to read the recently used resources " "file at '%s', but the parser failed: %s.", utf8 ? utf8 : "(invalid filename)", @@ -764,7 +764,7 @@ gtk_recent_manager_add_item_query_info (GObject *source_object, GtkRecentManager *manager = user_data; GtkRecentData recent_data; GFileInfo *file_info; - gchar *uri, *basename, *content_type; + char *uri, *basename, *content_type; uri = g_file_get_uri (file); @@ -835,7 +835,7 @@ gtk_recent_manager_add_item_query_info (GObject *source_object, */ gboolean gtk_recent_manager_add_item (GtkRecentManager *manager, - const gchar *uri) + const char *uri) { GFile* file; @@ -888,7 +888,7 @@ gtk_recent_manager_add_item (GtkRecentManager *manager, */ gboolean gtk_recent_manager_add_full (GtkRecentManager *manager, - const gchar *uri, + const char *uri, const GtkRecentData *data) { GtkRecentManagerPrivate *priv; @@ -1010,7 +1010,7 @@ gtk_recent_manager_add_full (GtkRecentManager *manager, */ gboolean gtk_recent_manager_remove_item (GtkRecentManager *manager, - const gchar *uri, + const char *uri, GError **error) { GtkRecentManagerPrivate *priv; @@ -1066,7 +1066,7 @@ gtk_recent_manager_remove_item (GtkRecentManager *manager, */ gboolean gtk_recent_manager_has_item (GtkRecentManager *manager, - const gchar *uri) + const char *uri) { GtkRecentManagerPrivate *priv; @@ -1083,7 +1083,7 @@ static void build_recent_info (GBookmarkFile *bookmarks, GtkRecentInfo *info) { - gchar **apps, **groups; + char **apps, **groups; gsize apps_len, groups_len, i; int app_index; @@ -1114,7 +1114,7 @@ build_recent_info (GBookmarkFile *bookmarks, info->n_applications = 0; for (i = 0; i < apps_len; i++) { - gchar *app_name, *app_exec; + char *app_name, *app_exec; guint count; time_t stamp; RecentAppInfo *app_info; @@ -1162,7 +1162,7 @@ build_recent_info (GBookmarkFile *bookmarks, */ GtkRecentInfo * gtk_recent_manager_lookup_item (GtkRecentManager *manager, - const gchar *uri, + const char *uri, GError **error) { GtkRecentManagerPrivate *priv; @@ -1223,8 +1223,8 @@ gtk_recent_manager_lookup_item (GtkRecentManager *manager, */ gboolean gtk_recent_manager_move_item (GtkRecentManager *recent_manager, - const gchar *uri, - const gchar *new_uri, + const char *uri, + const char *new_uri, GError **error) { GtkRecentManagerPrivate *priv; @@ -1291,7 +1291,7 @@ gtk_recent_manager_get_items (GtkRecentManager *manager) { GtkRecentManagerPrivate *priv; GList *retval = NULL; - gchar **uris; + char **uris; gsize uris_len, i; g_return_val_if_fail (GTK_IS_RECENT_MANAGER (manager), NULL); @@ -1415,7 +1415,7 @@ gtk_recent_manager_clamp_to_age (GtkRecentManager *manager, int age) { GtkRecentManagerPrivate *priv = manager->priv; - gchar **uris; + char **uris; gsize n_uris, i; time_t now; @@ -1428,7 +1428,7 @@ gtk_recent_manager_clamp_to_age (GtkRecentManager *manager, for (i = 0; i < n_uris; i++) { - const gchar *uri = uris[i]; + const char *uri = uris[i]; time_t modified; int item_age; @@ -1446,7 +1446,7 @@ gtk_recent_manager_clamp_to_size (GtkRecentManager *manager, const int size) { GtkRecentManagerPrivate *priv = manager->priv; - gchar **uris; + char **uris; gsize n_uris, i; if (G_UNLIKELY (!priv->recent_items) || G_UNLIKELY (size < 0)) @@ -1462,7 +1462,7 @@ gtk_recent_manager_clamp_to_size (GtkRecentManager *manager, for (i = 0; i < n_uris - size; i++) { - const gchar *uri = uris[i]; + const char *uri = uris[i]; g_bookmark_file_remove_item (priv->recent_items, uri, NULL); } @@ -1478,7 +1478,7 @@ G_DEFINE_BOXED_TYPE (GtkRecentInfo, gtk_recent_info, gtk_recent_info_unref) static GtkRecentInfo * -gtk_recent_info_new (const gchar *uri) +gtk_recent_info_new (const char *uri) { GtkRecentInfo *info; @@ -1578,7 +1578,7 @@ gtk_recent_info_unref (GtkRecentInfo *info) * Returns: the URI of the resource. The returned string is * owned by the recent manager, and should not be freed. */ -const gchar * +const char * gtk_recent_info_get_uri (GtkRecentInfo *info) { g_return_val_if_fail (info != NULL, NULL); @@ -1596,7 +1596,7 @@ gtk_recent_info_get_uri (GtkRecentInfo *info) * Returns: the display name of the resource. The returned string * is owned by the recent manager, and should not be freed. */ -const gchar * +const char * gtk_recent_info_get_display_name (GtkRecentInfo *info) { g_return_val_if_fail (info != NULL, NULL); @@ -1616,7 +1616,7 @@ gtk_recent_info_get_display_name (GtkRecentInfo *info) * Returns: the description of the resource. The returned string * is owned by the recent manager, and should not be freed. **/ -const gchar * +const char * gtk_recent_info_get_description (GtkRecentInfo *info) { g_return_val_if_fail (info != NULL, NULL); @@ -1633,7 +1633,7 @@ gtk_recent_info_get_description (GtkRecentInfo *info) * Returns: the MIME type of the resource. The returned string * is owned by the recent manager, and should not be freed. */ -const gchar * +const char * gtk_recent_info_get_mime_type (GtkRecentInfo *info) { g_return_val_if_fail (info != NULL, NULL); @@ -1739,8 +1739,8 @@ gtk_recent_info_get_private_hint (GtkRecentInfo *info) */ gboolean gtk_recent_info_get_application_info (GtkRecentInfo *info, - const gchar *app_name, - const gchar **app_exec, + const char *app_name, + const char **app_exec, guint *count, time_t *time_) { @@ -1783,11 +1783,11 @@ gtk_recent_info_get_application_info (GtkRecentInfo *info, * a newly allocated %NULL-terminated array of strings. * Use g_strfreev() to free it. */ -gchar ** +char ** gtk_recent_info_get_applications (GtkRecentInfo *info, gsize *length) { - gchar **retval; + char **retval; gsize n_apps, i; g_return_val_if_fail (info != NULL, NULL); @@ -1802,7 +1802,7 @@ gtk_recent_info_get_applications (GtkRecentInfo *info, n_apps = info->n_applications; - retval = g_new0 (gchar *, n_apps + 1); + retval = g_new0 (char *, n_apps + 1); for (i = 0; i < info->n_applications; i ++) { @@ -1830,7 +1830,7 @@ gtk_recent_info_get_applications (GtkRecentInfo *info, */ gboolean gtk_recent_info_has_application (GtkRecentInfo *info, - const gchar *app_name) + const char *app_name) { g_return_val_if_fail (info != NULL, FALSE); g_return_val_if_fail (app_name != NULL, FALSE); @@ -1847,12 +1847,12 @@ gtk_recent_info_has_application (GtkRecentInfo *info, * * Returns: an application name. Use g_free() to free it. */ -gchar * +char * gtk_recent_info_last_application (GtkRecentInfo *info) { int i; time_t last_stamp = (time_t) -1; - gchar *name = NULL; + char *name = NULL; g_return_val_if_fail (info != NULL, NULL); @@ -1883,7 +1883,7 @@ GIcon * gtk_recent_info_get_gicon (GtkRecentInfo *info) { GIcon *icon = NULL; - gchar *content_type; + char *content_type; g_return_val_if_fail (info != NULL, NULL); @@ -1935,7 +1935,7 @@ gtk_recent_info_is_local (GtkRecentInfo *info) gboolean gtk_recent_info_exists (GtkRecentInfo *info) { - gchar *filename; + char *filename; GStatBuf stat_buf; gboolean retval = FALSE; @@ -1978,11 +1978,11 @@ gtk_recent_info_match (GtkRecentInfo *info_a, } /* taken from gnome-vfs-uri.c */ -static const gchar * -get_method_string (const gchar *substring, - gchar **method_string) +static const char * +get_method_string (const char *substring, + char **method_string) { - const gchar *p; + const char *p; char *method; for (p = substring; @@ -2050,15 +2050,15 @@ make_valid_utf8 (const char *name) return g_string_free (string, FALSE); } -static gchar * -get_uri_shortname_for_display (const gchar *uri) +static char * +get_uri_shortname_for_display (const char *uri) { - gchar *name = NULL; + char *name = NULL; gboolean validated = FALSE; if (has_case_prefix (uri, "file:/")) { - gchar *local_file; + char *local_file; local_file = g_filename_from_uri (uri, NULL, NULL); @@ -2073,9 +2073,9 @@ get_uri_shortname_for_display (const gchar *uri) if (!name) { - gchar *method; - gchar *local_file; - const gchar *rest; + char *method; + char *local_file; + const char *rest; rest = get_method_string (uri, &method); local_file = g_filename_display_basename (rest); @@ -2090,7 +2090,7 @@ get_uri_shortname_for_display (const gchar *uri) if (!validated && !g_utf8_validate (name, -1, NULL)) { - gchar *utf8_name; + char *utf8_name; utf8_name = make_valid_utf8 (name); g_free (name); @@ -2113,10 +2113,10 @@ get_uri_shortname_for_display (const gchar *uri) * Returns: A newly-allocated string in UTF-8 encoding * free it with g_free() */ -gchar * +char * gtk_recent_info_get_short_name (GtkRecentInfo *info) { - gchar *short_name; + char *short_name; g_return_val_if_fail (info != NULL, NULL); @@ -2139,17 +2139,17 @@ gtk_recent_info_get_short_name (GtkRecentInfo *info) * Returns: (nullable): a newly allocated UTF-8 string containing the * resource’s URI or %NULL. Use g_free() when done using it. */ -gchar * +char * gtk_recent_info_get_uri_display (GtkRecentInfo *info) { - gchar *retval; + char *retval; g_return_val_if_fail (info != NULL, NULL); retval = NULL; if (gtk_recent_info_is_local (info)) { - gchar *filename; + char *filename; filename = g_filename_from_uri (info->uri, NULL, NULL); if (!filename) @@ -2206,11 +2206,11 @@ gtk_recent_info_get_age (GtkRecentInfo *info) * a newly allocated %NULL terminated array of strings. * Use g_strfreev() to free it. */ -gchar ** +char ** gtk_recent_info_get_groups (GtkRecentInfo *info, gsize *length) { - gchar **retval; + char **retval; gsize n_groups, i; g_return_val_if_fail (info != NULL, NULL); @@ -2225,7 +2225,7 @@ gtk_recent_info_get_groups (GtkRecentInfo *info, n_groups = info->n_groups; - retval = g_new0 (gchar *, n_groups + 1); + retval = g_new0 (char *, n_groups + 1); for (i = 0; i < info->n_groups; i ++) retval[i] = g_strdup (info->groups[i]); @@ -2250,7 +2250,7 @@ gtk_recent_info_get_groups (GtkRecentInfo *info, */ gboolean gtk_recent_info_has_group (GtkRecentInfo *info, - const gchar *group_name) + const char *group_name) { int i; @@ -2287,7 +2287,7 @@ gtk_recent_info_has_group (GtkRecentInfo *info, */ GAppInfo * gtk_recent_info_create_app_info (GtkRecentInfo *info, - const gchar *app_name, + const char *app_name, GError **error) { RecentAppInfo *ai; diff --git a/gtk/gtkrecentmanager.h b/gtk/gtkrecentmanager.h index 9167ab8bef..2f32db3415 100644 --- a/gtk/gtkrecentmanager.h +++ b/gtk/gtkrecentmanager.h @@ -68,15 +68,15 @@ typedef struct _GtkRecentManagerPrivate GtkRecentManagerPrivate; **/ struct _GtkRecentData { - gchar *display_name; - gchar *description; + char *display_name; + char *description; - gchar *mime_type; + char *mime_type; - gchar *app_name; - gchar *app_exec; + char *app_name; + char *app_exec; - gchar **groups; + char **groups; gboolean is_private; }; @@ -162,26 +162,26 @@ GtkRecentManager *gtk_recent_manager_get_default (void); GDK_AVAILABLE_IN_ALL gboolean gtk_recent_manager_add_item (GtkRecentManager *manager, - const gchar *uri); + const char *uri); GDK_AVAILABLE_IN_ALL gboolean gtk_recent_manager_add_full (GtkRecentManager *manager, - const gchar *uri, + const char *uri, const GtkRecentData *recent_data); GDK_AVAILABLE_IN_ALL gboolean gtk_recent_manager_remove_item (GtkRecentManager *manager, - const gchar *uri, + const char *uri, GError **error); GDK_AVAILABLE_IN_ALL GtkRecentInfo * gtk_recent_manager_lookup_item (GtkRecentManager *manager, - const gchar *uri, + const char *uri, GError **error); GDK_AVAILABLE_IN_ALL gboolean gtk_recent_manager_has_item (GtkRecentManager *manager, - const gchar *uri); + const char *uri); GDK_AVAILABLE_IN_ALL gboolean gtk_recent_manager_move_item (GtkRecentManager *manager, - const gchar *uri, - const gchar *new_uri, + const char *uri, + const char *new_uri, GError **error); GDK_AVAILABLE_IN_ALL GList * gtk_recent_manager_get_items (GtkRecentManager *manager); @@ -199,13 +199,13 @@ GDK_AVAILABLE_IN_ALL void gtk_recent_info_unref (GtkRecentInfo *info); GDK_AVAILABLE_IN_ALL -const gchar * gtk_recent_info_get_uri (GtkRecentInfo *info); +const char * gtk_recent_info_get_uri (GtkRecentInfo *info); GDK_AVAILABLE_IN_ALL -const gchar * gtk_recent_info_get_display_name (GtkRecentInfo *info); +const char * gtk_recent_info_get_display_name (GtkRecentInfo *info); GDK_AVAILABLE_IN_ALL -const gchar * gtk_recent_info_get_description (GtkRecentInfo *info); +const char * gtk_recent_info_get_description (GtkRecentInfo *info); GDK_AVAILABLE_IN_ALL -const gchar * gtk_recent_info_get_mime_type (GtkRecentInfo *info); +const char * gtk_recent_info_get_mime_type (GtkRecentInfo *info); GDK_AVAILABLE_IN_ALL time_t gtk_recent_info_get_added (GtkRecentInfo *info); GDK_AVAILABLE_IN_ALL @@ -216,34 +216,34 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_recent_info_get_private_hint (GtkRecentInfo *info); GDK_AVAILABLE_IN_ALL gboolean gtk_recent_info_get_application_info (GtkRecentInfo *info, - const gchar *app_name, - const gchar **app_exec, + const char *app_name, + const char **app_exec, guint *count, time_t *time_); GDK_AVAILABLE_IN_ALL GAppInfo * gtk_recent_info_create_app_info (GtkRecentInfo *info, - const gchar *app_name, + const char *app_name, GError **error); GDK_AVAILABLE_IN_ALL -gchar ** gtk_recent_info_get_applications (GtkRecentInfo *info, +char ** gtk_recent_info_get_applications (GtkRecentInfo *info, gsize *length) G_GNUC_MALLOC; GDK_AVAILABLE_IN_ALL -gchar * gtk_recent_info_last_application (GtkRecentInfo *info) G_GNUC_MALLOC; +char * gtk_recent_info_last_application (GtkRecentInfo *info) G_GNUC_MALLOC; GDK_AVAILABLE_IN_ALL gboolean gtk_recent_info_has_application (GtkRecentInfo *info, - const gchar *app_name); + const char *app_name); GDK_AVAILABLE_IN_ALL -gchar ** gtk_recent_info_get_groups (GtkRecentInfo *info, +char ** gtk_recent_info_get_groups (GtkRecentInfo *info, gsize *length) G_GNUC_MALLOC; GDK_AVAILABLE_IN_ALL gboolean gtk_recent_info_has_group (GtkRecentInfo *info, - const gchar *group_name); + const char *group_name); GDK_AVAILABLE_IN_ALL GIcon * gtk_recent_info_get_gicon (GtkRecentInfo *info); GDK_AVAILABLE_IN_ALL -gchar * gtk_recent_info_get_short_name (GtkRecentInfo *info) G_GNUC_MALLOC; +char * gtk_recent_info_get_short_name (GtkRecentInfo *info) G_GNUC_MALLOC; GDK_AVAILABLE_IN_ALL -gchar * gtk_recent_info_get_uri_display (GtkRecentInfo *info) G_GNUC_MALLOC; +char * gtk_recent_info_get_uri_display (GtkRecentInfo *info) G_GNUC_MALLOC; GDK_AVAILABLE_IN_ALL int gtk_recent_info_get_age (GtkRecentInfo *info); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkrevealer.c b/gtk/gtkrevealer.c index 158152480c..f63bbf1e54 100644 --- a/gtk/gtkrevealer.c +++ b/gtk/gtkrevealer.c @@ -138,7 +138,7 @@ static void gtk_revealer_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) gtk_revealer_set_child (GTK_REVEALER (buildable), GTK_WIDGET (child)); diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index 2e3b3374ab..791cac94ed 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -161,7 +161,7 @@ struct _GtkScaleMark { gdouble value; int stop_position; - gchar *markup; + char *markup; GtkWidget *label_widget; GtkWidget *indicator_widget; GtkWidget *widget; @@ -205,15 +205,15 @@ static void gtk_scale_buildable_interface_init (GtkBuildableIface *iface) static gboolean gtk_scale_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); static void gtk_scale_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data); -static gchar * gtk_scale_format_value (GtkScale *scale, +static char * gtk_scale_format_value (GtkScale *scale, gdouble value); @@ -1484,13 +1484,13 @@ gtk_scale_real_get_layout_offsets (GtkScale *scale, *y = value_bounds.origin.y; } -static gchar * -weed_out_neg_zero (gchar *str, +static char * +weed_out_neg_zero (char *str, int digits) { if (str[0] == '-') { - gchar neg_zero[8]; + char neg_zero[8]; g_snprintf (neg_zero, 8, "%0.*f", digits, -0.0); if (strcmp (neg_zero, str) == 0) memmove (str, str + 1, strlen (str)); @@ -1656,7 +1656,7 @@ void gtk_scale_add_mark (GtkScale *scale, gdouble value, GtkPositionType position, - const gchar *markup) + const char *markup) { GtkWidget *widget; GtkScalePrivate *priv = gtk_scale_get_instance_private (scale); @@ -1800,7 +1800,7 @@ typedef struct gdouble value; GtkPositionType position; GString *markup; - gchar *context; + char *context; gboolean translatable; } MarkData; @@ -1814,9 +1814,9 @@ mark_data_free (MarkData *data) static void marks_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -1834,11 +1834,11 @@ marks_start_element (GtkBuildableParseContext *context, } else if (strcmp (element_name, "mark") == 0) { - const gchar *value_str; + const char *value_str; gdouble value = 0; - const gchar *position_str = NULL; + const char *position_str = NULL; GtkPositionType position = GTK_POS_BOTTOM; - const gchar *msg_context = NULL; + const char *msg_context = NULL; gboolean translatable = FALSE; MarkData *mark; @@ -1905,7 +1905,7 @@ marks_start_element (GtkBuildableParseContext *context, static void marks_text (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) @@ -1932,7 +1932,7 @@ static gboolean gtk_scale_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *parser_data) { @@ -1962,7 +1962,7 @@ static void gtk_scale_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data) { GtkScale *scale = GTK_SCALE (buildable); @@ -1971,7 +1971,7 @@ gtk_scale_buildable_custom_finished (GtkBuildable *buildable, if (strcmp (tagname, "marks") == 0) { GSList *m; - const gchar *markup; + const char *markup; marks_data = (MarksSubparserData *)user_data; diff --git a/gtk/gtkscale.h b/gtk/gtkscale.h index 0d1422fbb5..5dd9609bd5 100644 --- a/gtk/gtkscale.h +++ b/gtk/gtkscale.h @@ -121,7 +121,7 @@ GDK_AVAILABLE_IN_ALL void gtk_scale_add_mark (GtkScale *scale, gdouble value, GtkPositionType position, - const gchar *markup); + const char *markup); GDK_AVAILABLE_IN_ALL void gtk_scale_clear_marks (GtkScale *scale); diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c index 930b026406..1924f7e957 100644 --- a/gtk/gtkscalebutton.c +++ b/gtk/gtkscalebutton.c @@ -119,7 +119,7 @@ typedef struct GtkScrollType autoscroll_step; gboolean autoscrolling; - gchar **icon_list; + char **icon_list; GtkAdjustment *adjustment; /* needed because it must be settable in init() */ } GtkScaleButtonPrivate; @@ -469,7 +469,7 @@ gtk_scale_button_set_property (GObject *object, break; case PROP_ICONS: gtk_scale_button_set_icons (button, - (const gchar **)g_value_get_boxed (value)); + (const char **)g_value_get_boxed (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -550,7 +550,7 @@ GtkWidget * gtk_scale_button_new (gdouble min, gdouble max, gdouble step, - const gchar **icons) + const char **icons) { GtkScaleButton *button; GtkAdjustment *adjustment; @@ -615,15 +615,15 @@ gtk_scale_button_set_value (GtkScaleButton *button, */ void gtk_scale_button_set_icons (GtkScaleButton *button, - const gchar **icons) + const char **icons) { GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button); - gchar **tmp; + char **tmp; g_return_if_fail (GTK_IS_SCALE_BUTTON (button)); tmp = priv->icon_list; - priv->icon_list = g_strdupv ((gchar **) icons); + priv->icon_list = g_strdupv ((char **) icons); g_strfreev (tmp); gtk_scale_button_update_icon (button); @@ -865,7 +865,7 @@ gtk_scale_button_update_icon (GtkScaleButton *button) GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button); GtkAdjustment *adjustment; gdouble value; - const gchar *name; + const char *name; guint num_icons; if (!priv->icon_list || priv->icon_list[0][0] == '\0') diff --git a/gtk/gtkscalebutton.h b/gtk/gtkscalebutton.h index c9dd397594..7226d92ee5 100644 --- a/gtk/gtkscalebutton.h +++ b/gtk/gtkscalebutton.h @@ -76,10 +76,10 @@ GDK_AVAILABLE_IN_ALL GtkWidget * gtk_scale_button_new (gdouble min, gdouble max, gdouble step, - const gchar **icons); + const char **icons); GDK_AVAILABLE_IN_ALL void gtk_scale_button_set_icons (GtkScaleButton *button, - const gchar **icons); + const char **icons); GDK_AVAILABLE_IN_ALL gdouble gtk_scale_button_get_value (GtkScaleButton *button); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index 751a76ae5d..acc77cb8fd 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -425,7 +425,7 @@ static void gtk_scrolled_window_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW(buildable), GTK_WIDGET (child)); diff --git a/gtk/gtksearchbar.c b/gtk/gtksearchbar.c index f7cb05a17d..d5da8d2c0b 100644 --- a/gtk/gtksearchbar.c +++ b/gtk/gtksearchbar.c @@ -131,7 +131,7 @@ static void gtk_search_bar_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) gtk_search_bar_set_child (GTK_SEARCH_BAR (buildable), GTK_WIDGET (child)); diff --git a/gtk/gtksearchengine.c b/gtk/gtksearchengine.c index 941536d076..a974e5e11e 100644 --- a/gtk/gtksearchengine.c +++ b/gtk/gtksearchengine.c @@ -35,11 +35,11 @@ struct _GtkSearchEnginePrivate { GtkSearchEngine *native; gboolean native_running; gboolean got_results; - gchar *native_error; + char *native_error; GtkSearchEngine *model; gboolean model_running; - gchar *model_error; + char *model_error; gboolean running; gboolean recursive; @@ -253,7 +253,7 @@ finished (GtkSearchEngine *engine, static void error (GtkSearchEngine *engine, - const gchar *message, + const char *message, gpointer data) { GtkSearchEngine *composite = GTK_SEARCH_ENGINE (data); @@ -403,7 +403,7 @@ _gtk_search_engine_finished (GtkSearchEngine *engine, void _gtk_search_engine_error (GtkSearchEngine *engine, - const gchar *error_message) + const char *error_message) { g_return_if_fail (GTK_IS_SEARCH_ENGINE (engine)); diff --git a/gtk/gtksearchengine.h b/gtk/gtksearchengine.h index 05602585a6..e23e197c34 100644 --- a/gtk/gtksearchengine.h +++ b/gtk/gtksearchengine.h @@ -70,7 +70,7 @@ struct _GtkSearchEngineClass GList *hits); void (*finished) (GtkSearchEngine *engine); void (*error) (GtkSearchEngine *engine, - const gchar *error_message); + const char *error_message); }; GType _gtk_search_engine_get_type (void); @@ -87,7 +87,7 @@ void _gtk_search_engine_hits_added (GtkSearchEngine *engine, void _gtk_search_engine_finished (GtkSearchEngine *engine, gboolean got_results); void _gtk_search_engine_error (GtkSearchEngine *engine, - const gchar *error_message); + const char *error_message); void _gtk_search_hit_free (GtkSearchHit *hit); GtkSearchHit *_gtk_search_hit_dup (GtkSearchHit *hit); diff --git a/gtk/gtksearchenginemodel.c b/gtk/gtksearchenginemodel.c index 3937e6eef2..0d8f69ae7a 100644 --- a/gtk/gtksearchenginemodel.c +++ b/gtk/gtksearchenginemodel.c @@ -60,7 +60,7 @@ static gboolean info_matches_query (GtkQuery *query, GFileInfo *info) { - const gchar *display_name; + const char *display_name; display_name = g_file_info_get_display_name (info); if (display_name == NULL) diff --git a/gtk/gtksearchenginetracker3.c b/gtk/gtksearchenginetracker3.c index 69139c2731..c230f9d2e3 100644 --- a/gtk/gtksearchenginetracker3.c +++ b/gtk/gtksearchenginetracker3.c @@ -117,7 +117,7 @@ static GFileInfo * create_file_info (TrackerSparqlCursor *cursor) { GFileInfo *info; - const gchar *str; + const char *str; GDateTime *creation; info = g_file_info_new (); @@ -170,7 +170,7 @@ query_callback (TrackerSparqlStatement *statement, while (tracker_sparql_cursor_next (cursor, NULL, NULL)) { - const gchar *url; + const char *url; url = tracker_sparql_cursor_get_string (cursor, 0, NULL); hit = g_slice_new0 (GtkSearchHit); @@ -194,8 +194,8 @@ gtk_search_engine_tracker3_start (GtkSearchEngine *engine) { GtkSearchEngineTracker3 *tracker; TrackerSparqlStatement *statement; - const gchar *search_text; - gchar *match; + const char *search_text; + char *match; GFile *location; gboolean recursive; @@ -220,7 +220,7 @@ gtk_search_engine_tracker3_start (GtkSearchEngine *engine) if (location) { - gchar *location_uri = g_file_get_uri (location); + char *location_uri = g_file_get_uri (location); if (recursive) { diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index 7fc6c8343f..65989011b8 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -116,7 +116,7 @@ struct _GtkSettings GtkCssProvider *theme_provider; int font_size; gboolean font_size_absolute; - gchar *font_family; + char *font_family; cairo_font_options_t *font_options; }; @@ -219,7 +219,7 @@ static gboolean settings_update_xsetting (GtkSettings *setting static void settings_update_xsettings (GtkSettings *settings); static void gtk_settings_load_from_key_file (GtkSettings *settings, - const gchar *path, + const char *path, GtkSettingsSource source); static void settings_update_provider (GdkDisplay *display, GtkCssProvider **old, @@ -243,8 +243,8 @@ gtk_settings_init (GtkSettings *settings) { GParamSpec **pspecs, **p; guint i = 0; - gchar *path; - const gchar * const *config_dirs; + char *path; + const char * const *config_dirs; g_datalist_init (&settings->queued_settings); object_list = g_slist_prepend (object_list, settings); @@ -1042,7 +1042,7 @@ settings_init_style (GtkSettings *settings) /* Add provider for user file */ if (G_UNLIKELY (!css_provider)) { - gchar *css_path; + char *css_path; css_provider = gtk_css_provider_new (); css_path = g_build_filename (g_get_user_config_dir (), @@ -1194,7 +1194,7 @@ static void settings_update_font_values (GtkSettings *settings) { PangoFontDescription *desc; - const gchar *font_name; + const char *font_name; font_name = g_value_get_string (&settings->property_values[PROP_FONT_NAME - 1].value); desc = pango_font_description_from_string (font_name); @@ -1324,7 +1324,7 @@ apply_queued_setting (GtkSettings *settings, } else { - gchar *debug = g_strdup_value_contents (&qvalue->public.value); + char *debug = g_strdup_value_contents (&qvalue->public.value); g_message ("%s: failed to retrieve property '%s' of type '%s' from rc file value \"%s\" of type '%s'", qvalue->public.origin ? qvalue->public.origin : "(for origin information, set GTK_DEBUG)", @@ -1413,13 +1413,13 @@ free_value (gpointer data) static void gtk_settings_set_property_value_internal (GtkSettings *settings, - const gchar *prop_name, + const char *prop_name, const GtkSettingsValue *new_value, GtkSettingsSource source) { GtkSettingsValuePrivate *qvalue; GParamSpec *pspec; - gchar *name; + char *name; GQuark name_quark; if (!G_VALUE_HOLDS_LONG (&new_value->value) && @@ -1474,7 +1474,7 @@ settings_update_double_click (GtkSettings *settings) static void settings_update_cursor_theme (GtkSettings *settings) { - gchar *theme = NULL; + char *theme = NULL; int size = 0; g_object_get (settings, @@ -1492,11 +1492,11 @@ static void settings_update_font_options (GtkSettings *settings) { int hinting; - gchar *hint_style_str; + char *hint_style_str; cairo_hint_style_t hint_style; int antialias; cairo_antialias_t antialias_mode; - gchar *rgba_str; + char *rgba_str; cairo_subpixel_order_t subpixel_order; if (settings->font_options) @@ -1637,8 +1637,8 @@ settings_update_provider (GdkDisplay *display, static void get_theme_name (GtkSettings *settings, - gchar **theme_name, - gchar **theme_variant) + char **theme_name, + char **theme_variant) { gboolean prefer_dark; @@ -1681,10 +1681,10 @@ get_theme_name (GtkSettings *settings, static void settings_update_theme (GtkSettings *settings) { - gchar *theme_name; - gchar *theme_variant; - const gchar *theme_dir; - gchar *path; + char *theme_name; + char *theme_variant; + const char *theme_dir; + char *path; get_theme_name (settings, &theme_name, &theme_variant); @@ -1727,12 +1727,12 @@ gvalue_free (gpointer data) static void gtk_settings_load_from_key_file (GtkSettings *settings, - const gchar *path, + const char *path, GtkSettingsSource source) { GError *error; GKeyFile *keyfile; - gchar **keys; + char **keys; gsize n_keys; int i; @@ -1760,7 +1760,7 @@ gtk_settings_load_from_key_file (GtkSettings *settings, for (i = 0; i < n_keys; i++) { - gchar *key; + char *key; GParamSpec *pspec; GType value_type; GtkSettingsValue svalue = { NULL, { 0, }, }; @@ -1815,7 +1815,7 @@ gtk_settings_load_from_key_file (GtkSettings *settings, default: { - gchar *s_val; + char *s_val; g_value_init (&svalue.value, G_TYPE_GSTRING); s_val = g_key_file_get_string (keyfile, "Settings", key, &error); @@ -1844,7 +1844,7 @@ gtk_settings_load_from_key_file (GtkSettings *settings, copy, gvalue_free); if (g_getenv ("GTK_DEBUG")) - svalue.origin = (gchar *)path; + svalue.origin = (char *)path; gtk_settings_set_property_value_internal (settings, key, &svalue, source); g_value_unset (&svalue.value); @@ -1929,7 +1929,7 @@ gtk_settings_get_property (GObject *object, GtkSettingsSource _gtk_settings_get_setting_source (GtkSettings *settings, - const gchar *name) + const char *name) { GParamSpec *pspec; @@ -1952,7 +1952,7 @@ _gtk_settings_get_setting_source (GtkSettings *settings, */ void gtk_settings_reset_property (GtkSettings *settings, - const gchar *name) + const char *name) { GParamSpec *pspec; GValue *value; @@ -2023,7 +2023,7 @@ settings_update_font_name (GtkSettings *settings) } } -const gchar * +const char * gtk_settings_get_font_family (GtkSettings *settings) { settings_update_font_name (settings); diff --git a/gtk/gtksettings.h b/gtk/gtksettings.h index b7b606633e..ba8d0e7eba 100644 --- a/gtk/gtksettings.h +++ b/gtk/gtksettings.h @@ -52,7 +52,7 @@ struct _GtkSettingsValue /* origin should be something like "filename:linenumber" for rc files, * or e.g. "XProperty" for other sources */ - gchar *origin; + char *origin; /* valid types are LONG, DOUBLE and STRING corresponding to the token parsed, * or a GSTRING holding an unparsed statement @@ -71,7 +71,7 @@ GtkSettings* gtk_settings_get_for_display (GdkDisplay *display); GDK_AVAILABLE_IN_ALL void gtk_settings_reset_property (GtkSettings *settings, - const gchar *name); + const char *name); G_END_DECLS diff --git a/gtk/gtksettingsprivate.h b/gtk/gtksettingsprivate.h index f39963939c..ec41b8fa6b 100644 --- a/gtk/gtksettingsprivate.h +++ b/gtk/gtksettingsprivate.h @@ -41,11 +41,11 @@ typedef enum } GtkSettingsSource; GtkSettingsSource _gtk_settings_get_setting_source (GtkSettings *settings, - const gchar *name); + const char *name); gboolean gtk_settings_get_enable_animations (GtkSettings *settings); int gtk_settings_get_dnd_drag_threshold (GtkSettings *settings); -const gchar *gtk_settings_get_font_family (GtkSettings *settings); +const char *gtk_settings_get_font_family (GtkSettings *settings); int gtk_settings_get_font_size (GtkSettings *settings); gboolean gtk_settings_get_font_size_is_absolute (GtkSettings *settings); diff --git a/gtk/gtkshortcut.c b/gtk/gtkshortcut.c index a32437fed9..bf97d54fec 100644 --- a/gtk/gtkshortcut.c +++ b/gtk/gtkshortcut.c @@ -249,7 +249,7 @@ gtk_shortcut_new (GtkShortcutTrigger *trigger, GtkShortcut * gtk_shortcut_new_with_arguments (GtkShortcutTrigger *trigger, GtkShortcutAction *action, - const gchar *format_string, + const char *format_string, ...) { GtkShortcut *shortcut; diff --git a/gtk/gtkshortcut.h b/gtk/gtkshortcut.h index 77c89754a2..91c019393d 100644 --- a/gtk/gtkshortcut.h +++ b/gtk/gtkshortcut.h @@ -35,7 +35,7 @@ GtkShortcut * gtk_shortcut_new (GtkShortcutTrig GDK_AVAILABLE_IN_ALL GtkShortcut * gtk_shortcut_new_with_arguments (GtkShortcutTrigger *trigger, GtkShortcutAction *action, - const gchar *format_string, + const char *format_string, ...); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkshortcutaction.c b/gtk/gtkshortcutaction.c index b4f36956bc..23cb2d82af 100644 --- a/gtk/gtkshortcutaction.c +++ b/gtk/gtkshortcutaction.c @@ -1040,8 +1040,8 @@ check_parameter_type (GVariant *args, if (!g_variant_is_of_type (args, parameter_type)) { - gchar *typestr = g_variant_type_dup_string (parameter_type); - gchar *targetstr = g_variant_print (args, TRUE); + char *typestr = g_variant_type_dup_string (parameter_type); + char *targetstr = g_variant_print (args, TRUE); g_warning ("Trying to invoke action with target '%s'," " but action expects parameter with type '%s'", targetstr, typestr); g_free (targetstr); @@ -1053,7 +1053,7 @@ check_parameter_type (GVariant *args, { if (parameter_type != NULL) { - gchar *typestr = g_variant_type_dup_string (parameter_type); + char *typestr = g_variant_type_dup_string (parameter_type); g_warning ("Trying to invoke action without arguments," " but action expects parameter with type '%s'", typestr); g_free (typestr); diff --git a/gtk/gtkshortcutcontroller.c b/gtk/gtkshortcutcontroller.c index e427ae5ed8..e30a82ab98 100644 --- a/gtk/gtkshortcutcontroller.c +++ b/gtk/gtkshortcutcontroller.c @@ -147,7 +147,7 @@ static void gtk_shortcut_controller_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (type != NULL) { diff --git a/gtk/gtkshortcutlabel.c b/gtk/gtkshortcutlabel.c index db54b35811..39a7aef069 100644 --- a/gtk/gtkshortcutlabel.c +++ b/gtk/gtkshortcutlabel.c @@ -38,8 +38,8 @@ struct _GtkShortcutLabel { GtkWidget parent_instance; - gchar *accelerator; - gchar *disabled_text; + char *accelerator; + char *disabled_text; }; struct _GtkShortcutLabelClass @@ -58,11 +58,11 @@ enum { static GParamSpec *properties[LAST_PROP]; -static gchar * +static char * get_modifier_label (guint key) { - const gchar *subscript; - const gchar *label; + const char *subscript; + const char *label; switch (key) { @@ -123,16 +123,16 @@ get_modifier_label (guint key) return g_strdup_printf ("%s %s", label, subscript); } -static gchar ** +static char ** get_labels (guint key, GdkModifierType modifier, guint *n_mods) { - const gchar *labels[16]; + const char *labels[16]; GList *freeme = NULL; - gchar key_label[6]; - const gchar *tmp; + char key_label[6]; + const char *tmp; gunichar ch; int i = 0; - gchar **retval; + char **retval; if (modifier & GDK_SHIFT_MASK) labels[i++] = C_("keyboard label", "Shift"); @@ -190,7 +190,7 @@ get_labels (guint key, GdkModifierType modifier, guint *n_mods) case GDK_KEY_Super_L: case GDK_KEY_Super_R: case GDK_KEY_Hyper_L: case GDK_KEY_Hyper_R: freeme = g_list_prepend (freeme, get_modifier_label (key)); - labels[i++] = (const gchar*)freeme->data; + labels[i++] = (const char *)freeme->data; break; case GDK_KEY_Left: labels[i++] = "\xe2\x86\x90"; @@ -236,7 +236,7 @@ get_labels (guint key, GdkModifierType modifier, guint *n_mods) labels[i] = NULL; - retval = g_strdupv ((gchar **)labels); + retval = g_strdupv ((char **)labels); g_list_free_full (freeme, g_free); @@ -244,7 +244,7 @@ get_labels (guint key, GdkModifierType modifier, guint *n_mods) } static GtkWidget * -dim_label (const gchar *text) +dim_label (const char *text) { GtkWidget *label; @@ -259,7 +259,7 @@ display_shortcut (GtkWidget *self, guint key, GdkModifierType modifier) { - gchar **keys = NULL; + char **keys = NULL; int i; guint n_mods; @@ -285,9 +285,9 @@ display_shortcut (GtkWidget *self, static gboolean parse_combination (GtkShortcutLabel *self, - const gchar *str) + const char *str) { - gchar **accels; + char **accels; int k; GdkModifierType modifier = 0; guint key = 0; @@ -313,9 +313,9 @@ parse_combination (GtkShortcutLabel *self, static gboolean parse_sequence (GtkShortcutLabel *self, - const gchar *str) + const char *str) { - gchar **accels; + char **accels; int k; gboolean retval = TRUE; @@ -336,9 +336,9 @@ parse_sequence (GtkShortcutLabel *self, static gboolean parse_range (GtkShortcutLabel *self, - const gchar *str) + const char *str) { - gchar *dots; + char *dots; dots = strstr (str, "..."); if (!dots) @@ -376,7 +376,7 @@ clear_children (GtkShortcutLabel *self) static void gtk_shortcut_label_rebuild (GtkShortcutLabel *self) { - gchar **accels; + char **accels; int k; clear_children (self); @@ -518,7 +518,7 @@ gtk_shortcut_label_init (GtkShortcutLabel *self) * Returns: (transfer full): a newly-allocated #GtkShortcutLabel */ GtkWidget * -gtk_shortcut_label_new (const gchar *accelerator) +gtk_shortcut_label_new (const char *accelerator) { return g_object_new (GTK_TYPE_SHORTCUT_LABEL, "accelerator", accelerator, @@ -533,7 +533,7 @@ gtk_shortcut_label_new (const gchar *accelerator) * * Returns: (transfer none)(nullable): the current accelerator. */ -const gchar * +const char * gtk_shortcut_label_get_accelerator (GtkShortcutLabel *self) { g_return_val_if_fail (GTK_IS_SHORTCUT_LABEL (self), NULL); @@ -550,7 +550,7 @@ gtk_shortcut_label_get_accelerator (GtkShortcutLabel *self) */ void gtk_shortcut_label_set_accelerator (GtkShortcutLabel *self, - const gchar *accelerator) + const char *accelerator) { g_return_if_fail (GTK_IS_SHORTCUT_LABEL (self)); @@ -572,7 +572,7 @@ gtk_shortcut_label_set_accelerator (GtkShortcutLabel *self, * Returns: (transfer none)(nullable): the current text displayed when no * accelerator is set. */ -const gchar * +const char * gtk_shortcut_label_get_disabled_text (GtkShortcutLabel *self) { g_return_val_if_fail (GTK_IS_SHORTCUT_LABEL (self), NULL); @@ -589,7 +589,7 @@ gtk_shortcut_label_get_disabled_text (GtkShortcutLabel *self) */ void gtk_shortcut_label_set_disabled_text (GtkShortcutLabel *self, - const gchar *disabled_text) + const char *disabled_text) { g_return_if_fail (GTK_IS_SHORTCUT_LABEL (self)); diff --git a/gtk/gtkshortcutlabel.h b/gtk/gtkshortcutlabel.h index a8842bcdd1..d2abd1c7ee 100644 --- a/gtk/gtkshortcutlabel.h +++ b/gtk/gtkshortcutlabel.h @@ -35,21 +35,21 @@ GDK_AVAILABLE_IN_ALL GType gtk_shortcut_label_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget *gtk_shortcut_label_new (const gchar *accelerator); +GtkWidget *gtk_shortcut_label_new (const char *accelerator); GDK_AVAILABLE_IN_ALL -const gchar *gtk_shortcut_label_get_accelerator (GtkShortcutLabel *self); +const char *gtk_shortcut_label_get_accelerator (GtkShortcutLabel *self); GDK_AVAILABLE_IN_ALL void gtk_shortcut_label_set_accelerator (GtkShortcutLabel *self, - const gchar *accelerator); + const char *accelerator); GDK_AVAILABLE_IN_ALL -const gchar *gtk_shortcut_label_get_disabled_text (GtkShortcutLabel *self); +const char *gtk_shortcut_label_get_disabled_text (GtkShortcutLabel *self); GDK_AVAILABLE_IN_ALL void gtk_shortcut_label_set_disabled_text (GtkShortcutLabel *self, - const gchar *disabled_text); + const char *disabled_text); G_END_DECLS diff --git a/gtk/gtkshortcutsgroup.c b/gtk/gtkshortcutsgroup.c index e371222972..3cb4c7112e 100644 --- a/gtk/gtkshortcutsgroup.c +++ b/gtk/gtkshortcutsgroup.c @@ -47,7 +47,7 @@ struct _GtkShortcutsGroup GtkBox parent_instance; GtkLabel *title; - gchar *view; + char *view; guint height; GtkSizeGroup *accel_size_group; @@ -148,7 +148,7 @@ static void gtk_shortcuts_group_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_SHORTCUTS_SHORTCUT (child)) { diff --git a/gtk/gtkshortcutssection.c b/gtk/gtkshortcutssection.c index bc1c06c7bf..462becb974 100644 --- a/gtk/gtkshortcutssection.c +++ b/gtk/gtkshortcutssection.c @@ -59,9 +59,9 @@ struct _GtkShortcutsSection { GtkBox parent_instance; - gchar *name; - gchar *title; - gchar *view_name; + char *name; + char *title; + char *view_name; guint max_height; GtkStack *stack; @@ -106,7 +106,7 @@ static GParamSpec *properties[LAST_PROP]; static guint signals[LAST_SIGNAL]; static void gtk_shortcuts_section_set_view_name (GtkShortcutsSection *self, - const gchar *view_name); + const char *view_name); static void gtk_shortcuts_section_set_max_height (GtkShortcutsSection *self, guint max_height); static void gtk_shortcuts_section_add_group (GtkShortcutsSection *self, @@ -130,7 +130,7 @@ static void gtk_shortcuts_section_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_SHORTCUTS_GROUP (child)) gtk_shortcuts_section_add_group (GTK_SHORTCUTS_SECTION (buildable), GTK_SHORTCUTS_GROUP (child)); @@ -417,7 +417,7 @@ gtk_shortcuts_section_init (GtkShortcutsSection *self) static void gtk_shortcuts_section_set_view_name (GtkShortcutsSection *self, - const gchar *view_name) + const char *view_name) { if (g_strcmp0 (self->view_name, view_name) == 0) return; @@ -484,7 +484,7 @@ update_group_visibility (GtkWidget *child, gpointer data) if (GTK_IS_SHORTCUTS_GROUP (child)) { - gchar *view; + char *view; gboolean match; g_object_get (child, "view", &view, NULL); diff --git a/gtk/gtkshortcutsshortcut.c b/gtk/gtkshortcutsshortcut.c index a8baa86fe3..3c7d17887b 100644 --- a/gtk/gtkshortcutsshortcut.c +++ b/gtk/gtkshortcutsshortcut.c @@ -58,7 +58,7 @@ struct _GtkShortcutsShortcut gboolean subtitle_set; gboolean icon_set; GtkTextDirection direction; - gchar *action_name; + char *action_name; GtkShortcutType shortcut_type; }; @@ -89,7 +89,7 @@ static GParamSpec *properties[LAST_PROP]; static void gtk_shortcuts_shortcut_set_accelerator (GtkShortcutsShortcut *self, - const gchar *accelerator) + const char *accelerator) { gtk_shortcut_label_set_accelerator (self->accelerator, accelerator); } @@ -128,7 +128,7 @@ gtk_shortcuts_shortcut_set_title_size_group (GtkShortcutsShortcut *self, static void update_subtitle_from_type (GtkShortcutsShortcut *self) { - const gchar *subtitle; + const char *subtitle; if (self->subtitle_set) return; @@ -196,7 +196,7 @@ gtk_shortcuts_shortcut_set_subtitle_set (GtkShortcutsShortcut *self, static void gtk_shortcuts_shortcut_set_subtitle (GtkShortcutsShortcut *self, - const gchar *subtitle) + const char *subtitle) { gtk_label_set_label (self->subtitle, subtitle); gtk_widget_set_visible (GTK_WIDGET (self->subtitle), subtitle && subtitle[0]); @@ -341,7 +341,7 @@ gtk_shortcuts_shortcut_set_type (GtkShortcutsShortcut *self, static void gtk_shortcuts_shortcut_set_action_name (GtkShortcutsShortcut *self, - const gchar *action_name) + const char *action_name) { g_free (self->action_name); self->action_name = g_strdup (action_name); @@ -478,8 +478,8 @@ gtk_shortcuts_shortcut_update_accel (GtkShortcutsShortcut *self, GtkWindow *window) { GtkApplication *app; - gchar **accels; - gchar *str; + char **accels; + char *str; if (self->action_name == NULL) return; diff --git a/gtk/gtkshortcutswindow.c b/gtk/gtkshortcutswindow.c index 1593be6cfd..2fede662eb 100644 --- a/gtk/gtkshortcutswindow.c +++ b/gtk/gtkshortcutswindow.c @@ -102,9 +102,9 @@ struct _GtkShortcutsWindowClass typedef struct { GHashTable *keywords; - gchar *initial_section; - gchar *last_section_name; - gchar *view_name; + char *initial_section; + char *last_section_name; + char *view_name; GtkSizeGroup *search_text_group; GtkSizeGroup *search_image_group; GHashTable *search_items_hash; @@ -130,7 +130,7 @@ typedef struct GtkShortcutsWindow *self; GtkBuilder *builder; GQueue *stack; - gchar *property_name; + char *property_name; guint translatable : 1; } ViewsParserData; @@ -213,18 +213,18 @@ gtk_shortcuts_window_add_search_item (GtkWidget *child, gpointer data) GtkShortcutsWindow *self = data; GtkShortcutsWindowPrivate *priv = gtk_shortcuts_window_get_instance_private (self); GtkWidget *item; - gchar *accelerator = NULL; - gchar *title = NULL; - gchar *hash_key = NULL; + char *accelerator = NULL; + char *title = NULL; + char *hash_key = NULL; GIcon *icon = NULL; gboolean icon_set = FALSE; gboolean subtitle_set = FALSE; GtkTextDirection direction; GtkShortcutType shortcut_type; - gchar *action_name = NULL; - gchar *subtitle; - gchar *str; - gchar *keywords; + char *action_name = NULL; + char *subtitle; + char *str; + char *keywords; if (GTK_IS_SHORTCUTS_SHORTCUT (child)) { @@ -314,7 +314,7 @@ section_notify_cb (GObject *section, if (strcmp (pspec->name, "section-name") == 0) { - gchar *name; + char *name; g_object_get (section, "section-name", &name, NULL); g_object_set (gtk_stack_get_page (priv->stack, GTK_WIDGET (section)), "name", name, NULL); @@ -322,7 +322,7 @@ section_notify_cb (GObject *section, } else if (strcmp (pspec->name, "title") == 0) { - gchar *title; + char *title; GtkWidget *label; label = g_object_get_data (section, "gtk-shortcuts-title"); @@ -338,9 +338,9 @@ gtk_shortcuts_window_add_section (GtkShortcutsWindow *self, { GtkShortcutsWindowPrivate *priv = gtk_shortcuts_window_get_instance_private (self); GtkListBoxRow *row; - gchar *title; - gchar *name; - const gchar *visible_section; + char *title; + char *name; + const char *visible_section; GtkWidget *label; GtkWidget *child; @@ -393,7 +393,7 @@ static void gtk_shortcuts_window_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_SHORTCUTS_SECTION (child)) gtk_shortcuts_window_add_section (GTK_SHORTCUTS_WINDOW (buildable), @@ -412,7 +412,7 @@ gtk_shortcuts_window_buildable_iface_init (GtkBuildableIface *iface) static void gtk_shortcuts_window_set_view_name (GtkShortcutsWindow *self, - const gchar *view_name) + const char *view_name) { GtkShortcutsWindowPrivate *priv = gtk_shortcuts_window_get_instance_private (self); GtkWidget *section; @@ -431,7 +431,7 @@ gtk_shortcuts_window_set_view_name (GtkShortcutsWindow *self, static void gtk_shortcuts_window_set_section_name (GtkShortcutsWindow *self, - const gchar *section_name) + const char *section_name) { GtkShortcutsWindowPrivate *priv = gtk_shortcuts_window_get_instance_private (self); GtkWidget *section = NULL; @@ -544,10 +544,10 @@ gtk_shortcuts_window__entry__changed (GtkShortcutsWindow *self, GtkSearchEntry *search_entry) { GtkShortcutsWindowPrivate *priv = gtk_shortcuts_window_get_instance_private (self); - gchar *downcase = NULL; + char *downcase = NULL; GHashTableIter iter; - const gchar *text; - const gchar *last_section_name; + const char *text; + const char *last_section_name; gpointer key; gpointer value; gboolean has_result; @@ -581,7 +581,7 @@ gtk_shortcuts_window__entry__changed (GtkShortcutsWindow *self, while (g_hash_table_iter_next (&iter, &key, &value)) { GtkWidget *widget = key; - const gchar *keywords = value; + const char *keywords = value; gboolean match; if (hidden_by_direction (widget)) @@ -692,7 +692,7 @@ gtk_shortcuts_window_get_property (GObject *object, if (child != NULL) { - gchar *name = NULL; + char *name = NULL; g_object_get (gtk_stack_get_page (priv->stack, child), "name", &name, diff --git a/gtk/gtksidebarrow.c b/gtk/gtksidebarrow.c index 1177722c85..c1bf962c2b 100644 --- a/gtk/gtksidebarrow.c +++ b/gtk/gtksidebarrow.c @@ -40,15 +40,15 @@ struct _GtkSidebarRow GIcon *end_icon; GtkWidget *start_icon_widget; GtkWidget *end_icon_widget; - gchar *label; - gchar *tooltip; + char *label; + char *tooltip; GtkWidget *label_widget; gboolean ejectable; GtkWidget *eject_button; int order_index; GtkPlacesSidebarSectionType section_type; GtkPlacesSidebarPlaceType place_type; - gchar *uri; + char *uri; GDrive *drive; GVolume *volume; GMount *mount; diff --git a/gtk/gtksizegroup.c b/gtk/gtksizegroup.c index 51c7627024..ab18416da0 100644 --- a/gtk/gtksizegroup.c +++ b/gtk/gtksizegroup.c @@ -135,13 +135,13 @@ static void gtk_size_group_buildable_init (GtkBuildableIface *i static gboolean gtk_size_group_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); static void gtk_size_group_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data); G_STATIC_ASSERT (GTK_SIZE_GROUP_HORIZONTAL == (1 << GTK_ORIENTATION_HORIZONTAL)); @@ -440,7 +440,7 @@ gtk_size_group_get_widgets (GtkSizeGroup *size_group) } typedef struct { - gchar *name; + char *name; int line; int col; } ItemData; @@ -462,9 +462,9 @@ typedef struct { static void size_group_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -472,7 +472,7 @@ size_group_start_element (GtkBuildableParseContext *context, if (strcmp (element_name, "widget") == 0) { - const gchar *name; + const char *name; ItemData *item_data; if (!_gtk_builder_check_parent (data->builder, context, "widgets", error)) @@ -518,7 +518,7 @@ static gboolean gtk_size_group_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *parser_data) { @@ -547,7 +547,7 @@ static void gtk_size_group_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data) { GSList *l; diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 2bada1e6fd..512fbdd3c8 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -288,7 +288,7 @@ static void gtk_spin_button_set_orientation (GtkSpinButton *spin_button, static void gtk_spin_button_snap (GtkSpinButton *spin_button, gdouble val); static void gtk_spin_button_insert_text (GtkEditable *editable, - const gchar *new_text, + const char *new_text, int new_text_length, int *position); static void gtk_spin_button_real_spin (GtkSpinButton *spin_button, @@ -457,7 +457,7 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class) * gpointer data) * { * GtkAdjustment *adjustment; - * gchar *text; + * char *text; * int value; * * adjustment = gtk_spin_button_get_adjustment (spin); @@ -1131,13 +1131,13 @@ gtk_spin_button_set_orientation (GtkSpinButton *spin, g_object_notify (G_OBJECT (spin), "orientation"); } -static gchar * -weed_out_neg_zero (gchar *str, +static char * +weed_out_neg_zero (char *str, int digits) { if (str[0] == '-') { - gchar neg_zero[8]; + char neg_zero[8]; g_snprintf (neg_zero, 8, "%0.*f", digits, -0.0); if (strcmp (neg_zero, str) == 0) memmove (str, str + 1, strlen (str)); @@ -1145,11 +1145,11 @@ weed_out_neg_zero (gchar *str, return str; } -static gchar * +static char * gtk_spin_button_format_for_value (GtkSpinButton *spin_button, gdouble value) { - gchar *buf = g_strdup_printf ("%0.*f", spin_button->digits, value); + char *buf = g_strdup_printf ("%0.*f", spin_button->digits, value); return weed_out_neg_zero (buf, spin_button->digits); } @@ -1390,7 +1390,7 @@ gtk_spin_button_activate (GtkText *entry, static void gtk_spin_button_insert_text (GtkEditable *editable, - const gchar *new_text, + const char *new_text, int new_text_length, int *position) { @@ -1405,7 +1405,7 @@ gtk_spin_button_insert_text (GtkEditable *editable, guint32 pos_sign; guint32 neg_sign; int entry_length; - const gchar *entry_text; + const char *entry_text; entry_text = gtk_editable_get_text (GTK_EDITABLE (spin->entry)); entry_length = g_utf8_strlen (entry_text, -1); @@ -1543,7 +1543,7 @@ static int gtk_spin_button_default_input (GtkSpinButton *spin_button, gdouble *new_val) { - gchar *err = NULL; + char *err = NULL; const char *text = gtk_editable_get_text (GTK_EDITABLE (spin_button->entry)); *new_val = g_strtod (text, &err); @@ -1556,7 +1556,7 @@ gtk_spin_button_default_input (GtkSpinButton *spin_button, static void gtk_spin_button_default_output (GtkSpinButton *spin_button) { - gchar *buf = gtk_spin_button_format_for_value (spin_button, + char *buf = gtk_spin_button_format_for_value (spin_button, gtk_adjustment_get_value (spin_button->adjustment)); if (strcmp (buf, gtk_editable_get_text (GTK_EDITABLE (spin_button->entry)))) diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c index 8b5545ed26..a789be258c 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -1291,8 +1291,8 @@ stack_child_visibility_notify_cb (GObject *obj, GtkStackPage * gtk_stack_add_titled (GtkStack *stack, GtkWidget *child, - const gchar *name, - const gchar *title) + const char *name, + const char *title) { g_return_val_if_fail (GTK_IS_STACK (stack), NULL); g_return_val_if_fail (GTK_IS_WIDGET (child), NULL); @@ -1314,7 +1314,7 @@ gtk_stack_add_titled (GtkStack *stack, GtkStackPage * gtk_stack_add_named (GtkStack *stack, GtkWidget *child, - const gchar *name) + const char *name) { g_return_val_if_fail (GTK_IS_STACK (stack), NULL); g_return_val_if_fail (GTK_IS_WIDGET (child), NULL); @@ -1491,7 +1491,7 @@ gtk_stack_get_page (GtkStack *stack, */ GtkWidget * gtk_stack_get_child_by_name (GtkStack *stack, - const gchar *name) + const char *name) { GtkStackPrivate *priv = gtk_stack_get_instance_private (stack); GtkStackPage *info; @@ -1810,7 +1810,7 @@ gtk_stack_get_visible_child (GtkStack *stack) * * Returns: (transfer none) (nullable): the name of the visible child of the #GtkStack */ -const gchar * +const char * gtk_stack_get_visible_child_name (GtkStack *stack) { GtkStackPrivate *priv = gtk_stack_get_instance_private (stack); @@ -1881,7 +1881,7 @@ gtk_stack_set_visible_child (GtkStack *stack, */ void gtk_stack_set_visible_child_name (GtkStack *stack, - const gchar *name) + const char *name) { GtkStackPrivate *priv = gtk_stack_get_instance_private (stack); @@ -1904,7 +1904,7 @@ gtk_stack_set_visible_child_name (GtkStack *stack, */ void gtk_stack_set_visible_child_full (GtkStack *stack, - const gchar *name, + const char *name, GtkStackTransitionType transition) { GtkStackPrivate *priv = gtk_stack_get_instance_private (stack); diff --git a/gtk/gtkstack.h b/gtk/gtkstack.h index efe9168fc7..6253890aa5 100644 --- a/gtk/gtkstack.h +++ b/gtk/gtkstack.h @@ -115,12 +115,12 @@ GtkWidget * gtk_stack_new (void); GDK_AVAILABLE_IN_ALL GtkStackPage * gtk_stack_add_named (GtkStack *stack, GtkWidget *child, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL GtkStackPage * gtk_stack_add_titled (GtkStack *stack, GtkWidget *child, - const gchar *name, - const gchar *title); + const char *name, + const char *title); GDK_AVAILABLE_IN_ALL void gtk_stack_remove (GtkStack *stack, GtkWidget *child); @@ -130,7 +130,7 @@ GtkStackPage * gtk_stack_get_page (GtkStack GtkWidget *child); GDK_AVAILABLE_IN_ALL GtkWidget * gtk_stack_get_child_by_name (GtkStack *stack, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL void gtk_stack_set_visible_child (GtkStack *stack, GtkWidget *child); @@ -138,12 +138,12 @@ GDK_AVAILABLE_IN_ALL GtkWidget * gtk_stack_get_visible_child (GtkStack *stack); GDK_AVAILABLE_IN_ALL void gtk_stack_set_visible_child_name (GtkStack *stack, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL -const gchar * gtk_stack_get_visible_child_name (GtkStack *stack); +const char * gtk_stack_get_visible_child_name (GtkStack *stack); GDK_AVAILABLE_IN_ALL void gtk_stack_set_visible_child_full (GtkStack *stack, - const gchar *name, + const char *name, GtkStackTransitionType transition); GDK_AVAILABLE_IN_ALL void gtk_stack_set_hhomogeneous (GtkStack *stack, diff --git a/gtk/gtkstacksidebar.c b/gtk/gtkstacksidebar.c index 781ddb934d..81ac989425 100644 --- a/gtk/gtkstacksidebar.c +++ b/gtk/gtkstacksidebar.c @@ -184,7 +184,7 @@ update_row (GtkStackSidebar *self, GtkWidget *row) { GtkWidget *item; - gchar *title; + char *title; gboolean needs_attention; gboolean visible; diff --git a/gtk/gtkstackswitcher.c b/gtk/gtkstackswitcher.c index 29f962b063..67e0c37f6d 100644 --- a/gtk/gtkstackswitcher.c +++ b/gtk/gtkstackswitcher.c @@ -122,8 +122,8 @@ on_button_toggled (GtkWidget *button, static void rebuild_child (GtkWidget *self, - const gchar *icon_name, - const gchar *title, + const char *icon_name, + const char *title, gboolean use_underline) { GtkWidget *button_child; @@ -162,8 +162,8 @@ update_button (GtkStackSwitcher *self, GtkStackPage *page, GtkWidget *button) { - gchar *title; - gchar *icon_name; + char *title; + char *icon_name; gboolean needs_attention; gboolean visible; gboolean use_underline; diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c index c2c973f7e1..b836c80942 100644 --- a/gtk/gtkstatusbar.c +++ b/gtk/gtkstatusbar.c @@ -102,15 +102,15 @@ struct _GtkStatusbarClass void (*text_pushed) (GtkStatusbar *statusbar, guint context_id, - const gchar *text); + const char *text); void (*text_popped) (GtkStatusbar *statusbar, guint context_id, - const gchar *text); + const char *text); }; struct _GtkStatusbarMsg { - gchar *text; + char *text; guint context_id; guint message_id; }; @@ -124,7 +124,7 @@ enum static void gtk_statusbar_update (GtkStatusbar *statusbar, guint context_id, - const gchar *text); + const char *text); static void gtk_statusbar_msg_free (GtkStatusbarMsg *msg); @@ -235,7 +235,7 @@ gtk_statusbar_new (void) static void gtk_statusbar_update (GtkStatusbar *statusbar, guint context_id, - const gchar *text) + const char *text) { g_return_if_fail (GTK_IS_STATUSBAR (statusbar)); @@ -259,9 +259,9 @@ gtk_statusbar_update (GtkStatusbar *statusbar, */ guint gtk_statusbar_get_context_id (GtkStatusbar *statusbar, - const gchar *context_description) + const char *context_description) { - gchar *string; + char *string; guint id; g_return_val_if_fail (GTK_IS_STATUSBAR (statusbar), 0); @@ -286,7 +286,7 @@ gtk_statusbar_get_context_id (GtkStatusbar *statusbar, static GtkStatusbarMsg * gtk_statusbar_msg_create (GtkStatusbar *statusbar, guint context_id, - const gchar *text) + const char *text) { GtkStatusbarMsg *msg; @@ -320,7 +320,7 @@ gtk_statusbar_msg_free (GtkStatusbarMsg *msg) guint gtk_statusbar_push (GtkStatusbar *statusbar, guint context_id, - const gchar *text) + const char *text) { GtkStatusbarMsg *msg; diff --git a/gtk/gtkstatusbar.h b/gtk/gtkstatusbar.h index 530f82e75f..13c4695e80 100644 --- a/gtk/gtkstatusbar.h +++ b/gtk/gtkstatusbar.h @@ -46,11 +46,11 @@ GDK_AVAILABLE_IN_ALL GtkWidget* gtk_statusbar_new (void); GDK_AVAILABLE_IN_ALL guint gtk_statusbar_get_context_id (GtkStatusbar *statusbar, - const gchar *context_description); + const char *context_description); GDK_AVAILABLE_IN_ALL guint gtk_statusbar_push (GtkStatusbar *statusbar, guint context_id, - const gchar *text); + const char *text); GDK_AVAILABLE_IN_ALL void gtk_statusbar_pop (GtkStatusbar *statusbar, guint context_id); diff --git a/gtk/gtkstringlist.c b/gtk/gtkstringlist.c index 3b62479e0d..daf1731372 100644 --- a/gtk/gtkstringlist.c +++ b/gtk/gtkstringlist.c @@ -246,8 +246,8 @@ typedef struct GtkBuilder *builder; GtkStringList *list; GString *string; - const gchar *domain; - gchar *context; + const char *domain; + char *context; guint translatable : 1; guint is_text : 1; @@ -255,9 +255,9 @@ typedef struct static void item_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -276,7 +276,7 @@ item_start_element (GtkBuildableParseContext *context, else if (strcmp (element_name, "item") == 0) { gboolean translatable = FALSE; - const gchar *msg_context = NULL; + const char *msg_context = NULL; if (!_gtk_builder_check_parent (data->builder, context, "items", error)) return; @@ -305,7 +305,7 @@ item_start_element (GtkBuildableParseContext *context, static void item_text (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) @@ -318,7 +318,7 @@ item_text (GtkBuildableParseContext *context, static void item_end_element (GtkBuildableParseContext *context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error) { @@ -357,7 +357,7 @@ static gboolean gtk_string_list_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *parser_data) { @@ -384,7 +384,7 @@ static void gtk_string_list_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data) { if (strcmp (tagname, "items") == 0) diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index 620411e873..b11a5b8028 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -672,7 +672,7 @@ gtk_style_context_restore (GtkStyleContext *context) **/ void gtk_style_context_add_class (GtkStyleContext *context, - const gchar *class_name) + const char *class_name) { GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context); GQuark class_quark; @@ -694,7 +694,7 @@ gtk_style_context_add_class (GtkStyleContext *context, **/ void gtk_style_context_remove_class (GtkStyleContext *context, - const gchar *class_name) + const char *class_name) { GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context); GQuark class_quark; @@ -721,7 +721,7 @@ gtk_style_context_remove_class (GtkStyleContext *context, **/ gboolean gtk_style_context_has_class (GtkStyleContext *context, - const gchar *class_name) + const char *class_name) { GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context); GQuark class_quark; @@ -843,7 +843,7 @@ gtk_style_context_resolve_color (GtkStyleContext *context, **/ gboolean gtk_style_context_lookup_color (GtkStyleContext *context, - const gchar *color_name, + const char *color_name, GdkRGBA *color) { GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context); @@ -1324,7 +1324,7 @@ gtk_snapshot_render_insertion_cursor (GtkSnapshot *snapshot, static AtkAttributeSet * add_attribute (AtkAttributeSet *attributes, AtkTextAttribute attr, - const gchar *value) + const char *value) { AtkAttribute *at; @@ -1354,7 +1354,7 @@ _gtk_style_context_get_attributes (AtkAttributeSet *attributes, GtkStyleContext *context) { const GdkRGBA *color; - gchar *value; + char *value; color = gtk_css_color_value_get_rgba (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BACKGROUND_COLOR)); value = g_strdup_printf ("%u,%u,%u", diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h index 87cc285c2f..688f6fd1e0 100644 --- a/gtk/gtkstylecontext.h +++ b/gtk/gtkstylecontext.h @@ -867,13 +867,13 @@ int gtk_style_context_get_scale (GtkStyleContext *context); GDK_AVAILABLE_IN_ALL void gtk_style_context_add_class (GtkStyleContext *context, - const gchar *class_name); + const char *class_name); GDK_AVAILABLE_IN_ALL void gtk_style_context_remove_class (GtkStyleContext *context, - const gchar *class_name); + const char *class_name); GDK_AVAILABLE_IN_ALL gboolean gtk_style_context_has_class (GtkStyleContext *context, - const gchar *class_name); + const char *class_name); GDK_AVAILABLE_IN_ALL void gtk_style_context_set_display (GtkStyleContext *context, @@ -883,7 +883,7 @@ GdkDisplay *gtk_style_context_get_display (GtkStyleContext *context); GDK_AVAILABLE_IN_ALL gboolean gtk_style_context_lookup_color (GtkStyleContext *context, - const gchar *color_name, + const char *color_name, GdkRGBA *color); /* Some helper functions to retrieve most common properties */ diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c index 6740d9eeed..a6e8d88d93 100644 --- a/gtk/gtkswitch.c +++ b/gtk/gtkswitch.c @@ -364,7 +364,7 @@ gtk_switch_allocate (GtkWidget *widget, static void gtk_switch_set_action_name (GtkActionable *actionable, - const gchar *action_name) + const char *action_name) { GtkSwitch *self = GTK_SWITCH (actionable); @@ -386,7 +386,7 @@ gtk_switch_set_action_target_value (GtkActionable *actionable, gtk_action_helper_set_action_target_value (self->action_helper, action_target); } -static const gchar * +static const char * gtk_switch_get_action_name (GtkActionable *actionable) { GtkSwitch *self = GTK_SWITCH (actionable); diff --git a/gtk/gtktextattributes.h b/gtk/gtktextattributes.h index bb756d44ea..d087fed77b 100644 --- a/gtk/gtktextattributes.h +++ b/gtk/gtktextattributes.h @@ -181,7 +181,7 @@ struct _GtkTextAttributes int letter_spacing; - gchar *font_features; + char *font_features; }; GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 37ab1fe77b..662acb3c5e 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -1092,7 +1092,7 @@ _gtk_text_btree_delete (GtkTextIter *start, void _gtk_text_btree_insert (GtkTextIter *iter, - const gchar *text, + const char *text, int len) { GtkTextLineSegment *prev_seg; /* The segment just before the first @@ -2406,7 +2406,7 @@ copy_segment (GString *string, } } -gchar* +char * _gtk_text_btree_get_text (const GtkTextIter *start_orig, const GtkTextIter *end_orig, gboolean include_hidden, @@ -2415,7 +2415,7 @@ _gtk_text_btree_get_text (const GtkTextIter *start_orig, GtkTextLineSegment *seg; GtkTextLineSegment *end_seg; GString *retval; - gchar *str; + char *str; GtkTextIter iter; GtkTextIter start; GtkTextIter end; @@ -2717,7 +2717,7 @@ ensure_not_off_end (GtkTextBTree *tree, static GtkTextLineSegment* real_set_mark (GtkTextBTree *tree, GtkTextMark *existing_mark, - const gchar *name, + const char *name, gboolean left_gravity, const GtkTextIter *where, gboolean should_exist, @@ -2846,7 +2846,7 @@ real_set_mark (GtkTextBTree *tree, GtkTextMark* _gtk_text_btree_set_mark (GtkTextBTree *tree, GtkTextMark *existing_mark, - const gchar *name, + const char *name, gboolean left_gravity, const GtkTextIter *iter, gboolean should_exist) @@ -2936,7 +2936,7 @@ _gtk_text_btree_select_range (GtkTextBTree *tree, void _gtk_text_btree_remove_mark_by_name (GtkTextBTree *tree, - const gchar *name) + const char *name) { GtkTextMark *mark; @@ -3017,7 +3017,7 @@ _gtk_text_btree_get_selection_bound (GtkTextBTree *tree) GtkTextMark* _gtk_text_btree_get_mark_by_name (GtkTextBTree *tree, - const gchar *name) + const char *name) { GtkTextLineSegment *seg; @@ -7168,7 +7168,7 @@ _gtk_text_btree_spew (GtkTextBTree *tree) void _gtk_text_btree_spew_line_short (GtkTextLine *line, int indent) { - gchar * spaces; + char * spaces; GtkTextLineSegment *seg; spaces = g_strnfill (indent, ' '); @@ -7183,8 +7183,8 @@ _gtk_text_btree_spew_line_short (GtkTextLine *line, int indent) { if (seg->type == >k_text_char_type) { - gchar* str = g_strndup (seg->body.chars, MIN (seg->byte_count, 10)); - gchar* s; + char * str = g_strndup (seg->body.chars, MIN (seg->byte_count, 10)); + char * s; s = str; while (*s) { @@ -7226,7 +7226,7 @@ _gtk_text_btree_spew_line_short (GtkTextLine *line, int indent) void _gtk_text_btree_spew_node (GtkTextBTreeNode *node, int indent) { - gchar * spaces; + char * spaces; GtkTextBTreeNode *iter; Summary *s; @@ -7293,7 +7293,7 @@ _gtk_text_btree_spew_segment (GtkTextBTree* tree, GtkTextLineSegment * seg) if (seg->type == >k_text_char_type) { - gchar* str = g_strndup (seg->body.chars, seg->byte_count); + char * str = g_strndup (seg->body.chars, seg->byte_count); printf (" '%s'\n", str); g_free (str); } diff --git a/gtk/gtktextbtree.h b/gtk/gtktextbtree.h index d144637d31..40d864e074 100644 --- a/gtk/gtktextbtree.h +++ b/gtk/gtktextbtree.h @@ -66,7 +66,7 @@ gboolean _gtk_text_btree_is_end (GtkTextBTree *tree, void _gtk_text_btree_delete (GtkTextIter *start, GtkTextIter *end); void _gtk_text_btree_insert (GtkTextIter *iter, - const gchar *text, + const char *text, int len); void _gtk_text_btree_insert_paintable (GtkTextIter *iter, GdkPaintable *texture); @@ -130,7 +130,7 @@ GtkTextLine * _gtk_text_btree_get_line_at_char (GtkTextBTree *tree, int *real_char_index); GtkTextTag** _gtk_text_btree_get_tags (const GtkTextIter *iter, int *num_tags); -gchar *_gtk_text_btree_get_text (const GtkTextIter *start, +char *_gtk_text_btree_get_text (const GtkTextIter *start, const GtkTextIter *end, gboolean include_hidden, gboolean include_nonchars); @@ -154,10 +154,10 @@ void _gtk_text_btree_get_iter_at_line_byte (GtkTextBTree *tree, int byte_index); gboolean _gtk_text_btree_get_iter_from_string (GtkTextBTree *tree, GtkTextIter *iter, - const gchar *string); + const char *string); gboolean _gtk_text_btree_get_iter_at_mark_name (GtkTextBTree *tree, GtkTextIter *iter, - const gchar *mark_name); + const char *mark_name); void _gtk_text_btree_get_iter_at_mark (GtkTextBTree *tree, GtkTextIter *iter, GtkTextMark *mark); @@ -186,12 +186,12 @@ void _gtk_text_btree_get_iter_at_child_anchor (GtkTextBTree *tree, /* Manipulate marks */ GtkTextMark *_gtk_text_btree_set_mark (GtkTextBTree *tree, GtkTextMark *existing_mark, - const gchar *name, + const char *name, gboolean left_gravity, const GtkTextIter *index, gboolean should_exist); void _gtk_text_btree_remove_mark_by_name (GtkTextBTree *tree, - const gchar *name); + const char *name); void _gtk_text_btree_remove_mark (GtkTextBTree *tree, GtkTextMark *segment); gboolean _gtk_text_btree_get_selection_bounds (GtkTextBTree *tree, @@ -209,7 +209,7 @@ gboolean _gtk_text_btree_mark_is_selection_bound (GtkTextBTree GtkTextMark *_gtk_text_btree_get_insert (GtkTextBTree *tree); GtkTextMark *_gtk_text_btree_get_selection_bound (GtkTextBTree *tree); GtkTextMark *_gtk_text_btree_get_mark_by_name (GtkTextBTree *tree, - const gchar *name); + const char *name); GtkTextLine * _gtk_text_btree_first_could_contain_tag (GtkTextBTree *tree, GtkTextTag *tag); GtkTextLine * _gtk_text_btree_last_could_contain_tag (GtkTextBTree *tree, diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c index c4f59efc4e..7626d29671 100644 --- a/gtk/gtktextbuffer.c +++ b/gtk/gtktextbuffer.c @@ -126,7 +126,7 @@ static void gtk_text_buffer_finalize (GObject *object); static void gtk_text_buffer_real_insert_text (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *text, + const char *text, int len); static void gtk_text_buffer_real_insert_paintable (GtkTextBuffer *buffer, GtkTextIter *iter, @@ -1175,7 +1175,7 @@ gtk_text_buffer_get_tag_table (GtkTextBuffer *buffer) **/ void gtk_text_buffer_set_text (GtkTextBuffer *buffer, - const gchar *text, + const char *text, int len) { GtkTextIter start, end; @@ -1210,7 +1210,7 @@ gtk_text_buffer_set_text (GtkTextBuffer *buffer, static void gtk_text_buffer_real_insert_text (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *text, + const char *text, int len) { g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer)); @@ -1230,7 +1230,7 @@ gtk_text_buffer_real_insert_text (GtkTextBuffer *buffer, static void gtk_text_buffer_emit_insert (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *text, + const char *text, int len) { g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer)); @@ -1267,7 +1267,7 @@ gtk_text_buffer_emit_insert (GtkTextBuffer *buffer, void gtk_text_buffer_insert (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *text, + const char *text, int len) { g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer)); @@ -1289,7 +1289,7 @@ gtk_text_buffer_insert (GtkTextBuffer *buffer, **/ void gtk_text_buffer_insert_at_cursor (GtkTextBuffer *buffer, - const gchar *text, + const char *text, int len) { GtkTextIter iter; @@ -1325,7 +1325,7 @@ gtk_text_buffer_insert_at_cursor (GtkTextBuffer *buffer, gboolean gtk_text_buffer_insert_interactive (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *text, + const char *text, int len, gboolean default_editable) { @@ -1362,7 +1362,7 @@ gtk_text_buffer_insert_interactive (GtkTextBuffer *buffer, **/ gboolean gtk_text_buffer_insert_interactive_at_cursor (GtkTextBuffer *buffer, - const gchar *text, + const char *text, int len, gboolean default_editable) { @@ -1392,7 +1392,7 @@ insert_text_range (GtkTextBuffer *buffer, const GtkTextIter *orig_end, gboolean interactive) { - gchar *text; + char *text; text = gtk_text_iter_get_text (orig_start, orig_end); @@ -1820,7 +1820,7 @@ gtk_text_buffer_insert_range_interactive (GtkTextBuffer *buffer, void gtk_text_buffer_insert_with_tags (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *text, + const char *text, int len, GtkTextTag *first_tag, ...) @@ -1871,15 +1871,15 @@ gtk_text_buffer_insert_with_tags (GtkTextBuffer *buffer, void gtk_text_buffer_insert_with_tags_by_name (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *text, + const char *text, int len, - const gchar *first_tag_name, + const char *first_tag_name, ...) { int start_offset; GtkTextIter start; va_list args; - const gchar *tag_name; + const char *tag_name; g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer)); g_return_if_fail (iter != NULL); @@ -1913,7 +1913,7 @@ gtk_text_buffer_insert_with_tags_by_name (GtkTextBuffer *buffer, gtk_text_buffer_apply_tag (buffer, tag, &start, iter); - tag_name = va_arg (args, const gchar*); + tag_name = va_arg (args, const char *); } va_end (args); @@ -1938,7 +1938,7 @@ gtk_text_buffer_real_delete_range (GtkTextBuffer *buffer, if (gtk_text_history_get_enabled (buffer->priv->history)) { GtkTextIter sel_begin, sel_end; - gchar *text; + char *text; if (gtk_text_buffer_get_selection_bounds (buffer, &sel_begin, &sel_end)) gtk_text_history_selection_changed (buffer->priv->history, @@ -2182,7 +2182,7 @@ gtk_text_buffer_delete_interactive (GtkTextBuffer *buffer, * * Returns: (transfer full): an allocated UTF-8 string **/ -gchar* +char * gtk_text_buffer_get_text (GtkTextBuffer *buffer, const GtkTextIter *start, const GtkTextIter *end, @@ -2220,7 +2220,7 @@ gtk_text_buffer_get_text (GtkTextBuffer *buffer, * * Returns: (transfer full): an allocated UTF-8 string **/ -gchar* +char * gtk_text_buffer_get_slice (GtkTextBuffer *buffer, const GtkTextIter *start, const GtkTextIter *end, @@ -2408,7 +2408,7 @@ gtk_text_buffer_mark_set (GtkTextBuffer *buffer, static GtkTextMark* gtk_text_buffer_set_mark (GtkTextBuffer *buffer, GtkTextMark *existing_mark, - const gchar *mark_name, + const char *mark_name, const GtkTextIter *iter, gboolean left_gravity, gboolean should_exist) @@ -2463,7 +2463,7 @@ gtk_text_buffer_set_mark (GtkTextBuffer *buffer, **/ GtkTextMark* gtk_text_buffer_create_mark (GtkTextBuffer *buffer, - const gchar *mark_name, + const char *mark_name, const GtkTextIter *where, gboolean left_gravity) { @@ -2491,7 +2491,7 @@ gtk_text_buffer_add_mark (GtkTextBuffer *buffer, GtkTextMark *mark, const GtkTextIter *where) { - const gchar *name; + const char *name; g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer)); g_return_if_fail (GTK_IS_TEXT_MARK (mark)); @@ -2602,7 +2602,7 @@ gtk_text_buffer_delete_mark (GtkTextBuffer *buffer, **/ GtkTextMark* gtk_text_buffer_get_mark (GtkTextBuffer *buffer, - const gchar *name) + const char *name) { GtkTextMark *mark; @@ -2625,7 +2625,7 @@ gtk_text_buffer_get_mark (GtkTextBuffer *buffer, **/ void gtk_text_buffer_move_mark_by_name (GtkTextBuffer *buffer, - const gchar *name, + const char *name, const GtkTextIter *where) { GtkTextMark *mark; @@ -2654,7 +2654,7 @@ gtk_text_buffer_move_mark_by_name (GtkTextBuffer *buffer, **/ void gtk_text_buffer_delete_mark_by_name (GtkTextBuffer *buffer, - const gchar *name) + const char *name) { GtkTextMark *mark; @@ -2822,8 +2822,8 @@ gtk_text_buffer_select_range (GtkTextBuffer *buffer, */ GtkTextTag* gtk_text_buffer_create_tag (GtkTextBuffer *buffer, - const gchar *tag_name, - const gchar *first_property_name, + const char *tag_name, + const char *first_property_name, ...) { GtkTextTag *tag; @@ -3012,7 +3012,7 @@ gtk_text_buffer_remove_tag (GtkTextBuffer *buffer, **/ void gtk_text_buffer_apply_tag_by_name (GtkTextBuffer *buffer, - const gchar *name, + const char *name, const GtkTextIter *start, const GtkTextIter *end) { @@ -3049,7 +3049,7 @@ gtk_text_buffer_apply_tag_by_name (GtkTextBuffer *buffer, **/ void gtk_text_buffer_remove_tag_by_name (GtkTextBuffer *buffer, - const gchar *name, + const char *name, const GtkTextIter *start, const GtkTextIter *end) { @@ -3964,7 +3964,7 @@ gtk_text_buffer_backspace (GtkTextBuffer *buffer, gboolean interactive, gboolean default_editable) { - gchar *cluster_text; + char *cluster_text; GtkTextIter start; GtkTextIter end; gboolean retval = FALSE; @@ -3998,7 +3998,7 @@ gtk_text_buffer_backspace (GtkTextBuffer *buffer, /* special case \r\n, since we never want to reinsert \r */ if (backspace_deletes_character && strcmp ("\r\n", cluster_text)) { - gchar *normalized_text = g_utf8_normalize (cluster_text, + char *normalized_text = g_utf8_normalize (cluster_text, strlen (cluster_text), G_NORMALIZE_NFD); glong len = g_utf8_strlen (normalized_text, -1); @@ -4257,7 +4257,7 @@ compute_log_attrs (const GtkTextIter *iter, { GtkTextIter start; GtkTextIter end; - gchar *paragraph; + char *paragraph; int char_len, byte_len; PangoLogAttr *attrs = NULL; @@ -4846,7 +4846,7 @@ get_tag_for_attributes (PangoAttrIterator *iter) static void gtk_text_buffer_insert_with_attributes (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *text, + const char *text, PangoAttrList *attributes) { GtkTextMark *mark; @@ -4905,11 +4905,11 @@ gtk_text_buffer_insert_with_attributes (GtkTextBuffer *buffer, void gtk_text_buffer_insert_markup (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *markup, + const char *markup, int len) { PangoAttrList *attributes; - gchar *text; + char *text; GError *error = NULL; if (!pango_parse_markup (markup, len, 0, &attributes, &text, NULL, &error)) diff --git a/gtk/gtktextbuffer.h b/gtk/gtktextbuffer.h index bd7f272ece..1c382bb7c5 100644 --- a/gtk/gtktextbuffer.h +++ b/gtk/gtktextbuffer.h @@ -104,7 +104,7 @@ struct _GtkTextBufferClass void (* insert_text) (GtkTextBuffer *buffer, GtkTextIter *pos, - const gchar *new_text, + const char *new_text, int new_text_length); void (* insert_paintable) (GtkTextBuffer *buffer, @@ -178,29 +178,29 @@ GtkTextTagTable* gtk_text_buffer_get_tag_table (GtkTextBuffer *buffer); /* Delete whole buffer, then insert */ GDK_AVAILABLE_IN_ALL void gtk_text_buffer_set_text (GtkTextBuffer *buffer, - const gchar *text, + const char *text, int len); /* Insert into the buffer */ GDK_AVAILABLE_IN_ALL void gtk_text_buffer_insert (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *text, + const char *text, int len); GDK_AVAILABLE_IN_ALL void gtk_text_buffer_insert_at_cursor (GtkTextBuffer *buffer, - const gchar *text, + const char *text, int len); GDK_AVAILABLE_IN_ALL gboolean gtk_text_buffer_insert_interactive (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *text, + const char *text, int len, gboolean default_editable); GDK_AVAILABLE_IN_ALL gboolean gtk_text_buffer_insert_interactive_at_cursor (GtkTextBuffer *buffer, - const gchar *text, + const char *text, int len, gboolean default_editable); @@ -219,7 +219,7 @@ gboolean gtk_text_buffer_insert_range_interactive (GtkTextBuffer *buffer, GDK_AVAILABLE_IN_ALL void gtk_text_buffer_insert_with_tags (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *text, + const char *text, int len, GtkTextTag *first_tag, ...) G_GNUC_NULL_TERMINATED; @@ -227,15 +227,15 @@ void gtk_text_buffer_insert_with_tags (GtkTextBuffer *buffer, GDK_AVAILABLE_IN_ALL void gtk_text_buffer_insert_with_tags_by_name (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *text, + const char *text, int len, - const gchar *first_tag_name, + const char *first_tag_name, ...) G_GNUC_NULL_TERMINATED; GDK_AVAILABLE_IN_ALL void gtk_text_buffer_insert_markup (GtkTextBuffer *buffer, GtkTextIter *iter, - const gchar *markup, + const char *markup, int len); /* Delete from the buffer */ @@ -256,13 +256,13 @@ gboolean gtk_text_buffer_backspace (GtkTextBuffer *buffer, /* Obtain strings from the buffer */ GDK_AVAILABLE_IN_ALL -gchar *gtk_text_buffer_get_text (GtkTextBuffer *buffer, +char *gtk_text_buffer_get_text (GtkTextBuffer *buffer, const GtkTextIter *start, const GtkTextIter *end, gboolean include_hidden_chars); GDK_AVAILABLE_IN_ALL -gchar *gtk_text_buffer_get_slice (GtkTextBuffer *buffer, +char *gtk_text_buffer_get_slice (GtkTextBuffer *buffer, const GtkTextIter *start, const GtkTextIter *end, gboolean include_hidden_chars); @@ -291,7 +291,7 @@ void gtk_text_buffer_add_mark (GtkTextBuffer *buffer, const GtkTextIter *where); GDK_AVAILABLE_IN_ALL GtkTextMark *gtk_text_buffer_create_mark (GtkTextBuffer *buffer, - const gchar *mark_name, + const char *mark_name, const GtkTextIter *where, gboolean left_gravity); GDK_AVAILABLE_IN_ALL @@ -303,15 +303,15 @@ void gtk_text_buffer_delete_mark (GtkTextBuffer *buffer, GtkTextMark *mark); GDK_AVAILABLE_IN_ALL GtkTextMark* gtk_text_buffer_get_mark (GtkTextBuffer *buffer, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL void gtk_text_buffer_move_mark_by_name (GtkTextBuffer *buffer, - const gchar *name, + const char *name, const GtkTextIter *where); GDK_AVAILABLE_IN_ALL void gtk_text_buffer_delete_mark_by_name (GtkTextBuffer *buffer, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL GtkTextMark* gtk_text_buffer_get_insert (GtkTextBuffer *buffer); @@ -342,12 +342,12 @@ void gtk_text_buffer_remove_tag (GtkTextBuffer *buffer, const GtkTextIter *end); GDK_AVAILABLE_IN_ALL void gtk_text_buffer_apply_tag_by_name (GtkTextBuffer *buffer, - const gchar *name, + const char *name, const GtkTextIter *start, const GtkTextIter *end); GDK_AVAILABLE_IN_ALL void gtk_text_buffer_remove_tag_by_name (GtkTextBuffer *buffer, - const gchar *name, + const char *name, const GtkTextIter *start, const GtkTextIter *end); GDK_AVAILABLE_IN_ALL @@ -361,8 +361,8 @@ void gtk_text_buffer_remove_all_tags (GtkTextBuffer *buffer, */ GDK_AVAILABLE_IN_ALL GtkTextTag *gtk_text_buffer_create_tag (GtkTextBuffer *buffer, - const gchar *tag_name, - const gchar *first_property_name, + const char *tag_name, + const char *first_property_name, ...); /* Obtain iterators pointed at various places, then you can move the diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c index bd87f34bcf..6fdf42d138 100644 --- a/gtk/gtktextiter.c +++ b/gtk/gtktextiter.c @@ -903,7 +903,7 @@ gtk_text_iter_get_char (const GtkTextIter *iter) * * Returns: (transfer full): slice of text from the buffer **/ -gchar* +char * gtk_text_iter_get_slice (const GtkTextIter *start, const GtkTextIter *end) { @@ -929,7 +929,7 @@ gtk_text_iter_get_slice (const GtkTextIter *start, * * Returns: (transfer full): array of characters from the buffer **/ -gchar* +char * gtk_text_iter_get_text (const GtkTextIter *start, const GtkTextIter *end) { @@ -953,7 +953,7 @@ gtk_text_iter_get_text (const GtkTextIter *start, * * Returns: (transfer full): slice of text from the buffer **/ -gchar* +char * gtk_text_iter_get_visible_slice (const GtkTextIter *start, const GtkTextIter *end) { @@ -978,7 +978,7 @@ gtk_text_iter_get_visible_slice (const GtkTextIter *start, * Returns: (transfer full): string containing visible text in the * range **/ -gchar* +char * gtk_text_iter_get_visible_text (const GtkTextIter *start, const GtkTextIter *end) { @@ -4433,9 +4433,9 @@ forward_chars_with_skipping (GtkTextIter *iter, offsets coming from canonical decompositions of UTF8 characters (e.g. accented characters) which g_utf8_normalize() performs */ - gchar *normal; - gchar *casefold; - gchar buffer[6]; + char *normal; + char *casefold; + char buffer[6]; int buffer_len; buffer_len = g_unichar_to_utf8 (gtk_text_iter_get_char (iter), buffer); @@ -4453,12 +4453,12 @@ forward_chars_with_skipping (GtkTextIter *iter, } } -static const gchar * -pointer_from_offset_skipping_decomp (const gchar *str, +static const char * +pointer_from_offset_skipping_decomp (const char *str, int offset) { - gchar *casefold, *normal; - const gchar *p, *q; + char *casefold, *normal; + const char *p, *q; p = str; @@ -4477,8 +4477,8 @@ pointer_from_offset_skipping_decomp (const gchar *str, } static gboolean -exact_prefix_cmp (const gchar *string, - const gchar *prefix, +exact_prefix_cmp (const char *string, + const char *prefix, guint prefix_len) { GUnicodeType type; @@ -4498,16 +4498,16 @@ exact_prefix_cmp (const gchar *string, type != G_UNICODE_NON_SPACING_MARK; } -static const gchar * -utf8_strcasestr (const gchar *haystack, - const gchar *needle) +static const char * +utf8_strcasestr (const char *haystack, + const char *needle) { gsize needle_len; gsize haystack_len; - const gchar *ret = NULL; - gchar *p; - gchar *casefold; - gchar *caseless_haystack; + const char *ret = NULL; + char *p; + char *casefold; + char *caseless_haystack; int i; g_return_val_if_fail (haystack != NULL, NULL); @@ -4522,7 +4522,7 @@ utf8_strcasestr (const gchar *haystack, if (needle_len == 0) { - ret = (gchar *)haystack; + ret = (char *)haystack; goto finally; } @@ -4532,7 +4532,7 @@ utf8_strcasestr (const gchar *haystack, goto finally; } - p = (gchar *)caseless_haystack; + p = (char *)caseless_haystack; needle_len = strlen (needle); i = 0; @@ -4554,16 +4554,16 @@ finally: return ret; } -static const gchar * -utf8_strrcasestr (const gchar *haystack, - const gchar *needle) +static const char * +utf8_strrcasestr (const char *haystack, + const char *needle) { gsize needle_len; gsize haystack_len; - const gchar *ret = NULL; - gchar *p; - gchar *casefold; - gchar *caseless_haystack; + const char *ret = NULL; + char *p; + char *casefold; + char *caseless_haystack; int i; g_return_val_if_fail (haystack != NULL, NULL); @@ -4578,7 +4578,7 @@ utf8_strrcasestr (const gchar *haystack, if (needle_len == 0) { - ret = (gchar *)haystack; + ret = (char *)haystack; goto finally; } @@ -4616,14 +4616,14 @@ finally: /* normalizes caseless strings and returns true if @s2 matches the start of @s1 */ static gboolean -utf8_caselessnmatch (const gchar *s1, - const gchar *s2, +utf8_caselessnmatch (const char *s1, + const char *s2, gssize n1, gssize n2) { - gchar *casefold; - gchar *normalized_s1; - gchar *normalized_s2; + char *casefold; + char *normalized_s1; + char *normalized_s2; int len_s1; int len_s2; gboolean ret = FALSE; @@ -4655,7 +4655,7 @@ utf8_caselessnmatch (const gchar *s1, static gboolean lines_match (const GtkTextIter *start, - const gchar **lines, + const char **lines, gboolean visible_only, gboolean slice, gboolean case_insensitive, @@ -4663,8 +4663,8 @@ lines_match (const GtkTextIter *start, GtkTextIter *match_end) { GtkTextIter next; - gchar *line_text; - const gchar *found; + char *line_text; + const char *found; int offset; if (*lines == NULL || **lines == '\0') @@ -4762,7 +4762,7 @@ lines_match (const GtkTextIter *start, } /* strsplit() that retains the delimiter as part of the string. */ -static gchar ** +static char ** strbreakup (const char *string, const char *delimiter, int max_tokens, @@ -4770,8 +4770,8 @@ strbreakup (const char *string, gboolean case_insensitive) { GSList *string_list = NULL, *slist; - gchar **str_array, *s; - gchar *casefold, *new_string; + char **str_array, *s; + char *casefold, *new_string; guint i, n = 1; g_return_val_if_fail (string != NULL, NULL); @@ -4790,7 +4790,7 @@ strbreakup (const char *string, guint len; len = s - string + delimiter_len; - new_string = g_new (gchar, len + 1); + new_string = g_new (char, len + 1); strncpy (new_string, string, len); new_string[len] = 0; @@ -4825,7 +4825,7 @@ strbreakup (const char *string, string_list = g_slist_prepend (string_list, new_string); } - str_array = g_new (gchar*, n); + str_array = g_new (char *, n); i = n - 1; @@ -4864,13 +4864,13 @@ strbreakup (const char *string, **/ gboolean gtk_text_iter_forward_search (const GtkTextIter *iter, - const gchar *str, + const char *str, GtkTextSearchFlags flags, GtkTextIter *match_start, GtkTextIter *match_end, const GtkTextIter *limit) { - gchar **lines = NULL; + char **lines = NULL; GtkTextIter match; gboolean retval = FALSE; GtkTextIter search; @@ -4928,7 +4928,7 @@ gtk_text_iter_forward_search (const GtkTextIter *iter, gtk_text_iter_compare (&search, limit) >= 0) break; - if (lines_match (&search, (const gchar**)lines, + if (lines_match (&search, (const char **)lines, visible_only, slice, case_insensitive, &match, &end)) { if (limit == NULL || @@ -4949,19 +4949,19 @@ gtk_text_iter_forward_search (const GtkTextIter *iter, } while (gtk_text_iter_forward_line (&search)); - g_strfreev ((gchar**)lines); + g_strfreev ((char **)lines); return retval; } static gboolean -vectors_equal_ignoring_trailing (gchar **vec1, - gchar **vec2, +vectors_equal_ignoring_trailing (char **vec1, + char **vec2, gboolean case_insensitive) { /* Ignores trailing chars in vec2's last line */ - gchar **i1, **i2; + char **i1, **i2; i1 = vec1; i2 = vec2; @@ -5038,7 +5038,7 @@ typedef struct _LinesWindow LinesWindow; struct _LinesWindow { int n_lines; - gchar **lines; + char **lines; GtkTextIter first_line_start; GtkTextIter first_line_end; @@ -5062,7 +5062,7 @@ lines_window_init (LinesWindow *win, gtk_text_iter_get_line (start) + 1 < win->n_lines) { /* Already at the end, or not enough lines to match */ - win->lines = g_new0 (gchar*, 1); + win->lines = g_new0 (char *, 1); *win->lines = NULL; return; } @@ -5082,12 +5082,12 @@ lines_window_init (LinesWindow *win, win->first_line_start = line_start; win->first_line_end = line_end; - win->lines = g_new0 (gchar*, win->n_lines + 1); + win->lines = g_new0 (char *, win->n_lines + 1); i = win->n_lines - 1; while (i >= 0) { - gchar *line_text; + char *line_text; if (win->slice) { @@ -5119,7 +5119,7 @@ static gboolean lines_window_back (LinesWindow *win) { GtkTextIter new_start; - gchar *line_text; + char *line_text; new_start = win->first_line_start; @@ -5153,7 +5153,7 @@ lines_window_back (LinesWindow *win) } /* Move lines to make room for first line. */ - memmove (win->lines + 1, win->lines, win->n_lines * sizeof (gchar*)); + memmove (win->lines + 1, win->lines, win->n_lines * sizeof (char *)); *win->lines = line_text; @@ -5188,14 +5188,14 @@ lines_window_free (LinesWindow *win) **/ gboolean gtk_text_iter_backward_search (const GtkTextIter *iter, - const gchar *str, + const char *str, GtkTextSearchFlags flags, GtkTextIter *match_start, GtkTextIter *match_end, const GtkTextIter *limit) { - gchar **lines = NULL; - gchar **l; + char **lines = NULL; + char **l; int n_lines; LinesWindow win; gboolean retval = FALSE; @@ -5249,7 +5249,7 @@ gtk_text_iter_backward_search (const GtkTextIter *iter, do { - const gchar *first_line_match; + const char *first_line_match; if (limit && gtk_text_iter_compare (limit, &win.first_line_end) > 0) @@ -5649,7 +5649,7 @@ _gtk_text_btree_get_iter_at_last_toggle (GtkTextBTree *tree, gboolean _gtk_text_btree_get_iter_at_mark_name (GtkTextBTree *tree, GtkTextIter *iter, - const gchar *mark_name) + const char *mark_name) { GtkTextMark *mark; @@ -5812,7 +5812,7 @@ _gtk_text_iter_check (const GtkTextIter *iter) if (byte_segment->type == >k_text_char_type) { - const gchar *p; + const char *p; p = byte_segment->body.chars + seg_byte_offset; if (!gtk_text_byte_begins_utf8_char (p)) @@ -5843,7 +5843,7 @@ _gtk_text_iter_check (const GtkTextIter *iter) if (char_segment->type == >k_text_char_type) { - const gchar *p; + const char *p; p = g_utf8_offset_to_pointer (char_segment->body.chars, seg_char_offset); diff --git a/gtk/gtktextiter.h b/gtk/gtktextiter.h index 31bf5ea61b..d47f0cfba2 100644 --- a/gtk/gtktextiter.h +++ b/gtk/gtktextiter.h @@ -139,19 +139,19 @@ gunichar gtk_text_iter_get_char (const GtkTextIter *iter); * into the returned string map properly into buffer char offsets */ GDK_AVAILABLE_IN_ALL -gchar *gtk_text_iter_get_slice (const GtkTextIter *start, +char *gtk_text_iter_get_slice (const GtkTextIter *start, const GtkTextIter *end); /* includes only text, no 0xFFFC */ GDK_AVAILABLE_IN_ALL -gchar *gtk_text_iter_get_text (const GtkTextIter *start, +char *gtk_text_iter_get_text (const GtkTextIter *start, const GtkTextIter *end); /* exclude invisible chars */ GDK_AVAILABLE_IN_ALL -gchar *gtk_text_iter_get_visible_slice (const GtkTextIter *start, +char *gtk_text_iter_get_visible_slice (const GtkTextIter *start, const GtkTextIter *end); GDK_AVAILABLE_IN_ALL -gchar *gtk_text_iter_get_visible_text (const GtkTextIter *start, +char *gtk_text_iter_get_visible_text (const GtkTextIter *start, const GtkTextIter *end); GDK_AVAILABLE_IN_ALL @@ -370,7 +370,7 @@ gboolean gtk_text_iter_backward_find_char (GtkTextIter *iter, GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_forward_search (const GtkTextIter *iter, - const gchar *str, + const char *str, GtkTextSearchFlags flags, GtkTextIter *match_start, GtkTextIter *match_end, @@ -378,7 +378,7 @@ gboolean gtk_text_iter_forward_search (const GtkTextIter *iter, GDK_AVAILABLE_IN_ALL gboolean gtk_text_iter_backward_search (const GtkTextIter *iter, - const gchar *str, + const char *str, GtkTextSearchFlags flags, GtkTextIter *match_start, GtkTextIter *match_end, diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index 7ced6f31a7..78439277bf 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -133,7 +133,7 @@ static void gtk_text_layout_after_mark_set_handler (GtkTextBuffer *buffe gpointer data); static void gtk_text_layout_after_buffer_insert_text (GtkTextBuffer *textbuffer, GtkTextIter *iter, - gchar *str, + char *str, int len, gpointer data); static void gtk_text_layout_after_buffer_delete_range (GtkTextBuffer *textbuffer, @@ -146,7 +146,7 @@ static void gtk_text_layout_before_mark_set_handler (GtkTextBuffer *buffe gpointer data); static void gtk_text_layout_before_buffer_insert_text (GtkTextBuffer *textbuffer, GtkTextIter *iter, - gchar *str, + char *str, int len, gpointer data); static void gtk_text_layout_before_buffer_delete_range (GtkTextBuffer *textbuffer, @@ -587,7 +587,7 @@ gtk_text_layout_get_cursor_visible (GtkTextLayout *layout) */ void gtk_text_layout_set_preedit_string (GtkTextLayout *layout, - const gchar *preedit_string, + const char *preedit_string, PangoAttrList *preedit_attrs, int cursor_pos) { @@ -2318,7 +2318,7 @@ gtk_text_layout_create_display (GtkTextLayout *layout, GtkTextLineSegment *seg; GtkTextIter iter; GtkTextAttributes *style; - gchar *text; + char *text; int text_pixel_width; PangoAttrList *attrs; int text_allocated, layout_byte_offset, buffer_byte_offset; @@ -3849,7 +3849,7 @@ gtk_text_layout_after_mark_set_handler (GtkTextBuffer *buffer, static void gtk_text_layout_before_buffer_insert_text (GtkTextBuffer *textbuffer, GtkTextIter *iter, - gchar *str, + char *str, int len, gpointer data) { @@ -3863,7 +3863,7 @@ gtk_text_layout_before_buffer_insert_text (GtkTextBuffer *textbuffer, static void gtk_text_layout_after_buffer_insert_text (GtkTextBuffer *textbuffer, GtkTextIter *iter, - gchar *str, + char *str, int len, gpointer data) { diff --git a/gtk/gtktextlayoutprivate.h b/gtk/gtktextlayoutprivate.h index e9c56f01e6..2ffab44fdd 100644 --- a/gtk/gtktextlayoutprivate.h +++ b/gtk/gtktextlayoutprivate.h @@ -156,7 +156,7 @@ struct _GtkTextLayout /* The preedit string and attributes, if any */ - gchar *preedit_string; + char *preedit_string; PangoAttrList *preedit_attrs; int preedit_len; int preedit_cursor; @@ -249,7 +249,7 @@ void gtk_text_layout_default_style_changed (GtkTextLayout *lay void gtk_text_layout_set_screen_width (GtkTextLayout *layout, int width); void gtk_text_layout_set_preedit_string (GtkTextLayout *layout, - const gchar *preedit_string, + const char *preedit_string, PangoAttrList *preedit_attrs, int cursor_pos); diff --git a/gtk/gtktextmark.c b/gtk/gtktextmark.c index 12c6e2d846..ebfa6242bc 100644 --- a/gtk/gtktextmark.c +++ b/gtk/gtktextmark.c @@ -192,7 +192,7 @@ gtk_text_mark_set_property (GObject *object, const GValue *value, GParamSpec *pspec) { - gchar *tmp; + char *tmp; GtkTextMark *mark = GTK_TEXT_MARK (object); GtkTextLineSegment *seg = mark->segment; @@ -257,7 +257,7 @@ gtk_text_mark_get_property (GObject *object, * Returns: new #GtkTextMark **/ GtkTextMark * -gtk_text_mark_new (const gchar *name, +gtk_text_mark_new (const char *name, gboolean left_gravity) { return g_object_new (GTK_TYPE_TEXT_MARK, diff --git a/gtk/gtktextmark.h b/gtk/gtktextmark.h index c4d5fd4172..1f8a5b088b 100644 --- a/gtk/gtktextmark.h +++ b/gtk/gtktextmark.h @@ -87,7 +87,7 @@ GDK_AVAILABLE_IN_ALL GType gtk_text_mark_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkTextMark *gtk_text_mark_new (const gchar *name, +GtkTextMark *gtk_text_mark_new (const char *name, gboolean left_gravity); GDK_AVAILABLE_IN_ALL void gtk_text_mark_set_visible (GtkTextMark *mark, @@ -96,7 +96,7 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_text_mark_get_visible (GtkTextMark *mark); GDK_AVAILABLE_IN_ALL -const gchar * gtk_text_mark_get_name (GtkTextMark *mark); +const char * gtk_text_mark_get_name (GtkTextMark *mark); GDK_AVAILABLE_IN_ALL gboolean gtk_text_mark_get_deleted (GtkTextMark *mark); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtktextmarkprivate.h b/gtk/gtktextmarkprivate.h index 3c0ede5d18..ca09d46149 100644 --- a/gtk/gtktextmarkprivate.h +++ b/gtk/gtktextmarkprivate.h @@ -40,7 +40,7 @@ G_BEGIN_DECLS struct _GtkTextMarkBody { GtkTextMark *obj; - gchar *name; + char *name; GtkTextBTree *tree; GtkTextLine *line; guint visible : 1; diff --git a/gtk/gtktextprivate.h b/gtk/gtktextprivate.h index a328a420bb..0fde7d8fe4 100644 --- a/gtk/gtktextprivate.h +++ b/gtk/gtktextprivate.h @@ -75,7 +75,7 @@ struct _GtkTextClass int count, gboolean extend); void (* insert_at_cursor) (GtkText *self, - const gchar *str); + const char *str); void (* delete_from_cursor) (GtkText *self, GtkDeleteType type, int count); diff --git a/gtk/gtktextsegment.c b/gtk/gtktextsegment.c index 96e8ee2fbb..a202ab603c 100644 --- a/gtk/gtktextsegment.c +++ b/gtk/gtktextsegment.c @@ -187,7 +187,7 @@ char_segment_self_check (GtkTextLineSegment *seg) } GtkTextLineSegment* -_gtk_char_segment_new (const gchar *text, guint len) +_gtk_char_segment_new (const char *text, guint len) { GtkTextLineSegment *seg; @@ -209,10 +209,10 @@ _gtk_char_segment_new (const gchar *text, guint len) } GtkTextLineSegment* -_gtk_char_segment_new_from_two_strings (const gchar *text1, +_gtk_char_segment_new_from_two_strings (const char *text1, guint len1, guint chars1, - const gchar *text2, + const char *text2, guint len2, guint chars2) { diff --git a/gtk/gtktextsegment.h b/gtk/gtktextsegment.h index 119f4b8169..ce093d4301 100644 --- a/gtk/gtktextsegment.h +++ b/gtk/gtktextsegment.h @@ -152,12 +152,12 @@ struct _GtkTextLineSegment { GtkTextLineSegment *gtk_text_line_segment_split (const GtkTextIter *iter); -GtkTextLineSegment *_gtk_char_segment_new (const gchar *text, +GtkTextLineSegment *_gtk_char_segment_new (const char *text, guint len); -GtkTextLineSegment *_gtk_char_segment_new_from_two_strings (const gchar *text1, +GtkTextLineSegment *_gtk_char_segment_new_from_two_strings (const char *text1, guint len1, guint chars1, - const gchar *text2, + const char *text2, guint len2, guint chars2); GtkTextLineSegment *_gtk_toggle_segment_new (GtkTextTagInfo *info, diff --git a/gtk/gtktexttag.c b/gtk/gtktexttag.c index 03e22e31ab..9a970e6dc3 100644 --- a/gtk/gtktexttag.c +++ b/gtk/gtktexttag.c @@ -862,7 +862,7 @@ gtk_text_tag_init (GtkTextTag *text_tag) * Returns: a new #GtkTextTag **/ GtkTextTag* -gtk_text_tag_new (const gchar *name) +gtk_text_tag_new (const char *name) { GtkTextTag *tag; @@ -1291,7 +1291,7 @@ gtk_text_tag_set_property (GObject *object, case PROP_FONT: { PangoFontDescription *font_desc = NULL; - const gchar *name; + const char *name; name = g_value_get_string (value); @@ -1788,7 +1788,7 @@ gtk_text_tag_get_property (GObject *object, case PROP_FONT: { - gchar *str; + char *str; gtk_text_tag_ensure_font (tag); diff --git a/gtk/gtktexttag.h b/gtk/gtktexttag.h index 067aa14a99..942671a0aa 100644 --- a/gtk/gtktexttag.h +++ b/gtk/gtktexttag.h @@ -94,7 +94,7 @@ struct _GtkTextTagClass GDK_AVAILABLE_IN_ALL GType gtk_text_tag_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkTextTag *gtk_text_tag_new (const gchar *name); +GtkTextTag *gtk_text_tag_new (const char *name); GDK_AVAILABLE_IN_ALL int gtk_text_tag_get_priority (GtkTextTag *tag); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtktexttagtable.c b/gtk/gtktexttagtable.c index d3fd18d780..70980e3d8f 100644 --- a/gtk/gtktexttagtable.c +++ b/gtk/gtktexttagtable.c @@ -105,7 +105,7 @@ static void gtk_text_tag_table_buildable_interface_init (GtkBuildableIface *if static void gtk_text_tag_table_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type); + const char *type); static guint signals[LAST_SIGNAL] = { 0 }; @@ -260,7 +260,7 @@ static void gtk_text_tag_table_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (type && strcmp (type, "tag") == 0) gtk_text_tag_table_add (GTK_TEXT_TAG_TABLE (buildable), @@ -337,7 +337,7 @@ gtk_text_tag_table_add (GtkTextTagTable *table, **/ GtkTextTag* gtk_text_tag_table_lookup (GtkTextTagTable *table, - const gchar *name) + const char *name) { GtkTextTagTablePrivate *priv; diff --git a/gtk/gtktexttagtable.h b/gtk/gtktexttagtable.h index e4e142c147..3602f17cf0 100644 --- a/gtk/gtktexttagtable.h +++ b/gtk/gtktexttagtable.h @@ -57,7 +57,7 @@ void gtk_text_tag_table_remove (GtkTextTagTable *table, GtkTextTag *tag); GDK_AVAILABLE_IN_ALL GtkTextTag *gtk_text_tag_table_lookup (GtkTextTagTable *table, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL void gtk_text_tag_table_foreach (GtkTextTagTable *table, GtkTextTagTableForeach func, diff --git a/gtk/gtktexttypes.c b/gtk/gtktexttypes.c index 230ee7c0b7..f9646ac9b8 100644 --- a/gtk/gtktexttypes.c +++ b/gtk/gtktexttypes.c @@ -28,17 +28,17 @@ /* These are used to represent embedded non-character objects * if you return a string representation of a text buffer */ -const gchar _gtk_text_unknown_char_utf8[] = { '\xEF', '\xBF', '\xBC', '\0' }; +const char _gtk_text_unknown_char_utf8[] = { '\xEF', '\xBF', '\xBC', '\0' }; /* This is to be used only by libgtk test programs */ -const gchar * +const char * gtk_text_unknown_char_utf8_gtk_tests_only (void) { return _gtk_text_unknown_char_utf8; } gboolean -gtk_text_byte_begins_utf8_char (const gchar *byte) +gtk_text_byte_begins_utf8_char (const char *byte) { return ((*byte & 0xC0) != 0x80); } diff --git a/gtk/gtktexttypes.h b/gtk/gtktexttypes.h index 02520eab3a..fdb7f710f7 100644 --- a/gtk/gtktexttypes.h +++ b/gtk/gtktexttypes.h @@ -60,11 +60,11 @@ extern G_GNUC_INTERNAL const GtkTextLineSegmentClass gtk_text_child_type; #define GTK_TEXT_UNKNOWN_CHAR 0xFFFC #define GTK_TEXT_UNKNOWN_CHAR_UTF8_LEN 3 GDK_AVAILABLE_IN_ALL -const gchar *gtk_text_unknown_char_utf8_gtk_tests_only (void); -extern const gchar _gtk_text_unknown_char_utf8[GTK_TEXT_UNKNOWN_CHAR_UTF8_LEN+1]; +const char *gtk_text_unknown_char_utf8_gtk_tests_only (void); +extern const char _gtk_text_unknown_char_utf8[GTK_TEXT_UNKNOWN_CHAR_UTF8_LEN+1]; GDK_AVAILABLE_IN_ALL -gboolean gtk_text_byte_begins_utf8_char (const gchar *byte); +gboolean gtk_text_byte_begins_utf8_char (const char *byte); G_END_DECLS diff --git a/gtk/gtktextutil.c b/gtk/gtktextutil.c index 56e43d5a39..6110046084 100644 --- a/gtk/gtktextutil.c +++ b/gtk/gtktextutil.c @@ -44,7 +44,7 @@ #define ELLIPSIS_CHARACTER "\xe2\x80\xa6" static void -append_n_lines (GString *str, const gchar *text, GSList *lines, int n_lines) +append_n_lines (GString *str, const char *text, GSList *lines, int n_lines) { PangoLayoutLine *line; int i; @@ -60,7 +60,7 @@ append_n_lines (GString *str, const gchar *text, GSList *lines, int n_lines) static void limit_layout_lines (PangoLayout *layout) { - const gchar *text; + const char *text; GString *str; GSList *lines, *elem; int n_lines; @@ -93,7 +93,7 @@ limit_layout_lines (PangoLayout *layout) /** * gtk_text_util_create_drag_icon: * @widget: #GtkWidget to extract the pango context - * @text: a #gchar to render the icon + * @text: a #char to render the icon * @len: length of @text, or -1 for NUL-terminated text * * Creates a drag and drop icon from @text. @@ -102,7 +102,7 @@ limit_layout_lines (PangoLayout *layout) */ GdkPaintable * gtk_text_util_create_drag_icon (GtkWidget *widget, - gchar *text, + char *text, gssize len) { GtkCssStyle *style; @@ -301,7 +301,7 @@ _gtk_text_util_get_block_cursor_location (PangoLayout *layout, PangoLayoutLine *layout_line; gboolean rtl; int line_no; - const gchar *text; + const char *text; g_return_val_if_fail (layout != NULL, FALSE); g_return_val_if_fail (index >= 0, FALSE); @@ -365,7 +365,7 @@ _gtk_text_util_get_block_cursor_location (PangoLayout *layout, PangoRectangle line_rect; int i; int left, right; - const gchar *p; + const char *p; p = g_utf8_prev_char (text + index); diff --git a/gtk/gtktextutil.h b/gtk/gtktextutil.h index 7e95af3a3f..512532c4d0 100644 --- a/gtk/gtktextutil.h +++ b/gtk/gtktextutil.h @@ -34,7 +34,7 @@ G_BEGIN_DECLS */ GdkPaintable * gtk_text_util_create_drag_icon (GtkWidget *widget, - gchar *text, + char *text, gssize len); GdkPaintable * gtk_text_util_create_rich_drag_icon (GtkWidget *widget, GtkTextBuffer *buffer, diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 4e1e1955bd..645ffe5bef 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -161,7 +161,7 @@ struct _GtkTextViewPrivate guint blink_time; /* time in msec the cursor has blinked since last user event */ guint im_spot_idle; - gchar *im_module; + char *im_module; int dnd_x; int dnd_y; @@ -458,7 +458,7 @@ static gboolean gtk_text_view_scroll_hpages(GtkTextView *text_view, int count, gboolean extend_selection); static void gtk_text_view_insert_at_cursor (GtkTextView *text_view, - const gchar *str); + const char *str); static void gtk_text_view_delete_from_cursor (GtkTextView *text_view, GtkDeleteType type, int count); @@ -498,10 +498,10 @@ static void gtk_text_view_reset_blink_time (GtkTextView *text_v static void gtk_text_view_value_changed (GtkAdjustment *adjustment, GtkTextView *view); static void gtk_text_view_commit_handler (GtkIMContext *context, - const gchar *str, + const char *str, GtkTextView *text_view); static void gtk_text_view_commit_text (GtkTextView *text_view, - const gchar *text); + const char *text); static void gtk_text_view_preedit_changed_handler (GtkIMContext *context, GtkTextView *text_view); static gboolean gtk_text_view_retrieve_surrounding_handler (GtkIMContext *context, @@ -611,10 +611,10 @@ static void gtk_text_view_activate_misc_insert_emoji (GtkWidget *widget, GVariant *parameter); static void gtk_text_view_real_undo (GtkWidget *widget, - const gchar *action_name, + const char *action_name, GVariant *parameter); static void gtk_text_view_real_redo (GtkWidget *widget, - const gchar *action_name, + const char *action_name, GVariant *parameter); @@ -6619,7 +6619,7 @@ find_whitepace_region (const GtkTextIter *center, static void gtk_text_view_insert_at_cursor (GtkTextView *text_view, - const gchar *str) + const char *str) { if (!gtk_text_buffer_insert_interactive_at_cursor (get_buffer (text_view), str, -1, text_view->priv->editable)) @@ -6992,7 +6992,7 @@ gtk_text_view_unselect (GtkTextView *text_view) static void move_mark_to_pointer_and_scroll (GtkTextView *text_view, - const gchar *mark_name) + const char *mark_name) { GtkTextIter newplace; GtkTextBuffer *buffer; @@ -7897,7 +7897,7 @@ gtk_text_view_drag_drop (GtkDropTarget *dest, gtk_text_buffer_begin_user_action (buffer); if (!gtk_text_buffer_insert_interactive (buffer, - &drop_point, (gchar *) g_value_get_string (value), -1, + &drop_point, (char *) g_value_get_string (value), -1, text_view->priv->editable)) gtk_widget_error_bell (GTK_WIDGET (text_view)); @@ -8137,7 +8137,7 @@ gtk_text_view_value_changed (GtkAdjustment *adjustment, static void gtk_text_view_commit_handler (GtkIMContext *context, - const gchar *str, + const char *str, GtkTextView *text_view) { gtk_text_view_commit_text (text_view, str); @@ -8147,7 +8147,7 @@ gtk_text_view_commit_handler (GtkIMContext *context, static void gtk_text_view_commit_text (GtkTextView *text_view, - const gchar *str) + const char *str) { GtkTextViewPrivate *priv; gboolean had_selection; @@ -8204,7 +8204,7 @@ gtk_text_view_preedit_changed_handler (GtkIMContext *context, GtkTextView *text_view) { GtkTextViewPrivate *priv; - gchar *str; + char *str; PangoAttrList *attrs; int cursor_pos; GtkTextIter iter; @@ -8247,7 +8247,7 @@ gtk_text_view_retrieve_surrounding_handler (GtkIMContext *context, GtkTextIter start; GtkTextIter end; int pos; - gchar *text; + char *text; gtk_text_buffer_get_iter_at_mark (text_view->priv->buffer, &start, gtk_text_buffer_get_insert (text_view->priv->buffer)); @@ -9678,7 +9678,7 @@ gtk_text_view_get_extra_menu (GtkTextView *text_view) static void gtk_text_view_real_undo (GtkWidget *widget, - const gchar *action_name, + const char *action_name, GVariant *parameters) { GtkTextView *text_view = GTK_TEXT_VIEW (widget); @@ -9689,7 +9689,7 @@ gtk_text_view_real_undo (GtkWidget *widget, static void gtk_text_view_real_redo (GtkWidget *widget, - const gchar *action_name, + const char *action_name, GVariant *parameters) { GtkTextView *text_view = GTK_TEXT_VIEW (widget); diff --git a/gtk/gtktextview.h b/gtk/gtktextview.h index c1b282a4ae..d16f17f2b5 100644 --- a/gtk/gtktextview.h +++ b/gtk/gtktextview.h @@ -160,7 +160,7 @@ struct _GtkTextViewClass gboolean extend_selection); void (* set_anchor) (GtkTextView *text_view); void (* insert_at_cursor) (GtkTextView *text_view, - const gchar *str); + const char *str); void (* delete_from_cursor) (GtkTextView *text_view, GtkDeleteType type, int count); diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c index 34b2879e63..07b16454d6 100644 --- a/gtk/gtktogglebutton.c +++ b/gtk/gtktogglebutton.c @@ -218,7 +218,7 @@ gtk_toggle_button_new (void) * Returns: a new toggle button. */ GtkWidget* -gtk_toggle_button_new_with_label (const gchar *label) +gtk_toggle_button_new_with_label (const char *label) { return g_object_new (GTK_TYPE_TOGGLE_BUTTON, "label", label, NULL); } @@ -235,7 +235,7 @@ gtk_toggle_button_new_with_label (const gchar *label) * Returns: a new #GtkToggleButton */ GtkWidget* -gtk_toggle_button_new_with_mnemonic (const gchar *label) +gtk_toggle_button_new_with_mnemonic (const char *label) { return g_object_new (GTK_TYPE_TOGGLE_BUTTON, "label", label, diff --git a/gtk/gtktogglebutton.h b/gtk/gtktogglebutton.h index 3879efcd6f..8f5923d9b2 100644 --- a/gtk/gtktogglebutton.h +++ b/gtk/gtktogglebutton.h @@ -69,9 +69,9 @@ GType gtk_toggle_button_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkWidget* gtk_toggle_button_new (void); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_toggle_button_new_with_label (const gchar *label); +GtkWidget* gtk_toggle_button_new_with_label (const char *label); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_toggle_button_new_with_mnemonic (const gchar *label); +GtkWidget* gtk_toggle_button_new_with_mnemonic (const char *label); GDK_AVAILABLE_IN_ALL void gtk_toggle_button_set_active (GtkToggleButton *toggle_button, gboolean is_active); diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index d8196d4592..f7e851c6c7 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -222,7 +222,7 @@ gtk_tooltip_dispose (GObject *object) */ void gtk_tooltip_set_markup (GtkTooltip *tooltip, - const gchar *markup) + const char *markup) { g_return_if_fail (GTK_IS_TOOLTIP (tooltip)); @@ -239,7 +239,7 @@ gtk_tooltip_set_markup (GtkTooltip *tooltip, */ void gtk_tooltip_set_text (GtkTooltip *tooltip, - const gchar *text) + const char *text) { g_return_if_fail (GTK_IS_TOOLTIP (tooltip)); @@ -275,7 +275,7 @@ gtk_tooltip_set_icon (GtkTooltip *tooltip, */ void gtk_tooltip_set_icon_from_icon_name (GtkTooltip *tooltip, - const gchar *icon_name) + const char *icon_name) { g_return_if_fail (GTK_IS_TOOLTIP (tooltip)); diff --git a/gtk/gtktooltip.h b/gtk/gtktooltip.h index d5812d5428..f0587a9885 100644 --- a/gtk/gtktooltip.h +++ b/gtk/gtktooltip.h @@ -37,16 +37,16 @@ GType gtk_tooltip_get_type (void); GDK_AVAILABLE_IN_ALL void gtk_tooltip_set_markup (GtkTooltip *tooltip, - const gchar *markup); + const char *markup); GDK_AVAILABLE_IN_ALL void gtk_tooltip_set_text (GtkTooltip *tooltip, - const gchar *text); + const char *text); GDK_AVAILABLE_IN_ALL void gtk_tooltip_set_icon (GtkTooltip *tooltip, GdkPaintable *paintable); GDK_AVAILABLE_IN_ALL void gtk_tooltip_set_icon_from_icon_name (GtkTooltip *tooltip, - const gchar *icon_name); + const char *icon_name); GDK_AVAILABLE_IN_ALL void gtk_tooltip_set_icon_from_gicon (GtkTooltip *tooltip, GIcon *gicon); diff --git a/gtk/gtktreedatalist.c b/gtk/gtktreedatalist.c index 101698db55..4d42ba1859 100644 --- a/gtk/gtktreedatalist.c +++ b/gtk/gtktreedatalist.c @@ -47,7 +47,7 @@ _gtk_tree_data_list_free (GtkTreeDataList *list, { next = tmp->next; if (g_type_is_a (column_headers [i], G_TYPE_STRING)) - g_free ((gchar *) tmp->data.v_pointer); + g_free ((char *) tmp->data.v_pointer); else if (g_type_is_a (column_headers [i], G_TYPE_OBJECT) && tmp->data.v_pointer != NULL) g_object_unref (tmp->data.v_pointer); else if (g_type_is_a (column_headers [i], G_TYPE_BOXED) && tmp->data.v_pointer != NULL) @@ -129,7 +129,7 @@ _gtk_tree_data_list_node_to_value (GtkTreeDataList *list, g_value_set_boolean (value, (gboolean) list->data.v_int); break; case G_TYPE_CHAR: - g_value_set_schar (value, (gchar) list->data.v_char); + g_value_set_schar (value, (char) list->data.v_char); break; case G_TYPE_UCHAR: g_value_set_uchar (value, (guchar) list->data.v_uchar); @@ -165,7 +165,7 @@ _gtk_tree_data_list_node_to_value (GtkTreeDataList *list, g_value_set_double (value, (gdouble) list->data.v_double); break; case G_TYPE_STRING: - g_value_set_string (value, (gchar *) list->data.v_pointer); + g_value_set_string (value, (char *) list->data.v_pointer); break; case G_TYPE_POINTER: g_value_set_pointer (value, (gpointer) list->data.v_pointer); @@ -327,7 +327,7 @@ _gtk_tree_data_list_compare_func (GtkTreeModel *model, GValue a_value = G_VALUE_INIT; GValue b_value = G_VALUE_INIT; int retval; - const gchar *stra, *strb; + const char *stra, *strb; gtk_tree_model_get_value (model, a, column, &a_value); gtk_tree_model_get_value (model, b, column, &b_value); diff --git a/gtk/gtktreednd.c b/gtk/gtktreednd.c index d98c1af6eb..127bc36433 100644 --- a/gtk/gtktreednd.c +++ b/gtk/gtktreednd.c @@ -239,7 +239,7 @@ typedef struct _GtkTreeRowData GtkTreeRowData; struct _GtkTreeRowData { GtkTreeModel *model; - gchar path[4]; + char path[4]; }; static GtkTreeRowData * @@ -268,7 +268,7 @@ gtk_tree_create_row_drag_content (GtkTreeModel *tree_model, { GdkContentProvider *content; GtkTreeRowData *trd; - gchar *path_str; + char *path_str; int len; int struct_size; diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c index 347ef323d1..23495b44f3 100644 --- a/gtk/gtktreemodel.c +++ b/gtk/gtktreemodel.c @@ -180,7 +180,7 @@ * &iter); * while (valid) * { - * gchar *str_data; + * char *str_data; * int int_data; * * // Make sure you terminate calls to gtk_tree_model_get() with a “-1” value @@ -626,11 +626,11 @@ gtk_tree_path_new (void) * Returns: A newly-created #GtkTreePath-struct, or %NULL */ GtkTreePath * -gtk_tree_path_new_from_string (const gchar *path) +gtk_tree_path_new_from_string (const char *path) { GtkTreePath *retval; - const gchar *orig_path = path; - gchar *ptr; + const char *orig_path = path; + char *ptr; int i; g_return_val_if_fail (path != NULL, NULL); @@ -736,10 +736,10 @@ gtk_tree_path_new_from_indicesv (int *indices, * Returns: A newly-allocated string. * Must be freed with g_free(). */ -gchar * +char * gtk_tree_path_to_string (GtkTreePath *path) { - gchar *retval, *ptr, *end; + char *retval, *ptr, *end; int i, n; g_return_val_if_fail (path != NULL, NULL); @@ -748,7 +748,7 @@ gtk_tree_path_to_string (GtkTreePath *path) return NULL; n = path->depth * 12; - ptr = retval = g_new0 (gchar, n); + ptr = retval = g_new0 (char, n); end = ptr + n; g_snprintf (retval, end - ptr, "%d", path->indices[0]); while (*ptr != '\000') @@ -1286,7 +1286,7 @@ gtk_tree_model_get_iter (GtkTreeModel *tree_model, gboolean gtk_tree_model_get_iter_from_string (GtkTreeModel *tree_model, GtkTreeIter *iter, - const gchar *path_string) + const char *path_string) { gboolean retval; GtkTreePath *path; @@ -1319,12 +1319,12 @@ gtk_tree_model_get_iter_from_string (GtkTreeModel *tree_model, * Returns: a newly-allocated string. * Must be freed with g_free(). */ -gchar * +char * gtk_tree_model_get_string_from_iter (GtkTreeModel *tree_model, GtkTreeIter *iter) { GtkTreePath *path; - gchar *ret; + char *ret; g_return_val_if_fail (GTK_IS_TREE_MODEL (tree_model), NULL); g_return_val_if_fail (iter != NULL, NULL); @@ -1785,7 +1785,7 @@ gtk_tree_model_get_valist (GtkTreeModel *tree_model, while (column != -1) { GValue value = G_VALUE_INIT; - gchar *error = NULL; + char *error = NULL; if (column >= gtk_tree_model_get_n_columns (tree_model)) { diff --git a/gtk/gtktreemodel.h b/gtk/gtktreemodel.h index d9e1066cd6..18c78dfb8a 100644 --- a/gtk/gtktreemodel.h +++ b/gtk/gtktreemodel.h @@ -195,7 +195,7 @@ struct _GtkTreeModelIface GDK_AVAILABLE_IN_ALL GtkTreePath *gtk_tree_path_new (void); GDK_AVAILABLE_IN_ALL -GtkTreePath *gtk_tree_path_new_from_string (const gchar *path); +GtkTreePath *gtk_tree_path_new_from_string (const char *path); GDK_AVAILABLE_IN_ALL GtkTreePath *gtk_tree_path_new_from_indices (int first_index, ...); @@ -203,7 +203,7 @@ GDK_AVAILABLE_IN_ALL GtkTreePath *gtk_tree_path_new_from_indicesv (int *indices, gsize length); GDK_AVAILABLE_IN_ALL -gchar *gtk_tree_path_to_string (GtkTreePath *path); +char *gtk_tree_path_to_string (GtkTreePath *path); GDK_AVAILABLE_IN_ALL GtkTreePath *gtk_tree_path_new_first (void); GDK_AVAILABLE_IN_ALL @@ -314,9 +314,9 @@ gboolean gtk_tree_model_get_iter (GtkTreeModel *tree_model, GDK_AVAILABLE_IN_ALL gboolean gtk_tree_model_get_iter_from_string (GtkTreeModel *tree_model, GtkTreeIter *iter, - const gchar *path_string); + const char *path_string); GDK_AVAILABLE_IN_ALL -gchar * gtk_tree_model_get_string_from_iter (GtkTreeModel *tree_model, +char * gtk_tree_model_get_string_from_iter (GtkTreeModel *tree_model, GtkTreeIter *iter); GDK_AVAILABLE_IN_ALL gboolean gtk_tree_model_get_iter_first (GtkTreeModel *tree_model, diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c index 12b412d016..09c574c3b9 100644 --- a/gtk/gtktreemodelfilter.c +++ b/gtk/gtktreemodelfilter.c @@ -3820,7 +3820,7 @@ gtk_tree_model_filter_get_model (GtkTreeModelFilter *filter) * gpointer data) * { * // Visible if row is non-empty and first column is “HI” - * gchar *str; + * char *str; * gboolean visible = FALSE; * * gtk_tree_model_get (model, iter, 0, &str, -1); diff --git a/gtk/gtktreemodelsort.c b/gtk/gtktreemodelsort.c index 0b6d83aef3..9d853f458d 100644 --- a/gtk/gtktreemodelsort.c +++ b/gtk/gtktreemodelsort.c @@ -2542,7 +2542,7 @@ gtk_tree_model_sort_build_level (GtkTreeModelSort *tree_model_sort, if (parent_level) { GtkTreePath *level; - gchar *str; + char *str; level = gtk_tree_model_sort_elt_get_path (parent_level, parent_elt); diff --git a/gtk/gtktreepopover.c b/gtk/gtktreepopover.c index c67357dd64..802c54f72c 100644 --- a/gtk/gtktreepopover.c +++ b/gtk/gtktreepopover.c @@ -572,7 +572,7 @@ item_activated_cb (GtkGesture *gesture, GtkWidget *item; GtkCellView *view; GtkTreePath *path; - gchar *path_str; + char *path_str; gboolean is_header = FALSE; gboolean has_submenu = FALSE; diff --git a/gtk/gtktreerbtree.c b/gtk/gtktreerbtree.c index 51fea70707..36d7534133 100644 --- a/gtk/gtktreerbtree.c +++ b/gtk/gtktreerbtree.c @@ -36,7 +36,7 @@ static inline void fixup_validation (GtkTreeRBTree *tree, static inline void fixup_total_count (GtkTreeRBTree *tree, GtkTreeRBNode *node); #ifdef G_ENABLE_DEBUG -static void gtk_tree_rbtree_test (const gchar *where, +static void gtk_tree_rbtree_test (const char *where, GtkTreeRBTree *tree); static void gtk_tree_rbtree_debug_spew (GtkTreeRBTree *tree, GString *s); @@ -1670,7 +1670,7 @@ gtk_tree_rbtree_test_structure (GtkTreeRBTree *tree) } static void -gtk_tree_rbtree_test (const gchar *where, +gtk_tree_rbtree_test (const char *where, GtkTreeRBTree *tree) { GtkTreeRBTree *tmp_tree; diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c index 1c90e518f3..347fd68346 100644 --- a/gtk/gtktreestore.c +++ b/gtk/gtktreestore.c @@ -175,13 +175,13 @@ static gboolean gtk_tree_store_has_default_sort_func (GtkTreeSortable * static gboolean gtk_tree_store_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); static void gtk_tree_store_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data); static void gtk_tree_store_move (GtkTreeStore *tree_store, @@ -1039,7 +1039,7 @@ gtk_tree_store_set_valist_internal (GtkTreeStore *tree_store, while (column != -1) { GValue value = G_VALUE_INIT; - gchar *error = NULL; + char *error = NULL; if (column < 0 || column >= priv->n_columns) { @@ -3317,9 +3317,9 @@ typedef struct { static void tree_model_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -3338,7 +3338,7 @@ tree_model_start_element (GtkBuildableParseContext *context, } else if (strcmp (element_name, "column") == 0) { - const gchar *type; + const char *type; if (!_gtk_builder_check_parent (data->builder, context, "columns", error)) return; @@ -3363,7 +3363,7 @@ tree_model_start_element (GtkBuildableParseContext *context, static void tree_model_end_element (GtkBuildableParseContext *context, - const gchar *element_name, + const char *element_name, gpointer user_data, GError **error) { @@ -3388,7 +3388,7 @@ tree_model_end_element (GtkBuildableParseContext *context, if (type == G_TYPE_INVALID) { g_warning ("Unknown type %s specified in treemodel %s", - (const gchar*)l->data, + (const char *)l->data, gtk_buildable_get_name (GTK_BUILDABLE (data->object))); continue; } @@ -3414,7 +3414,7 @@ static gboolean gtk_tree_store_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *parser_data) { @@ -3443,7 +3443,7 @@ static void gtk_tree_store_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data) { GSListSubParserData *data; diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 7906fc9063..2479829305 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -831,13 +831,13 @@ static gboolean gtk_tree_view_search_move (GtkWidget *windo gboolean up); static gboolean gtk_tree_view_search_equal_func (GtkTreeModel *model, int column, - const gchar *key, + const char *key, GtkTreeIter *iter, gpointer search_data); static gboolean gtk_tree_view_search_iter (GtkTreeModel *model, GtkTreeSelection *selection, GtkTreeIter *iter, - const gchar *text, + const char *text, int *count, int n); static void gtk_tree_view_search_init (GtkWidget *entry, @@ -863,10 +863,10 @@ static GtkTreeViewColumn *gtk_tree_view_get_drop_column (GtkTreeView *tree static void gtk_tree_view_buildable_add_child (GtkBuildable *tree_view, GtkBuilder *builder, GObject *child, - const gchar *type); + const char *type); static GObject *gtk_tree_view_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *childname); + const char *childname); static void gtk_tree_view_buildable_init (GtkBuildableIface *iface); /* GtkScrollable */ @@ -1975,7 +1975,7 @@ static void gtk_tree_view_buildable_add_child (GtkBuildable *tree_view, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_TREE_VIEW_COLUMN (child)) gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), GTK_TREE_VIEW_COLUMN (child)); @@ -1986,7 +1986,7 @@ gtk_tree_view_buildable_add_child (GtkBuildable *tree_view, static GObject * gtk_tree_view_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *childname) + const char *childname) { GtkTreeView *tree_view = GTK_TREE_VIEW (buildable); GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -6761,7 +6761,7 @@ remove_scroll_timeout (GtkTreeView *tree_view) static gboolean check_model_dnd (GtkTreeModel *model, GType required_iface, - const gchar *signal) + const char *signal) { if (model == NULL || !G_TYPE_CHECK_INSTANCE_TYPE ((model), required_iface)) { @@ -10863,13 +10863,13 @@ gtk_tree_view_insert_column (GtkTreeView *tree_view, int gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view, int position, - const gchar *title, + const char *title, GtkCellRenderer *cell, ...) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreeViewColumn *column; - gchar *attribute; + char *attribute; va_list args; int column_id; @@ -10884,13 +10884,13 @@ gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view, va_start (args, cell); - attribute = va_arg (args, gchar *); + attribute = va_arg (args, char *); while (attribute != NULL) { column_id = va_arg (args, int); gtk_tree_view_column_add_attribute (column, cell, attribute, column_id); - attribute = va_arg (args, gchar *); + attribute = va_arg (args, char *); } va_end (args); @@ -10920,7 +10920,7 @@ gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view, int gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view, int position, - const gchar *title, + const char *title, GtkCellRenderer *cell, GtkTreeCellDataFunc func, gpointer data, @@ -13840,7 +13840,7 @@ gtk_tree_view_search_move (GtkWidget *popover, gboolean ret; int len; int count = 0; - const gchar *text; + const char *text; GtkTreeIter iter; GtkTreeModel *model; GtkTreeSelection *selection; @@ -13889,16 +13889,16 @@ gtk_tree_view_search_move (GtkWidget *popover, static gboolean gtk_tree_view_search_equal_func (GtkTreeModel *model, int column, - const gchar *key, + const char *key, GtkTreeIter *iter, gpointer search_data) { gboolean retval = TRUE; - const gchar *str; - gchar *normalized_string; - gchar *normalized_key; - gchar *case_normalized_string = NULL; - gchar *case_normalized_key = NULL; + const char *str; + char *normalized_string; + char *normalized_key; + char *case_normalized_string = NULL; + char *case_normalized_key = NULL; GValue value = G_VALUE_INIT; GValue transformed = G_VALUE_INIT; @@ -13946,7 +13946,7 @@ static gboolean gtk_tree_view_search_iter (GtkTreeModel *model, GtkTreeSelection *selection, GtkTreeIter *iter, - const gchar *text, + const char *text, int *count, int n) { @@ -14055,7 +14055,7 @@ gtk_tree_view_search_init (GtkWidget *entry, GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); int ret; int count = 0; - const gchar *text; + const char *text; GtkTreeIter iter; GtkTreeModel *model; GtkTreeSelection *selection; diff --git a/gtk/gtktreeview.h b/gtk/gtktreeview.h index cd378de86a..e5ed5c72db 100644 --- a/gtk/gtktreeview.h +++ b/gtk/gtktreeview.h @@ -116,7 +116,7 @@ typedef void (* GtkTreeViewMappingFunc) (GtkTreeView *tree_vi */ typedef gboolean (*GtkTreeViewSearchEqualFunc) (GtkTreeModel *model, int column, - const gchar *key, + const char *key, GtkTreeIter *iter, gpointer search_data); @@ -236,13 +236,13 @@ int gtk_tree_view_insert_column (GtkTreeView GDK_AVAILABLE_IN_ALL int gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view, int position, - const gchar *title, + const char *title, GtkCellRenderer *cell, ...) G_GNUC_NULL_TERMINATED; GDK_AVAILABLE_IN_ALL int gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view, int position, - const gchar *title, + const char *title, GtkCellRenderer *cell, GtkTreeCellDataFunc func, gpointer data, diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index f9dc51f799..2fbbe738c2 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -117,7 +117,7 @@ static void gtk_tree_view_column_add_editable_callback (GtkCellArea GtkCellRenderer *renderer, GtkCellEditable *edit_widget, GdkRectangle *cell_area, - const gchar *path_string, + const char *path_string, gpointer user_data); static void gtk_tree_view_column_remove_editable_callback (GtkCellArea *area, GtkCellRenderer *renderer, @@ -177,7 +177,7 @@ struct _GtkTreeViewColumnPrivate int drag_x; int drag_y; - gchar *title; + char *title; /* Sorting */ gulong sort_clicked_signal; @@ -432,7 +432,7 @@ static void gtk_tree_view_column_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data) { /* Just ignore the boolean return from here */ @@ -909,7 +909,7 @@ gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column) GtkWidget *frame; GtkWidget *arrow; GtkWidget *current_child; - const gchar *icon_name = "missing-image"; + const char *icon_name = "missing-image"; GtkTreeModel *model; if (priv->tree_view) @@ -1251,7 +1251,7 @@ gtk_tree_view_column_add_editable_callback (GtkCellArea *area, GtkCellRenderer *renderer, GtkCellEditable *edit_widget, GdkRectangle *cell_area, - const gchar *path_string, + const char *path_string, gpointer user_data) { GtkTreeViewColumn *column = user_data; @@ -1552,7 +1552,7 @@ gtk_tree_view_column_new_with_area (GtkCellArea *area) * Returns: A newly created #GtkTreeViewColumn. **/ GtkTreeViewColumn * -gtk_tree_view_column_new_with_attributes (const gchar *title, +gtk_tree_view_column_new_with_attributes (const char *title, GtkCellRenderer *cell, ...) { @@ -1636,7 +1636,7 @@ gtk_tree_view_column_clear (GtkTreeViewColumn *tree_column) void gtk_tree_view_column_add_attribute (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, - const gchar *attribute, + const char *attribute, int column) { gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (tree_column), @@ -1649,10 +1649,10 @@ gtk_tree_view_column_set_attributesv (GtkTreeViewColumn *tree_column, va_list args) { GtkTreeViewColumnPrivate *priv = tree_column->priv; - gchar *attribute; + char *attribute; int column; - attribute = va_arg (args, gchar *); + attribute = va_arg (args, char *); gtk_cell_layout_clear_attributes (GTK_CELL_LAYOUT (priv->cell_area), cell_renderer); @@ -1662,7 +1662,7 @@ gtk_tree_view_column_set_attributesv (GtkTreeViewColumn *tree_column, column = va_arg (args, int); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (priv->cell_area), cell_renderer, attribute, column); - attribute = va_arg (args, gchar *); + attribute = va_arg (args, char *); } } @@ -2267,10 +2267,10 @@ gtk_tree_view_column_clicked (GtkTreeViewColumn *tree_column) **/ void gtk_tree_view_column_set_title (GtkTreeViewColumn *tree_column, - const gchar *title) + const char *title) { GtkTreeViewColumnPrivate *priv; - gchar *new_title; + char *new_title; g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column)); @@ -2293,7 +2293,7 @@ gtk_tree_view_column_set_title (GtkTreeViewColumn *tree_column, * Returns: the title of the column. This string should not be * modified or freed. **/ -const gchar * +const char * gtk_tree_view_column_get_title (GtkTreeViewColumn *tree_column) { g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), NULL); diff --git a/gtk/gtktreeviewcolumn.h b/gtk/gtktreeviewcolumn.h index 67b025aedb..24610307a0 100644 --- a/gtk/gtktreeviewcolumn.h +++ b/gtk/gtktreeviewcolumn.h @@ -83,7 +83,7 @@ GtkTreeViewColumn *gtk_tree_view_column_new (void); GDK_AVAILABLE_IN_ALL GtkTreeViewColumn *gtk_tree_view_column_new_with_area (GtkCellArea *area); GDK_AVAILABLE_IN_ALL -GtkTreeViewColumn *gtk_tree_view_column_new_with_attributes (const gchar *title, +GtkTreeViewColumn *gtk_tree_view_column_new_with_attributes (const char *title, GtkCellRenderer *cell, ...) G_GNUC_NULL_TERMINATED; GDK_AVAILABLE_IN_ALL @@ -99,7 +99,7 @@ void gtk_tree_view_column_clear (GtkTreeViewCol GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_add_attribute (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, - const gchar *attribute, + const char *attribute, int column); GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_set_attributes (GtkTreeViewColumn *tree_column, @@ -162,9 +162,9 @@ void gtk_tree_view_column_clicked (GtkTreeViewCol */ GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_set_title (GtkTreeViewColumn *tree_column, - const gchar *title); + const char *title); GDK_AVAILABLE_IN_ALL -const gchar * gtk_tree_view_column_get_title (GtkTreeViewColumn *tree_column); +const char * gtk_tree_view_column_get_title (GtkTreeViewColumn *tree_column); GDK_AVAILABLE_IN_ALL void gtk_tree_view_column_set_expand (GtkTreeViewColumn *tree_column, gboolean expand); diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 7e4aefc573..890a24f373 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -139,7 +139,7 @@ static void gtk_viewport_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) gtk_viewport_set_child (GTK_VIEWPORT (buildable), GTK_WIDGET (child)); diff --git a/gtk/gtkvolumebutton.c b/gtk/gtkvolumebutton.c index badbba2f55..431a1d2820 100644 --- a/gtk/gtkvolumebutton.c +++ b/gtk/gtkvolumebutton.c @@ -54,7 +54,7 @@ struct _GtkVolumeButtonClass #define EPSILON (1e-10) -static const gchar * const icons[] = +static const char * const icons[] = { "audio-volume-muted", "audio-volume-high", @@ -63,7 +63,7 @@ static const gchar * const icons[] = NULL }; -static const gchar * const icons_symbolic[] = +static const char * const icons_symbolic[] = { "audio-volume-muted-symbolic", "audio-volume-high-symbolic", @@ -93,7 +93,7 @@ G_DEFINE_TYPE (GtkVolumeButton, gtk_volume_button, GTK_TYPE_SCALE_BUTTON) static gboolean get_symbolic (GtkScaleButton *button) { - gchar **icon_list; + char **icon_list; gboolean ret; g_object_get (button, "icons", &icon_list, NULL); diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index df02699f07..70158b101b 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -473,13 +473,13 @@ GTK_STATE_FLAG_ACTIVE) typedef struct { - gchar *name; /* Name of the template automatic child */ + char *name; /* Name of the template automatic child */ gboolean internal_child; /* Whether the automatic widget should be exported as an */ gssize offset; /* Instance private data offset where to set the automatic child (or 0) */ } AutomaticChildClass; typedef struct { - gchar *callback_name; + char *callback_name; GCallback callback_symbol; } CallbackSymbol; @@ -629,26 +629,26 @@ static AtkObject* gtk_widget_ref_accessible (AtkImplementor *implementor); static void gtk_widget_buildable_interface_init (GtkBuildableIface *iface); static void gtk_widget_buildable_set_name (GtkBuildable *buildable, - const gchar *name); -static const gchar * gtk_widget_buildable_get_name (GtkBuildable *buildable); + const char *name); +static const char * gtk_widget_buildable_get_name (GtkBuildable *buildable); static GObject * gtk_widget_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *childname); + const char *childname); static gboolean gtk_widget_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *data); static void gtk_widget_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data); static void gtk_widget_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data); static void gtk_widget_buildable_parser_finished (GtkBuildable *buildable, GtkBuilder *builder); @@ -2334,7 +2334,7 @@ gtk_widget_init (GTypeInstance *instance, gpointer g_class) **/ GtkWidget* gtk_widget_new (GType type, - const gchar *first_property_name, + const char *first_property_name, ...) { GtkWidget *widget; @@ -4122,7 +4122,7 @@ gtk_widget_class_add_binding (GtkWidgetClass *widget_class, guint keyval, GdkModifierType mods, GtkShortcutFunc func, - const gchar *format_string, + const char *format_string, ...) { GtkShortcut *shortcut; @@ -4168,8 +4168,8 @@ void gtk_widget_class_add_binding_signal (GtkWidgetClass *widget_class, guint keyval, GdkModifierType mods, - const gchar *signal, - const gchar *format_string, + const char *signal, + const char *format_string, ...) { GtkShortcut *shortcut; @@ -4217,8 +4217,8 @@ void gtk_widget_class_add_binding_action (GtkWidgetClass *widget_class, guint keyval, GdkModifierType mods, - const gchar *action_name, - const gchar *format_string, + const char *action_name, + const char *format_string, ...) { GtkShortcut *shortcut; @@ -5243,7 +5243,7 @@ _gtk_widget_set_has_grab (GtkWidget *widget, */ void gtk_widget_set_name (GtkWidget *widget, - const gchar *name) + const char *name) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); @@ -5267,7 +5267,7 @@ gtk_widget_set_name (GtkWidget *widget, * Returns: name of the widget. This string is owned by GTK+ and * should not be modified or freed **/ -const gchar* +const char * gtk_widget_get_name (GtkWidget *widget) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); @@ -6327,7 +6327,7 @@ gtk_widget_create_pango_context (GtkWidget *widget) **/ PangoLayout * gtk_widget_create_pango_layout (GtkWidget *widget, - const gchar *text) + const char *text) { PangoLayout *layout; PangoContext *context; @@ -8287,7 +8287,7 @@ static void gtk_widget_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (type != NULL) { @@ -8326,13 +8326,13 @@ gtk_widget_buildable_interface_init (GtkBuildableIface *iface) static void gtk_widget_buildable_set_name (GtkBuildable *buildable, - const gchar *name) + const char *name) { g_object_set_qdata_full (G_OBJECT (buildable), quark_builder_set_name, g_strdup (name), g_free); } -static const gchar * +static const char * gtk_widget_buildable_get_name (GtkBuildable *buildable) { return g_object_get_qdata (G_OBJECT (buildable), quark_builder_set_name); @@ -8341,7 +8341,7 @@ gtk_widget_buildable_get_name (GtkBuildable *buildable) static GObject * gtk_widget_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *childname) + const char *childname) { GtkWidgetClass *class; GSList *l; @@ -8383,15 +8383,15 @@ gtk_widget_buildable_get_internal_child (GtkBuildable *buildable, typedef struct { - gchar *action_name; + char *action_name; GString *description; - gchar *context; + char *context; gboolean translatable; } AtkActionData; typedef struct { - gchar *target; + char *target; AtkRelationType type; int line; int col; @@ -8461,9 +8461,9 @@ typedef struct static void accessibility_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -8471,8 +8471,8 @@ accessibility_start_element (GtkBuildableParseContext *context, if (strcmp (element_name, "relation") == 0) { - gchar *target = NULL; - gchar *type = NULL; + char *target = NULL; + char *type = NULL; AtkRelationData *relation; AtkRelationType relation_type; @@ -8507,9 +8507,9 @@ accessibility_start_element (GtkBuildableParseContext *context, } else if (strcmp (element_name, "action") == 0) { - const gchar *action_name; - const gchar *description = NULL; - const gchar *msg_context = NULL; + const char *action_name; + const char *description = NULL; + const char *msg_context = NULL; gboolean translatable = FALSE; AtkActionData *action; @@ -8538,7 +8538,7 @@ accessibility_start_element (GtkBuildableParseContext *context, } else if (strcmp (element_name, "role") == 0) { - const gchar *type; + const char *type; AtkRole role; if (!_gtk_builder_check_parent (data->builder, context, "accessibility", error)) @@ -8595,7 +8595,7 @@ accessibility_start_element (GtkBuildableParseContext *context, static void accessibility_text (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) @@ -8625,9 +8625,9 @@ typedef struct static void style_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -8635,7 +8635,7 @@ style_start_element (GtkBuildableParseContext *context, if (strcmp (element_name, "class") == 0) { - const gchar *name; + const char *name; if (!_gtk_builder_check_parent (data->builder, context, "style", error)) return; @@ -8708,9 +8708,9 @@ layout_property_info_free (gpointer data) static void layout_start_element (GtkBuildableParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, + const char *element_name, + const char **names, + const char **values, gpointer user_data, GError **error) { @@ -8764,7 +8764,7 @@ layout_start_element (GtkBuildableParseContext *context, static void layout_text (GtkBuildableParseContext *context, - const gchar *text, + const char *text, gsize text_len, gpointer user_data, GError **error) @@ -8816,7 +8816,7 @@ static gboolean gtk_widget_buildable_custom_tag_start (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, GtkBuildableParser *parser, gpointer *parser_data) { @@ -8867,7 +8867,7 @@ static void gtk_widget_buildable_custom_tag_end (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer data) { } @@ -8942,7 +8942,7 @@ static void gtk_widget_buildable_custom_finished (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *tagname, + const char *tagname, gpointer user_data) { if (strcmp (tagname, "accessibility") == 0) @@ -8976,7 +8976,7 @@ gtk_widget_buildable_custom_finished (GtkBuildable *buildable, if (i < n_actions) { - const gchar *description; + const char *description; if (action_data->translatable && action_data->description->len) description = _gtk_builder_parser_translate (gtk_builder_get_translation_domain (builder), @@ -10580,7 +10580,7 @@ _gtk_widget_get_action_muxer (GtkWidget *widget, */ void gtk_widget_insert_action_group (GtkWidget *widget, - const gchar *name, + const char *name, GActionGroup *group) { GtkActionMuxer *muxer; @@ -10600,7 +10600,7 @@ gtk_widget_insert_action_group (GtkWidget *widget, * GtkBuilder automated templates * ****************************************************************/ static AutomaticChildClass * -template_child_class_new (const gchar *name, +template_child_class_new (const char *name, gboolean internal_child, gssize offset) { @@ -10766,7 +10766,7 @@ gtk_widget_init_template (GtkWidget *widget) * there is no infinite recursion. */ if (!gtk_builder_extend_with_template (builder, G_OBJECT (widget), class_type, - (const gchar *)g_bytes_get_data (template->data, NULL), + (const char *)g_bytes_get_data (template->data, NULL), g_bytes_get_size (template->data), &error)) { @@ -10862,7 +10862,7 @@ gtk_widget_class_set_template (GtkWidgetClass *widget_class, */ void gtk_widget_class_set_template_from_resource (GtkWidgetClass *widget_class, - const gchar *resource_name) + const char *resource_name) { GError *error = NULL; GBytes *bytes = NULL; @@ -10907,7 +10907,7 @@ gtk_widget_class_set_template_from_resource (GtkWidgetClass *widget_class, */ void gtk_widget_class_bind_template_callback_full (GtkWidgetClass *widget_class, - const gchar *callback_name, + const char *callback_name, GCallback callback_symbol) { GtkWidgetTemplate *template; @@ -10990,7 +10990,7 @@ gtk_widget_class_set_template_scope (GtkWidgetClass *widget_class, */ void gtk_widget_class_bind_template_child_full (GtkWidgetClass *widget_class, - const gchar *name, + const char *name, gboolean internal_child, gssize struct_offset) { @@ -11028,7 +11028,7 @@ gtk_widget_class_bind_template_child_full (GtkWidgetClass *widget_class, GObject * gtk_widget_get_template_child (GtkWidget *widget, GType widget_type, - const gchar *name) + const char *name) { GHashTable *auto_child_hash; GObject *ret = NULL; diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index afebe81037..ead4b6b429 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -290,7 +290,7 @@ GDK_AVAILABLE_IN_ALL GType gtk_widget_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GtkWidget* gtk_widget_new (GType type, - const gchar *first_property_name, + const char *first_property_name, ...); GDK_AVAILABLE_IN_ALL void gtk_widget_unparent (GtkWidget *widget); @@ -360,23 +360,23 @@ void gtk_widget_class_add_binding (GtkWidgetClass *widget_class, guint keyval, GdkModifierType mods, GtkShortcutFunc callback, - const gchar *format_string, + const char *format_string, ...); GDK_AVAILABLE_IN_ALL void gtk_widget_class_add_binding_signal (GtkWidgetClass *widget_class, guint keyval, GdkModifierType mods, - const gchar *signal, - const gchar *format_string, + const char *signal, + const char *format_string, ...); GDK_AVAILABLE_IN_ALL void gtk_widget_class_add_binding_action (GtkWidgetClass *widget_class, guint keyval, GdkModifierType mods, - const gchar *action_name, - const gchar *format_string, + const char *action_name, + const char *format_string, ...); GDK_AVAILABLE_IN_ALL void gtk_widget_class_add_shortcut (GtkWidgetClass *widget_class, @@ -430,9 +430,9 @@ gboolean gtk_widget_get_receives_default (GtkWidget *widget); GDK_AVAILABLE_IN_ALL void gtk_widget_set_name (GtkWidget *widget, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL -const gchar * gtk_widget_get_name (GtkWidget *widget); +const char * gtk_widget_get_name (GtkWidget *widget); GDK_AVAILABLE_IN_ALL @@ -670,7 +670,7 @@ GDK_AVAILABLE_IN_ALL const cairo_font_options_t *gtk_widget_get_font_options (GtkWidget *widget); GDK_AVAILABLE_IN_ALL PangoLayout *gtk_widget_create_pango_layout (GtkWidget *widget, - const gchar *text); + const char *text); /* Functions for setting directionality for widgets */ @@ -859,29 +859,29 @@ void gtk_widget_init_template (GtkWidget * GDK_AVAILABLE_IN_ALL GObject *gtk_widget_get_template_child (GtkWidget *widget, GType widget_type, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL void gtk_widget_class_set_template (GtkWidgetClass *widget_class, GBytes *template_bytes); GDK_AVAILABLE_IN_ALL void gtk_widget_class_set_template_from_resource (GtkWidgetClass *widget_class, - const gchar *resource_name); + const char *resource_name); GDK_AVAILABLE_IN_ALL void gtk_widget_class_bind_template_callback_full (GtkWidgetClass *widget_class, - const gchar *callback_name, + const char *callback_name, GCallback callback_symbol); GDK_AVAILABLE_IN_ALL void gtk_widget_class_set_template_scope (GtkWidgetClass *widget_class, GtkBuilderScope *scope); GDK_AVAILABLE_IN_ALL void gtk_widget_class_bind_template_child_full (GtkWidgetClass *widget_class, - const gchar *name, + const char *name, gboolean internal_child, gssize struct_offset); GDK_AVAILABLE_IN_ALL void gtk_widget_insert_action_group (GtkWidget *widget, - const gchar *name, + const char *name, GActionGroup *group); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h index 47b3a531d7..99a19afd98 100644 --- a/gtk/gtkwidgetprivate.h +++ b/gtk/gtkwidgetprivate.h @@ -131,7 +131,7 @@ struct _GtkWidgetPrivate * Among other things, the widget name is used to determine * the style to use for a widget. */ - gchar *name; + char *name; /* The root this widget belongs to or %NULL if widget is not * rooted or is a #GtkRoot itself. diff --git a/gtk/gtkwin32.c b/gtk/gtkwin32.c index 8923e3f8e2..a4f61030dd 100644 --- a/gtk/gtkwin32.c +++ b/gtk/gtkwin32.c @@ -101,7 +101,7 @@ find_first_manifest (HMODULE module_handle, * g_once_init_enter (leaking once is OK, Windows will clean up after us). */ void -_gtk_load_dll_with_libgtk3_manifest (const gchar *dll_name) +_gtk_load_dll_with_libgtk3_manifest (const char *dll_name) { HANDLE activation_ctx_handle; ACTCTXA activation_ctx_descriptor; @@ -151,14 +151,14 @@ _gtk_load_dll_with_libgtk3_manifest (const gchar *dll_name) g_free (resource_name); } -const gchar * +const char * _gtk_get_libdir (void) { static char *gtk_libdir = NULL; if (gtk_libdir == NULL) { - gchar *root = g_win32_get_package_installation_directory_of_module (gtk_dll); - gchar *slash = strrchr (root, '\\'); + char *root = g_win32_get_package_installation_directory_of_module (gtk_dll); + char *slash = strrchr (root, '\\'); if (slash != NULL && g_ascii_strcasecmp (slash + 1, ".libs") == 0) gtk_libdir = g_strdup (GTK_LIBDIR); @@ -170,14 +170,14 @@ _gtk_get_libdir (void) return gtk_libdir; } -const gchar * +const char * _gtk_get_localedir (void) { static char *gtk_localedir = NULL; if (gtk_localedir == NULL) { - const gchar *p; - gchar *root, *temp; + const char *p; + char *root, *temp; /* GTK_LOCALEDIR ends in either /lib/locale or * /share/locale. Scan for that slash. @@ -201,13 +201,13 @@ _gtk_get_localedir (void) return gtk_localedir; } -const gchar * +const char * _gtk_get_datadir (void) { static char *gtk_datadir = NULL; if (gtk_datadir == NULL) { - gchar *root = g_win32_get_package_installation_directory_of_module (gtk_dll); + char *root = g_win32_get_package_installation_directory_of_module (gtk_dll); gtk_datadir = g_build_filename (root, "share", NULL); g_free (root); } @@ -215,13 +215,13 @@ _gtk_get_datadir (void) return gtk_datadir; } -const gchar * +const char * _gtk_get_sysconfdir (void) { static char *gtk_sysconfdir = NULL; if (gtk_sysconfdir == NULL) { - gchar *root = g_win32_get_package_installation_directory_of_module (gtk_dll); + char *root = g_win32_get_package_installation_directory_of_module (gtk_dll); gtk_sysconfdir = g_build_filename (root, "etc", NULL); g_free (root); } @@ -229,7 +229,7 @@ _gtk_get_sysconfdir (void) return gtk_sysconfdir; } -const gchar * +const char * _gtk_get_data_prefix (void) { static char *gtk_data_prefix = NULL; diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 84042052eb..41f06bbcc0 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -183,8 +183,8 @@ typedef struct GdkDisplay *display; GtkApplication *application; - gchar *startup_id; - gchar *title; + char *startup_id; + char *title; guint keys_changed_handler; @@ -319,7 +319,7 @@ typedef enum typedef struct { - gchar *icon_name; + char *icon_name; guint realized : 1; guint using_default_icon : 1; guint using_themed_icon : 1; @@ -440,7 +440,7 @@ static void gtk_window_set_default_size_internal (GtkWindow *window, static void update_themed_icon (GtkWindow *window); static GList *icon_list_from_theme (GtkWindow *window, - const gchar *name); + const char *name); static void gtk_window_realize_icon (GtkWindow *window); static void gtk_window_unrealize_icon (GtkWindow *window); static void update_window_actions (GtkWindow *window); @@ -484,7 +484,7 @@ static void gtk_window_release_application (GtkWindow *window); static GListStore *toplevel_list = NULL; static guint window_signals[LAST_SIGNAL] = { 0 }; -static gchar *default_icon_name = NULL; +static char *default_icon_name = NULL; static gboolean disable_startup_notification = FALSE; static GQuark quark_gtk_window_icon_info = 0; @@ -505,10 +505,10 @@ static void gtk_window_buildable_interface_init (GtkBuildableIface static void gtk_window_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type); + const char *type); static void gtk_window_buildable_set_buildable_property (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *name, + const char *name, const GValue *value); static void gtk_window_shortcut_manager_interface_init (GtkShortcutManagerInterface *iface); @@ -575,14 +575,14 @@ add_arrow_bindings (GtkWidgetClass *widget_class, } static guint32 -extract_time_from_startup_id (const gchar* startup_id) +extract_time_from_startup_id (const char * startup_id) { - gchar *timestr = g_strrstr (startup_id, "_TIME"); + char *timestr = g_strrstr (startup_id, "_TIME"); guint32 retval = GDK_CURRENT_TIME; if (timestr) { - gchar *end; + char *end; guint32 timestamp; /* Skip past the "_TIME" part */ @@ -599,7 +599,7 @@ extract_time_from_startup_id (const gchar* startup_id) } static gboolean -startup_id_is_fake (const gchar* startup_id) +startup_id_is_fake (const char * startup_id) { return strncmp (startup_id, "_TIME", 5) == 0; } @@ -1757,7 +1757,7 @@ static void gtk_window_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (type && strcmp (type, "titlebar") == 0) gtk_window_set_titlebar (GTK_WINDOW (buildable), GTK_WIDGET (child)); @@ -1770,7 +1770,7 @@ gtk_window_buildable_add_child (GtkBuildable *buildable, static void gtk_window_buildable_set_buildable_property (GtkBuildable *buildable, GtkBuilder *builder, - const gchar *name, + const char *name, const GValue *value) { GtkWindow *window = GTK_WINDOW (buildable); @@ -1969,7 +1969,7 @@ gtk_window_new (void) **/ void gtk_window_set_title (GtkWindow *window, - const gchar *title) + const char *title) { GtkWindowPrivate *priv = gtk_window_get_instance_private (window); char *new_title; @@ -1996,7 +1996,7 @@ gtk_window_set_title (GtkWindow *window, * been set explicitly. The returned string is owned by the widget * and must not be modified or freed. **/ -const gchar * +const char * gtk_window_get_title (GtkWindow *window) { GtkWindowPrivate *priv = gtk_window_get_instance_private (window); @@ -2024,7 +2024,7 @@ gtk_window_get_title (GtkWindow *window) **/ void gtk_window_set_startup_id (GtkWindow *window, - const gchar *startup_id) + const char *startup_id) { GtkWindowPrivate *priv = gtk_window_get_instance_private (window); GtkWidget *widget; @@ -3056,7 +3056,7 @@ render_paintable_to_texture (GdkPaintable *paintable) static GList * icon_list_from_theme (GtkWindow *window, - const gchar *name) + const char *name) { GtkWindowPrivate *priv = gtk_window_get_instance_private (window); GList *list; @@ -3208,10 +3208,10 @@ update_themed_icon (GtkWindow *window) */ void gtk_window_set_icon_name (GtkWindow *window, - const gchar *name) + const char *name) { GtkWindowIconInfo *info; - gchar *tmp; + char *tmp; g_return_if_fail (GTK_IS_WINDOW (window)); @@ -3239,7 +3239,7 @@ gtk_window_set_icon_name (GtkWindow *window, * Returns: (nullable): the icon name or %NULL if the window has * no themed icon */ -const gchar * +const char * gtk_window_get_icon_name (GtkWindow *window) { GtkWindowIconInfo *info; @@ -3260,7 +3260,7 @@ gtk_window_get_icon_name (GtkWindow *window) * themed icon, see gtk_window_set_icon_name(). **/ void -gtk_window_set_default_icon_name (const gchar *name) +gtk_window_set_default_icon_name (const char *name) { GList *tmp_list; GList *toplevels; @@ -3300,7 +3300,7 @@ gtk_window_set_default_icon_name (const gchar *name) * * Returns: the fallback icon name for windows */ -const gchar * +const char * gtk_window_get_default_icon_name (void) { return default_icon_name; @@ -3773,7 +3773,7 @@ static gboolean gtk_window_should_use_csd (GtkWindow *window) { GtkWindowPrivate *priv = gtk_window_get_instance_private (window); - const gchar *csd_env; + const char *csd_env; if (priv->csd_requested) return TRUE; diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h index ba9db9d501..3a5638d1d3 100644 --- a/gtk/gtkwindow.h +++ b/gtk/gtkwindow.h @@ -90,12 +90,12 @@ GDK_AVAILABLE_IN_ALL GtkWidget* gtk_window_new (void); GDK_AVAILABLE_IN_ALL void gtk_window_set_title (GtkWindow *window, - const gchar *title); + const char *title); GDK_AVAILABLE_IN_ALL -const gchar * gtk_window_get_title (GtkWindow *window); +const char * gtk_window_get_title (GtkWindow *window); GDK_AVAILABLE_IN_ALL void gtk_window_set_startup_id (GtkWindow *window, - const gchar *startup_id); + const char *startup_id); GDK_AVAILABLE_IN_ALL void gtk_window_set_focus (GtkWindow *window, GtkWidget *focus); @@ -159,13 +159,13 @@ gboolean gtk_window_get_deletable (GtkWindow *window); GDK_AVAILABLE_IN_ALL void gtk_window_set_icon_name (GtkWindow *window, - const gchar *name); + const char *name); GDK_AVAILABLE_IN_ALL -const gchar * gtk_window_get_icon_name (GtkWindow *window); +const char * gtk_window_get_icon_name (GtkWindow *window); GDK_AVAILABLE_IN_ALL -void gtk_window_set_default_icon_name (const gchar *name); +void gtk_window_set_default_icon_name (const char *name); GDK_AVAILABLE_IN_ALL -const gchar * gtk_window_get_default_icon_name (void); +const char * gtk_window_get_default_icon_name (void); GDK_AVAILABLE_IN_ALL void gtk_window_set_auto_startup_notification (gboolean setting); diff --git a/gtk/gtkwindowhandle.c b/gtk/gtkwindowhandle.c index 691fdc8a51..4818f78bc6 100644 --- a/gtk/gtkwindowhandle.c +++ b/gtk/gtkwindowhandle.c @@ -268,7 +268,7 @@ perform_titlebar_action (GtkWindowHandle *self, int n_press) { GtkSettings *settings; - gchar *action = NULL; + char *action = NULL; gboolean retval = TRUE; settings = gtk_widget_get_settings (GTK_WIDGET (self)); @@ -576,7 +576,7 @@ static void gtk_window_handle_buildable_add_child (GtkBuildable *buildable, GtkBuilder *builder, GObject *child, - const gchar *type) + const char *type) { if (GTK_IS_WIDGET (child)) gtk_window_handle_set_child (GTK_WINDOW_HANDLE (buildable), GTK_WIDGET (child)); diff --git a/gtk/inspector/action-editor.c b/gtk/inspector/action-editor.c index 6e01cf1b12..b4c04fdd0e 100644 --- a/gtk/inspector/action-editor.c +++ b/gtk/inspector/action-editor.c @@ -34,7 +34,7 @@ struct _GtkInspectorActionEditor GtkWidget parent; GObject *owner; - gchar *name; + char *name; gboolean enabled; const GVariantType *parameter_type; GVariantType *state_type; @@ -158,7 +158,7 @@ variant_editor_set_value (GtkWidget *editor, else { GtkWidget *entry; - gchar *text; + char *text; entry = gtk_widget_get_first_child (editor); @@ -190,7 +190,7 @@ variant_editor_get_value (GtkWidget *editor) else { GtkWidget *entry; - const gchar *text; + const char *text; entry = gtk_widget_get_first_child (editor); text = gtk_editable_get_text (GTK_EDITABLE (entry)); @@ -261,7 +261,7 @@ update_enabled (GtkInspectorActionEditor *r, static void action_enabled_changed_cb (GActionGroup *group, - const gchar *action_name, + const char *action_name, gboolean enabled, GtkInspectorActionEditor *r) { @@ -279,7 +279,7 @@ update_state (GtkInspectorActionEditor *r, static void action_state_changed_cb (GActionGroup *group, - const gchar *action_name, + const char *action_name, GVariant *state, GtkInspectorActionEditor *r) { @@ -454,7 +454,7 @@ gtk_inspector_action_editor_class_init (GtkInspectorActionEditorClass *klass) GtkWidget * gtk_inspector_action_editor_new (GObject *owner, - const gchar *name, + const char *name, GtkSizeGroup *activate) { return g_object_new (GTK_TYPE_INSPECTOR_ACTION_EDITOR, diff --git a/gtk/inspector/action-editor.h b/gtk/inspector/action-editor.h index 5940008a56..db13c6c447 100644 --- a/gtk/inspector/action-editor.h +++ b/gtk/inspector/action-editor.h @@ -34,7 +34,7 @@ G_BEGIN_DECLS GType gtk_inspector_action_editor_get_type (void); GtkWidget *gtk_inspector_action_editor_new (GObject *owner, - const gchar *name, + const char *name, GtkSizeGroup *activate); void gtk_inspector_action_editor_update (GtkInspectorActionEditor *r, gboolean enabled, diff --git a/gtk/inspector/actions.c b/gtk/inspector/actions.c index 4402fbfa24..4965bb6349 100644 --- a/gtk/inspector/actions.c +++ b/gtk/inspector/actions.c @@ -75,7 +75,7 @@ gtk_inspector_actions_init (GtkInspectorActions *sl) static void action_added (GObject *owner, - const gchar *action_name, + const char *action_name, GtkInspectorActions *sl) { ActionHolder *holder = action_holder_new (owner, action_name); @@ -170,7 +170,7 @@ bind_parameter_cb (GtkSignalListItemFactory *factory, owner = action_holder_get_owner (ACTION_HOLDER (item)); name = action_holder_get_name (ACTION_HOLDER (item)); if (G_IS_ACTION_GROUP (owner)) - parameter = (const gchar *)g_action_group_get_action_parameter_type (G_ACTION_GROUP (owner), name); + parameter = (const char *)g_action_group_get_action_parameter_type (G_ACTION_GROUP (owner), name); else if (GTK_IS_ACTION_MUXER (owner)) gtk_action_muxer_query_action (GTK_ACTION_MUXER (owner), name, NULL, (const GVariantType **)¶meter, NULL, NULL, NULL); @@ -259,7 +259,7 @@ add_group (GtkInspectorActions *sl, GActionGroup *group) { int i; - gchar **names; + char **names; names = g_action_group_list_actions (group); for (i = 0; names[i]; i++) @@ -272,7 +272,7 @@ add_muxer (GtkInspectorActions *sl, GtkActionMuxer *muxer) { int i; - gchar **names; + char **names; names = gtk_action_muxer_list_actions (muxer); for (i = 0; names[i]; i++) diff --git a/gtk/inspector/css-editor.c b/gtk/inspector/css-editor.c index 2a45b73168..de79175ed2 100644 --- a/gtk/inspector/css-editor.c +++ b/gtk/inspector/css-editor.c @@ -171,7 +171,7 @@ disable_toggled (GtkToggleButton *button, GTK_STYLE_PROVIDER_PRIORITY_USER); } -static gchar * +static char * get_current_text (GtkTextBuffer *buffer) { GtkTextIter start, end; @@ -258,7 +258,7 @@ save_clicked (GtkButton *button, static void update_style (GtkInspectorCssEditor *ce) { - gchar *text; + char *text; g_list_free_full (ce->priv->errors, css_error_free); ce->priv->errors = NULL; diff --git a/gtk/inspector/css-node-tree.c b/gtk/inspector/css-node-tree.c index 31dccb43b4..46f507f6f8 100644 --- a/gtk/inspector/css-node-tree.c +++ b/gtk/inspector/css-node-tree.c @@ -91,7 +91,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorCssNodeTree, gtk_inspector_css_node_tree typedef struct { GtkCssNode *node; - const gchar *prop_name; + const char *prop_name; GdkRectangle rect; GtkInspectorCssNodeTree *cnt; } NodePropEditor; @@ -276,7 +276,7 @@ strv_sort (char **strv) NULL); } -static gchar * +static char * format_state_flags (GtkStateFlags state) { if (state) @@ -375,7 +375,7 @@ gtk_inspector_css_node_tree_init (GtkInspectorCssNodeTree *cnt) { GtkCssStyleProperty *prop; GtkTreeIter iter; - const gchar *name; + const char *name; prop = _gtk_css_style_property_lookup_by_id (i); name = _gtk_style_property_get_name (GTK_STYLE_PROPERTY (prop)); @@ -438,11 +438,11 @@ gtk_inspector_css_node_tree_update_style (GtkInspectorCssNodeTree *cnt, for (i = 0; i < _gtk_css_style_property_get_n_properties (); i++) { GtkCssStyleProperty *prop; - const gchar *name; + const char *name; GtkTreeIter *iter; GtkCssSection *section; - gchar *location; - gchar *value; + char *location; + char *value; prop = _gtk_css_style_property_lookup_by_id (i); name = _gtk_style_property_get_name (GTK_STYLE_PROPERTY (prop)); @@ -522,7 +522,7 @@ gtk_inspector_css_node_tree_set_display (GtkInspectorCssNodeTree *cnt, GdkDisplay *display) { GtkSettings *settings; - gchar *theme_name; + char *theme_name; settings = gtk_settings_get_for_display (display); g_object_get (settings, "gtk-theme-name", &theme_name, NULL); diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c index 243e6d9369..739cab7d29 100644 --- a/gtk/inspector/general.c +++ b/gtk/inspector/general.c @@ -164,7 +164,7 @@ init_version (GtkInspectorGeneral *gen) static G_GNUC_UNUSED void add_check_row (GtkInspectorGeneral *gen, GtkListBox *list, - const gchar *name, + const char *name, gboolean value, int indent) { @@ -248,7 +248,7 @@ add_label_row (GtkInspectorGeneral *gen, static void append_glx_extension_row (GtkInspectorGeneral *gen, Display *dpy, - const gchar *ext) + const char *ext) { add_check_row (gen, GTK_LIST_BOX (gen->gl_box), ext, epoxy_has_glx_extension (dpy, 0, ext), 0); } @@ -258,7 +258,7 @@ append_glx_extension_row (GtkInspectorGeneral *gen, static void append_egl_extension_row (GtkInspectorGeneral *gen, EGLDisplay dpy, - const gchar *ext) + const char *ext) { add_check_row (gen, GTK_LIST_BOX (gen->gl_box), ext, epoxy_has_egl_extension (dpy, ext), 0); } @@ -307,7 +307,7 @@ init_gl (GtkInspectorGeneral *gen) { Display *dpy = GDK_DISPLAY_XDISPLAY (gen->display); int error_base, event_base; - gchar *version; + char *version; if (!glXQueryExtension (dpy, &error_base, &event_base)) return; @@ -332,7 +332,7 @@ init_gl (GtkInspectorGeneral *gen) { EGLDisplay dpy; EGLint major, minor; - gchar *version; + char *version; dpy = wayland_get_display (gdk_wayland_display_get_wl_display (gen->display)); @@ -474,9 +474,9 @@ set_monospace_font (GtkWidget *w) static void set_path_label (GtkWidget *w, - const gchar *var) + const char *var) { - const gchar *v; + const char *v; v = g_getenv (var); if (v != NULL) @@ -563,8 +563,8 @@ populate_monitor (gpointer item, { GtkListBox *list; GdkMonitor *monitor = item; - gchar *name; - gchar *value; + char *name; + char *value; GdkRectangle rect; int scale; char *scale_str = NULL; @@ -678,11 +678,11 @@ static void add_device (GtkInspectorGeneral *gen, GdkDevice *device) { - const gchar *name, *value; + const char *name, *value; GString *str; int i; guint n_touches; - gchar *text; + char *text; GdkAxisFlags axes; const char *axis_name[] = { "Ignore", diff --git a/gtk/inspector/init.c b/gtk/inspector/init.c index fad5f9b5b7..2e092aafd0 100644 --- a/gtk/inspector/init.c +++ b/gtk/inspector/init.c @@ -86,7 +86,7 @@ gtk_inspector_init (void) if (extension_point == NULL) { GIOModuleScope *scope; - gchar **paths; + char **paths; int i; extension_point = g_io_extension_point_register ("gtk-inspector-page"); diff --git a/gtk/inspector/menu.c b/gtk/inspector/menu.c index fb7a78d318..ec7e6901e3 100644 --- a/gtk/inspector/menu.c +++ b/gtk/inspector/menu.c @@ -63,10 +63,10 @@ add_item (GtkInspectorMenu *sl, { GtkTreeIter iter; GVariant *value; - gchar *label = NULL; - gchar *action = NULL; - gchar *target = NULL; - gchar *icon = NULL; + char *label = NULL; + char *action = NULL; + char *target = NULL; + char *icon = NULL; GMenuModel *model; g_menu_model_get_item_attribute (menu, idx, G_MENU_ATTRIBUTE_LABEL, "s", &label); diff --git a/gtk/inspector/misc-info.c b/gtk/inspector/misc-info.c index 72621786f1..ffab43a93b 100644 --- a/gtk/inspector/misc-info.c +++ b/gtk/inspector/misc-info.c @@ -98,7 +98,7 @@ typedef struct _GtkInspectorMiscInfoClass G_DEFINE_TYPE (GtkInspectorMiscInfo, gtk_inspector_misc_info, GTK_TYPE_WIDGET) -static gchar * +static char * format_state_flags (GtkStateFlags state) { GFlagsClass *fclass; @@ -130,7 +130,7 @@ format_state_flags (GtkStateFlags state) static void state_flags_changed (GtkWidget *w, GtkStateFlags old_flags, GtkInspectorMiscInfo *sl) { - gchar *s; + char *s; s = format_state_flags (gtk_widget_get_state_flags (w)); gtk_label_set_label (GTK_LABEL (sl->state), s); @@ -142,7 +142,7 @@ update_allocation (GtkWidget *w, GtkInspectorMiscInfo *sl) { GtkAllocation alloc; - gchar *size_label; + char *size_label; GEnumClass *class; GEnumValue *value; @@ -284,7 +284,7 @@ update_frame_clock (GtkInspectorMiscInfo *sl) clock = (GObject *)gtk_widget_get_frame_clock (GTK_WIDGET (sl->object)); if (clock) { - gchar *tmp; + char *tmp; tmp = g_strdup_printf ("%p", clock); gtk_label_set_label (GTK_LABEL (sl->frame_clock), tmp); g_free (tmp); @@ -306,7 +306,7 @@ static gboolean update_info (gpointer data) { GtkInspectorMiscInfo *sl = data; - gchar *tmp; + char *tmp; GType gtype; tmp = g_strdup_printf ("%p", sl->object); diff --git a/gtk/inspector/object-tree.c b/gtk/inspector/object-tree.c index d4ce6daed0..3c41bfd432 100644 --- a/gtk/inspector/object-tree.c +++ b/gtk/inspector/object-tree.c @@ -652,7 +652,7 @@ gtk_inspector_get_object_name (GObject *object) { if (GTK_IS_WIDGET (object)) { - const gchar *id; + const char *id; id = gtk_widget_get_name (GTK_WIDGET (object)); if (id != NULL && g_strcmp0 (id, G_OBJECT_TYPE_NAME (object)) != 0) @@ -661,7 +661,7 @@ gtk_inspector_get_object_name (GObject *object) if (GTK_IS_BUILDABLE (object)) { - const gchar *id; + const char *id; id = gtk_buildable_get_name (GTK_BUILDABLE (object)); if (id != NULL && !g_str_has_prefix (id, "___object_")) @@ -837,10 +837,10 @@ unmap (GtkWidget *widget) } static gboolean -match_string (const gchar *string, - const gchar *text) +match_string (const char *string, + const char *text) { - gchar *lower; + char *lower; gboolean match = FALSE; if (string) diff --git a/gtk/inspector/prop-editor.c b/gtk/inspector/prop-editor.c index 8dcc463b67..fa586317b8 100644 --- a/gtk/inspector/prop-editor.c +++ b/gtk/inspector/prop-editor.c @@ -52,7 +52,7 @@ struct _GtkInspectorPropEditor GtkBox parent_instance; GObject *object; - gchar *name; + char *name; GtkWidget *self; GtkSizeGroup *size_group; }; @@ -114,7 +114,7 @@ g_object_connect_property (GObject *object, GObject *alive_object) { GClosure *closure; - gchar *with_detail; + char *with_detail; DisconnectData *dd; with_detail = g_strconcat ("notify::", spec->name, NULL); @@ -166,7 +166,7 @@ free_object_property (ObjectProperty *p) static void connect_controller (GObject *controller, - const gchar *signal, + const char *signal, GObject *model, GParamSpec *spec, GCallback func) @@ -351,7 +351,7 @@ string_modified (GtkEntry *entry, ObjectProperty *p) static void intern_string_modified (GtkEntry *entry, ObjectProperty *p) { - const gchar *s; + const char *s; s = gtk_editable_get_text (GTK_EDITABLE (entry)); if (g_str_equal (p->spec->name, "id")) @@ -365,8 +365,8 @@ string_changed (GObject *object, GParamSpec *pspec, gpointer data) { GtkEntry *entry = GTK_ENTRY (data); GValue val = G_VALUE_INIT; - const gchar *str; - const gchar *text; + const char *str; + const char *text; g_value_init (&val, G_TYPE_STRING); get_property_value (object, pspec, &val); @@ -389,7 +389,7 @@ static void strv_modified (GtkInspectorStrvEditor *self, ObjectProperty *p) { GValue val = G_VALUE_INIT; - gchar **strv; + char **strv; g_value_init (&val, G_TYPE_STRV); strv = gtk_inspector_strv_editor_get_strv (self); @@ -405,7 +405,7 @@ strv_changed (GObject *object, GParamSpec *pspec, gpointer data) { GtkInspectorStrvEditor *self = data; GValue val = G_VALUE_INIT; - gchar **strv; + char **strv; g_value_init (&val, G_TYPE_STRV); get_property_value (object, pspec, &val); @@ -595,7 +595,7 @@ flags_changed (GObject *object, GParamSpec *pspec, gpointer data) static gunichar unichar_get_value (GtkEntry *entry) { - const gchar *text = gtk_editable_get_text (GTK_EDITABLE (entry)); + const char *text = gtk_editable_get_text (GTK_EDITABLE (entry)); if (text[0]) return g_utf8_get_char (text); @@ -621,7 +621,7 @@ unichar_changed (GObject *object, GParamSpec *pspec, gpointer data) gunichar new_val; gunichar old_val = unichar_get_value (entry); GValue val = G_VALUE_INIT; - gchar buf[7]; + char buf[7]; int len; g_value_init (&val, pspec->value_type); @@ -648,7 +648,7 @@ static void pointer_changed (GObject *object, GParamSpec *pspec, gpointer data) { GtkLabel *label = GTK_LABEL (data); - gchar *str; + char *str; gpointer ptr; g_object_get (object, pspec->name, &ptr, NULL); @@ -658,7 +658,7 @@ pointer_changed (GObject *object, GParamSpec *pspec, gpointer data) g_free (str); } -static gchar * +static char * object_label (GObject *obj, GParamSpec *pspec) { return g_strdup_printf ("%p", obj); @@ -668,7 +668,7 @@ static void object_changed (GObject *object, GParamSpec *pspec, gpointer data) { GtkWidget *label, *button; - gchar *str; + char *str; GObject *obj; label = gtk_widget_get_first_child (GTK_WIDGET (data)); @@ -836,7 +836,7 @@ property_editor (GObject *object, { GtkWidget *prop_edit; GtkAdjustment *adj; - gchar *msg; + char *msg; GType type = G_PARAM_SPEC_TYPE (spec); if (type == G_TYPE_PARAM_INT) @@ -1336,7 +1336,7 @@ static GObject * find_action_owner (GtkActionable *actionable) { GtkWidget *widget = GTK_WIDGET (actionable); - const gchar *full_name; + const char *full_name; GtkWidget *win; full_name = gtk_actionable_get_action_name (actionable); @@ -1386,7 +1386,7 @@ action_editor (GObject *object, GtkWidget *box; GtkWidget *button; GObject *owner; - gchar *text; + char *text; owner = find_action_owner (GTK_ACTIONABLE (object)); @@ -1414,7 +1414,7 @@ action_editor (GObject *object, struct _GSettingsSchemaKey { GSettingsSchema *schema; - const gchar *name; + const char *name; guint is_flags : 1; guint is_enum : 1; @@ -1422,8 +1422,8 @@ struct _GSettingsSchemaKey const guint32 *strinfo; gsize strinfo_length; - const gchar *unparsed; - gchar lc_char; + const char *unparsed; + char lc_char; const GVariantType *type; GVariant *minimum, *maximum; @@ -1473,15 +1473,15 @@ add_actionable_info (GtkInspectorPropEditor *self) static void add_settings_info (GtkInspectorPropEditor *self) { - gchar *key; + char *key; GSettingsBinding *binding; GObject *object; - const gchar *name; - const gchar *direction; - const gchar *tip; + const char *name; + const char *direction; + const char *tip; GtkWidget *row; GtkWidget *label; - gchar *str; + char *str; object = self->object; name = self->name; @@ -1542,9 +1542,9 @@ static void add_gtk_settings_info (GtkInspectorPropEditor *self) { GObject *object; - const gchar *name; + const char *name; GtkWidget *row; - const gchar *source; + const char *source; GtkWidget *button; object = self->object; @@ -1591,8 +1591,8 @@ readonly_changed (GObject *object, gpointer data) { GValue gvalue = {0}; - gchar *value; - gchar *type; + char *value; + char *type; g_value_init (&gvalue, spec->value_type); g_object_get_property (object, spec->name, &gvalue); @@ -1774,7 +1774,7 @@ gtk_inspector_prop_editor_class_init (GtkInspectorPropEditorClass *klass) GtkWidget * gtk_inspector_prop_editor_new (GObject *object, - const gchar *name, + const char *name, GtkSizeGroup *values) { return g_object_new (GTK_TYPE_INSPECTOR_PROP_EDITOR, diff --git a/gtk/inspector/prop-editor.h b/gtk/inspector/prop-editor.h index 6b0f720b74..32a669b5f9 100644 --- a/gtk/inspector/prop-editor.h +++ b/gtk/inspector/prop-editor.h @@ -30,7 +30,7 @@ G_BEGIN_DECLS G_DECLARE_FINAL_TYPE (GtkInspectorPropEditor, gtk_inspector_prop_editor, GTK, INSPECTOR_PROP_EDITOR, GtkBox) GtkWidget *gtk_inspector_prop_editor_new (GObject *object, - const gchar *name, + const char *name, GtkSizeGroup *values); gboolean gtk_inspector_prop_editor_should_expand (GtkInspectorPropEditor *editor); diff --git a/gtk/inspector/prop-list.c b/gtk/inspector/prop-list.c index b30fe7a740..dab74e6a00 100644 --- a/gtk/inspector/prop-list.c +++ b/gtk/inspector/prop-list.c @@ -187,8 +187,8 @@ set_property (GObject *object, static void show_object (GtkInspectorPropEditor *editor, GObject *object, - const gchar *name, - const gchar *tab, + const char *name, + const char *tab, GtkInspectorPropList *pl) { GtkInspectorWindow *iw; @@ -465,10 +465,10 @@ gtk_inspector_prop_list_class_init (GtkInspectorPropListClass *klass) /* Like g_strdup_value_contents, but keeps the type name separate */ void strdup_value_contents (const GValue *value, - gchar **contents, - gchar **type) + char **contents, + char **type) { - const gchar *src; + const char *src; if (G_VALUE_HOLDS_STRING (value)) { @@ -482,7 +482,7 @@ strdup_value_contents (const GValue *value, } else { - gchar *s = g_strescape (src, NULL); + char *s = g_strescape (src, NULL); *contents = g_strdup_printf ("\"%s\"", s); g_free (s); } @@ -528,7 +528,7 @@ strdup_value_contents (const GValue *value, while (*strv != NULL) { - gchar *escaped = g_strescape (*strv, NULL); + char *escaped = g_strescape (*strv, NULL); g_string_append_printf (tmp, "\"%s\"", escaped); g_free (escaped); diff --git a/gtk/inspector/prop-list.h b/gtk/inspector/prop-list.h index ef7896e550..cefd4d8c9c 100644 --- a/gtk/inspector/prop-list.h +++ b/gtk/inspector/prop-list.h @@ -57,8 +57,8 @@ void gtk_inspector_prop_list_set_layout_child (GtkInspectorPropList *pl, GObject *object); void strdup_value_contents (const GValue *value, - gchar **contents, - gchar **type); + char **contents, + char **type); diff --git a/gtk/inspector/resource-list.c b/gtk/inspector/resource-list.c index 386935aed9..57be9a049f 100644 --- a/gtk/inspector/resource-list.c +++ b/gtk/inspector/resource-list.c @@ -83,7 +83,7 @@ load_resources_recurse (const char *path, int *count_out, gsize *size_out) { - gchar **names; + char **names; int i; GListStore *result; @@ -93,7 +93,7 @@ load_resources_recurse (const char *path, for (i = 0; names[i]; i++) { int len; - gchar *p; + char *p; gboolean has_slash; int count; gsize size; @@ -149,11 +149,11 @@ populate_details (GtkInspectorResourceList *rl, const char *path; const char *name; GBytes *bytes; - gchar *type; + char *type; gconstpointer data; gsize size; GError *error = NULL; - gchar *markup; + char *markup; path = resource_holder_get_path (holder); name = resource_holder_get_name (holder); @@ -175,10 +175,10 @@ populate_details (GtkInspectorResourceList *rl, } else { - gchar *text; - gchar *content_image; - gchar *content_text; - gchar *content_video; + char *text; + char *content_image; + char *content_text; + char *content_video; content_image = g_content_type_from_mime_type ("image/*"); content_text = g_content_type_from_mime_type ("text/*"); @@ -412,10 +412,10 @@ unroot (GtkWidget *widget) } static gboolean -match_string (const gchar *string, - const gchar *text) +match_string (const char *string, + const char *text) { - gchar *lower; + char *lower; gboolean match = FALSE; if (string) diff --git a/gtk/inspector/size-groups.c b/gtk/inspector/size-groups.c index 36a26da7ad..83033ba21a 100644 --- a/gtk/inspector/size-groups.c +++ b/gtk/inspector/size-groups.c @@ -196,7 +196,7 @@ add_widget (GtkInspectorSizeGroups *sl, { GtkWidget *row; GtkWidget *label; - gchar *text; + char *text; row = g_object_new (size_group_row_get_type (), "widget", widget, NULL); text = g_strdup_printf ("%p (%s)", widget, g_type_name_from_instance ((GTypeInstance*)widget)); diff --git a/gtk/inspector/statistics.c b/gtk/inspector/statistics.c index e299fceb3b..b094fc2e93 100644 --- a/gtk/inspector/statistics.c +++ b/gtk/inspector/statistics.c @@ -177,7 +177,7 @@ has_instance_counts (void) static gboolean instance_counts_enabled (void) { - const gchar *string; + const char *string; guint flags = 0; string = g_getenv ("GOBJECT_DEBUG"); @@ -204,7 +204,7 @@ cell_data_data (GtkCellLayout *layout, { int column; int count; - gchar *text; + char *text; column = GPOINTER_TO_INT (data); @@ -225,7 +225,7 @@ cell_data_delta (GtkCellLayout *layout, int column; int count1; int count2; - gchar *text; + char *text; column = GPOINTER_TO_INT (data); @@ -286,10 +286,10 @@ key_pressed (GtkEventController *controller, } static gboolean -match_string (const gchar *string, - const gchar *text) +match_string (const char *string, + const char *text) { - gchar *lower; + char *lower; gboolean match = FALSE; if (string) @@ -305,11 +305,11 @@ match_string (const gchar *string, static gboolean match_row (GtkTreeModel *model, int column, - const gchar *key, + const char *key, GtkTreeIter *iter, gpointer data) { - gchar *type; + char *type; gboolean match; gtk_tree_model_get (model, iter, column, &type, -1); diff --git a/gtk/inspector/strv-editor.c b/gtk/inspector/strv-editor.c index 4b0f87fdce..478b62809c 100644 --- a/gtk/inspector/strv-editor.c +++ b/gtk/inspector/strv-editor.c @@ -58,7 +58,7 @@ remove_string (GtkButton *button, static void add_string (GtkInspectorStrvEditor *editor, - const gchar *str) + const char *str) { GtkWidget *box; GtkWidget *entry; @@ -129,7 +129,7 @@ gtk_inspector_strv_editor_class_init (GtkInspectorStrvEditorClass *class) void gtk_inspector_strv_editor_set_strv (GtkInspectorStrvEditor *editor, - gchar **strv) + char **strv) { GtkWidget *child; int i; @@ -150,7 +150,7 @@ gtk_inspector_strv_editor_set_strv (GtkInspectorStrvEditor *editor, emit_changed (editor); } -gchar ** +char ** gtk_inspector_strv_editor_get_strv (GtkInspectorStrvEditor *editor) { GtkWidget *child; @@ -170,5 +170,5 @@ gtk_inspector_strv_editor_get_strv (GtkInspectorStrvEditor *editor) g_ptr_array_add (p, NULL); - return (gchar **)g_ptr_array_free (p, FALSE); + return (char **)g_ptr_array_free (p, FALSE); } diff --git a/gtk/inspector/strv-editor.h b/gtk/inspector/strv-editor.h index 10efc368a5..bfe7b06f2e 100644 --- a/gtk/inspector/strv-editor.h +++ b/gtk/inspector/strv-editor.h @@ -55,9 +55,9 @@ G_BEGIN_DECLS GType gtk_inspector_strv_editor_get_type (void); void gtk_inspector_strv_editor_set_strv (GtkInspectorStrvEditor *editor, - gchar **strv); + char **strv); -gchar **gtk_inspector_strv_editor_get_strv (GtkInspectorStrvEditor *editor); +char **gtk_inspector_strv_editor_get_strv (GtkInspectorStrvEditor *editor); G_END_DECLS diff --git a/gtk/inspector/tree-data.c b/gtk/inspector/tree-data.c index 402cff68a3..08ca475b77 100644 --- a/gtk/inspector/tree-data.c +++ b/gtk/inspector/tree-data.c @@ -69,7 +69,7 @@ cell_data_func (GtkTreeViewColumn *col, { int num; GValue gvalue = { 0, }; - gchar *value; + char *value; num = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (col), "num")); gtk_tree_model_get_value (model, iter, num, &gvalue); @@ -85,7 +85,7 @@ add_columns (GtkInspectorTreeData *sl) int n_columns; GtkCellRenderer *cell; GType type; - gchar *title; + char *title; GtkTreeViewColumn *col; int i; @@ -132,7 +132,7 @@ gtk_inspector_tree_data_set_object (GtkInspectorTreeData *sl, { GtkWidget *stack; GtkStackPage *page; - gchar *title; + char *title; stack = gtk_widget_get_parent (GTK_WIDGET (sl)); page = gtk_stack_get_page (GTK_STACK (stack), GTK_WIDGET (sl)); diff --git a/gtk/inspector/type-info.c b/gtk/inspector/type-info.c index a2c72d9a50..4b417cc2f8 100644 --- a/gtk/inspector/type-info.c +++ b/gtk/inspector/type-info.c @@ -79,7 +79,7 @@ gtk_inspector_type_popover_set_gtype (GtkInspectorTypePopover *self, GtkInspectorTypePopoverPrivate *priv; GHashTable *implements; GHashTableIter iter; - const gchar *name; + const char *name; GType *interfaces; GType tmp; int i; @@ -110,7 +110,7 @@ gtk_inspector_type_popover_set_gtype (GtkInspectorTypePopover *self, interfaces = g_type_interfaces (tmp, NULL); for (i = 0; interfaces[i]; i++) - g_hash_table_add (implements, (gchar *) g_type_name (interfaces[i])); + g_hash_table_add (implements, (char *) g_type_name (interfaces[i])); g_free (interfaces); } diff --git a/gtk/inspector/visual.c b/gtk/inspector/visual.c index 28798507cd..b0f54280fb 100644 --- a/gtk/inspector/visual.c +++ b/gtk/inspector/visual.c @@ -217,7 +217,7 @@ update_font_scale (GtkInspectorVisual *vis, if (update_entry) { - gchar *str = g_strdup_printf ("%0.2f", factor); + char *str = g_strdup_printf ("%0.2f", factor); gtk_editable_set_text (GTK_EDITABLE (vis->font_scale_entry), str); g_free (str); @@ -239,7 +239,7 @@ font_scale_entry_activated (GtkEntry *entry, GtkInspectorVisual *vis) { gdouble factor; - gchar *err = NULL; + char *err = NULL; factor = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err); if (err != NULL) @@ -459,10 +459,10 @@ focus_activate (GtkSwitch *sw, } static void -fill_gtk (const gchar *path, +fill_gtk (const char *path, GHashTable *t) { - const gchar *dir_entry; + const char *dir_entry; GDir *dir = g_dir_open (path, 0, NULL); if (!dir) @@ -470,7 +470,7 @@ fill_gtk (const gchar *path, while ((dir_entry = g_dir_read_name (dir))) { - gchar *filename = g_build_filename (path, dir_entry, "gtk-4.0", "gtk.css", NULL); + char *filename = g_build_filename (path, dir_entry, "gtk-4.0", "gtk.css", NULL); if (g_file_test (filename, G_FILE_TEST_IS_REGULAR) && !g_hash_table_contains (t, dir_entry)) @@ -482,10 +482,10 @@ fill_gtk (const gchar *path, g_dir_close (dir); } -static gchar* -get_data_path (const gchar *subdir) +static char * +get_data_path (const char *subdir) { - gchar *base_datadir, *full_datadir; + char *base_datadir, *full_datadir; #if defined (GDK_WINDOWING_WIN32) || defined (GDK_WINDOWING_QUARTZ) base_datadir = g_strdup (_gtk_get_datadir ()); #else @@ -534,11 +534,11 @@ init_theme (GtkInspectorVisual *vis) { GHashTable *t; GHashTableIter iter; - gchar *theme, *path; - gchar **builtin_themes; + char *theme, *path; + char **builtin_themes; GList *list, *l; guint i; - const gchar * const *dirs; + const char * const *dirs; char **names; t = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); @@ -622,10 +622,10 @@ init_dark (GtkInspectorVisual *vis) } static void -fill_icons (const gchar *path, +fill_icons (const char *path, GHashTable *t) { - const gchar *dir_entry; + const char *dir_entry; GDir *dir; dir = g_dir_open (path, 0, NULL); @@ -634,7 +634,7 @@ fill_icons (const gchar *path, while ((dir_entry = g_dir_read_name (dir))) { - gchar *filename = g_build_filename (path, dir_entry, "index.theme", NULL); + char *filename = g_build_filename (path, dir_entry, "index.theme", NULL); if (g_file_test (filename, G_FILE_TEST_IS_REGULAR) && g_strcmp0 (dir_entry, "hicolor") != 0 && @@ -652,7 +652,7 @@ init_icons (GtkInspectorVisual *vis) { GHashTable *t; GHashTableIter iter; - gchar *theme, *path; + char *theme, *path; GList *list, *l; char **names; int i; @@ -689,10 +689,10 @@ init_icons (GtkInspectorVisual *vis) } static void -fill_cursors (const gchar *path, +fill_cursors (const char *path, GHashTable *t) { - const gchar *dir_entry; + const char *dir_entry; GDir *dir; dir = g_dir_open (path, 0, NULL); @@ -701,7 +701,7 @@ fill_cursors (const gchar *path, while ((dir_entry = g_dir_read_name (dir))) { - gchar *filename = g_build_filename (path, dir_entry, "cursors", NULL); + char *filename = g_build_filename (path, dir_entry, "cursors", NULL); if (g_file_test (filename, G_FILE_TEST_IS_DIR) && !g_hash_table_contains (t, dir_entry)) @@ -718,7 +718,7 @@ init_cursors (GtkInspectorVisual *vis) { GHashTable *t; GHashTableIter iter; - gchar *theme, *path; + char *theme, *path; GList *list, *l; char **names; int i; @@ -857,7 +857,7 @@ update_slowdown (GtkInspectorVisual *vis, if (update_entry) { - gchar *str = g_strdup_printf ("%0.*f", 2, slowdown); + char *str = g_strdup_printf ("%0.*f", 2, slowdown); gtk_editable_set_text (GTK_EDITABLE (vis->slowdown_entry), str); g_free (str); @@ -882,7 +882,7 @@ slowdown_entry_activated (GtkEntry *entry, GtkInspectorVisual *vis) { gdouble slowdown; - gchar *err = NULL; + char *err = NULL; slowdown = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err); if (err != NULL) diff --git a/gtk/inspector/window.c b/gtk/inspector/window.c index ff865a3b79..c1ef5ca5d0 100644 --- a/gtk/inspector/window.c +++ b/gtk/inspector/window.c @@ -670,7 +670,7 @@ get_inspector_display (void) if (display == NULL) { - const gchar *name; + const char *name; name = g_getenv ("GTK_INSPECTOR_DISPLAY"); display = gdk_display_open (name); @@ -693,7 +693,7 @@ get_inspector_display (void) if (display) { - const gchar *name; + const char *name; name = g_getenv ("GTK_INSPECTOR_RENDERER"); diff --git a/gtk/paper_names.c b/gtk/paper_names.c index 038726888e..e5c9d0b839 100644 --- a/gtk/paper_names.c +++ b/gtk/paper_names.c @@ -9,10 +9,10 @@ */ typedef struct { - const gchar *name; - const gchar *size; - const gchar *display_name; - const gchar *ppd_name; + const char *name; + const char *size; + const char *display_name; + const char *ppd_name; } PaperInfo; static const PaperInfo standard_names[] = { diff --git a/gtk/tools/encodesymbolic.c b/gtk/tools/encodesymbolic.c index 7f94f30e50..3bca80100d 100644 --- a/gtk/tools/encodesymbolic.c +++ b/gtk/tools/encodesymbolic.c @@ -33,7 +33,7 @@ #include "gdkpixbufutilsprivate.h" -static gchar *output_dir = NULL; +static char *output_dir = NULL; static GOptionEntry args[] = { { "output", 'o', 0, G_OPTION_ARG_FILENAME, &output_dir, N_("Output to this directory instead of cwd"), NULL }, @@ -43,12 +43,12 @@ static GOptionEntry args[] = { int main (int argc, char **argv) { - gchar *path, *basename, *pngpath, *pngfile, *dot; + char *path, *basename, *pngpath, *pngfile, *dot; GOptionContext *context; GdkPixbuf *symbolic; GError *error; int width, height; - gchar **sizev; + char **sizev; GFileOutputStream *out; GFile *dest; char *data; diff --git a/gtk/tools/gdkpixbufutils.c b/gtk/tools/gdkpixbufutils.c index ad67e3b8e8..4912f7962f 100644 --- a/gtk/tools/gdkpixbufutils.c +++ b/gtk/tools/gdkpixbufutils.c @@ -262,8 +262,8 @@ load_symbolic_svg (const char *escaped_file_data, { GInputStream *stream; GdkPixbuf *pixbuf; - gchar *data; - gchar *svg_width, *svg_height; + char *data; + char *svg_width, *svg_height; if (width == 0) width = icon_width * scale; diff --git a/gtk/tools/gtk-builder-tool-enumerate.c b/gtk/tools/gtk-builder-tool-enumerate.c index 45e8275378..382ad93929 100644 --- a/gtk/tools/gtk-builder-tool-enumerate.c +++ b/gtk/tools/gtk-builder-tool-enumerate.c @@ -28,7 +28,7 @@ #include "gtkbuilderprivate.h" #include "gtk-builder-tool.h" -static const gchar * +static const char * object_get_name (GObject *object) { if (GTK_IS_BUILDABLE (object)) @@ -45,8 +45,8 @@ do_enumerate (int *argc, const char ***argv) int ret; GSList *list, *l; GObject *object; - const gchar *name; - const gchar *filename; + const char *name; + const char *filename; filename = (*argv)[1]; diff --git a/gtk/tools/gtk-builder-tool-preview.c b/gtk/tools/gtk-builder-tool-preview.c index d40b9d96a3..3dbc3d1b5b 100644 --- a/gtk/tools/gtk-builder-tool-preview.c +++ b/gtk/tools/gtk-builder-tool-preview.c @@ -34,8 +34,8 @@ set_window_title (GtkWindow *window, const char *filename, const char *id) { - gchar *name; - gchar *title; + char *name; + char *title; name = g_path_get_basename (filename); diff --git a/gtk/tools/gtk-builder-tool-simplify.c b/gtk/tools/gtk-builder-tool-simplify.c index 8545d69b00..246e697c81 100644 --- a/gtk/tools/gtk-builder-tool-simplify.c +++ b/gtk/tools/gtk-builder-tool-simplify.c @@ -130,9 +130,9 @@ static GMarkupParser parser = { NULL }; -static const gchar * +static const char * canonical_boolean_value (MyParserData *data, - const gchar *string) + const char *string) { GValue value = G_VALUE_INIT; gboolean b = FALSE; @@ -348,13 +348,13 @@ is_container_element (Element *element) } static void -canonicalize_key (gchar *key) +canonicalize_key (char *key) { - gchar *p; + char *p; for (p = key; *p != 0; p++) { - gchar c = *p; + char c = *p; /* We may meet something like AtkObject::accessible-name */ if (c == ':' && ((p > key && p[-1] == ':') || p[1] == ':')) @@ -382,14 +382,14 @@ static struct { static GParamSpec * get_property_pspec (MyParserData *data, - const gchar *class_name, - const gchar *property_name, + const char *class_name, + const char *property_name, PropKind kind) { GType type; GObjectClass *class; GParamSpec *pspec; - gchar *canonical_name; + char *canonical_name; type = g_type_from_name (class_name); if (type == G_TYPE_INVALID) @@ -471,7 +471,7 @@ static gboolean value_is_default (Element *element, MyParserData *data, GParamSpec *pspec, - const gchar *value_string) + const char *value_string) { GValue value = { 0, }; gboolean ret; @@ -602,7 +602,7 @@ property_is_boolean (Element *element, for (i = 0; element->attribute_names[i]; i++) { if (strcmp (element->attribute_names[i], "name") == 0) - property_name = (const gchar *)element->attribute_values[i]; + property_name = (const char *)element->attribute_values[i]; } pspec = get_property_pspec (data, class_name, property_name, kind); @@ -653,7 +653,7 @@ property_can_be_omitted (Element *element, else if (strcmp (element->attribute_names[i], "translatable") == 0) translatable = TRUE; else if (strcmp (element->attribute_names[i], "name") == 0) - property_name = (const gchar *)element->attribute_values[i]; + property_name = (const char *)element->attribute_values[i]; } if (data->convert3to4 && @@ -683,8 +683,8 @@ static gboolean property_has_been_removed (Element *element, MyParserData *data) { - const gchar *class_name; - const gchar *property_name; + const char *class_name; + const char *property_name; struct _Prop { const char *class; const char *property; @@ -698,7 +698,7 @@ property_has_been_removed (Element *element, { "GtkHeaderBar", "position", PROP_KIND_PACKING }, { "GtkPopoverMenu", "position",PROP_KIND_PACKING }, }; - gchar *canonical_name; + char *canonical_name; gboolean found; int i, k; PropKind kind; @@ -711,7 +711,7 @@ property_has_been_removed (Element *element, for (i = 0; element->attribute_names[i]; i++) { if (strcmp (element->attribute_names[i], "name") == 0) - property_name = (const gchar *)element->attribute_values[i]; + property_name = (const char *)element->attribute_values[i]; } canonical_name = g_strdup (property_name); @@ -737,8 +737,8 @@ property_has_been_removed (Element *element, static void maybe_rename_property (Element *element, MyParserData *data) { - const gchar *class_name; - const gchar *property_name; + const char *class_name; + const char *property_name; struct _Prop { const char *class; const char *property; @@ -773,7 +773,7 @@ maybe_rename_property (Element *element, MyParserData *data) if (strcmp (element->attribute_names[i], "name") == 0) { prop_name_index = i; - property_name = (const gchar *)element->attribute_values[i]; + property_name = (const char *)element->attribute_values[i]; } } @@ -1860,7 +1860,7 @@ simplify_file (const char *filename, gboolean convert3to4) { GMarkupParseContext *context; - gchar *buffer; + char *buffer; MyParserData data; GError *error = NULL; diff --git a/gtk/tools/gtk-builder-tool-validate.c b/gtk/tools/gtk-builder-tool-validate.c index dfdfc005b8..63910f9fb6 100644 --- a/gtk/tools/gtk-builder-tool-validate.c +++ b/gtk/tools/gtk-builder-tool-validate.c @@ -29,8 +29,8 @@ #include "gtk-builder-tool.h" static GType -make_fake_type (const gchar *type_name, - const gchar *parent_name) +make_fake_type (const char *type_name, + const char *parent_name) { GType parent_type; GTypeQuery query; @@ -53,9 +53,9 @@ make_fake_type (const gchar *type_name, } static void -do_validate_template (const gchar *filename, - const gchar *type_name, - const gchar *parent_name) +do_validate_template (const char *filename, + const char *type_name, + const char *parent_name) { GType template_type; GObject *object; @@ -91,11 +91,11 @@ do_validate_template (const gchar *filename, } static gboolean -parse_template_error (const gchar *message, - gchar **class_name, - gchar **parent_name) +parse_template_error (const char *message, + char **class_name, + char **parent_name) { - gchar *p; + char *p; p = strstr (message, "(class '"); if (p) @@ -123,8 +123,8 @@ validate_file (const char *filename) GtkBuilder *builder; GError *error = NULL; int ret; - gchar *class_name = NULL; - gchar *parent_name = NULL; + char *class_name = NULL; + char *parent_name = NULL; builder = gtk_builder_new (); ret = gtk_builder_add_from_file (builder, filename, &error); diff --git a/gtk/tools/gtk-launch.c b/gtk/tools/gtk-launch.c index bc62584efb..9305095ea2 100644 --- a/gtk/tools/gtk-launch.c +++ b/gtk/tools/gtk-launch.c @@ -34,7 +34,7 @@ #include static gboolean show_version; -static gchar **args = NULL; +static char **args = NULL; static GOptionEntry entries[] = { { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Show program version"), NULL }, @@ -47,11 +47,11 @@ main (int argc, char *argv[]) { GError *error = NULL; GOptionContext *context = NULL; - gchar *summary; - gchar *app_name; + char *summary; + char *app_name; #ifdef G_OS_UNIX - gchar *desktop_file_name; - gchar *bus_name = NULL; + char *desktop_file_name; + char *bus_name = NULL; #endif GAppInfo *info = NULL; GAppLaunchContext *launch_context; @@ -172,7 +172,7 @@ main (int argc, char *argv[]) if (bus_name != NULL) { GDBusConnection *connection; - gchar *object_path, *p; + char *object_path, *p; connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL); diff --git a/gtk/tools/gtk-query-settings.c b/gtk/tools/gtk-query-settings.c index 6a025f5899..fbaaa337a6 100644 --- a/gtk/tools/gtk-query-settings.c +++ b/gtk/tools/gtk-query-settings.c @@ -28,7 +28,7 @@ main (int argc, char **argv) guint n_properties; guint i; int max_prop_name_length = 0; - gchar *pattern = NULL; + char *pattern = NULL; gtk_init (); @@ -51,7 +51,7 @@ main (int argc, char **argv) { GValue value = {0}; GParamSpec *prop = props[i]; - gchar *value_str; + char *value_str; int spacing = max_prop_name_length - strlen (prop->name) + 1; gboolean deprecated; diff --git a/gtk/tools/gtkiconcachevalidator.c b/gtk/tools/gtkiconcachevalidator.c index f449b6d22b..7cec4d486f 100644 --- a/gtk/tools/gtkiconcachevalidator.c +++ b/gtk/tools/gtkiconcachevalidator.c @@ -84,7 +84,7 @@ check_string (CacheInfo *info, if (info->flags & CHECK_STRINGS) { int i; - gchar c; + char c; /* assume no string is longer than 1k */ for (i = 0; i < 1024; i++) @@ -110,7 +110,7 @@ check_string_utf8 (CacheInfo *info, if (info->flags & CHECK_STRINGS) { int i; - gchar c; + char c; /* assume no string is longer than 1k */ for (i = 0; i < 1024; i++) diff --git a/gtk/tools/updateiconcache.c b/gtk/tools/updateiconcache.c index b6b5912e47..49732156f6 100644 --- a/gtk/tools/updateiconcache.c +++ b/gtk/tools/updateiconcache.c @@ -46,7 +46,7 @@ static gboolean ignore_theme_index = FALSE; static gboolean quiet = FALSE; static gboolean index_only = TRUE; static gboolean validate = FALSE; -static gchar *var_name = (gchar *) "-"; +static char *var_name = (char *) "-"; #define CACHE_NAME "icon-theme.cache" @@ -84,9 +84,9 @@ static int check_dir_mtime (const char *dir, } static gboolean -is_cache_up_to_date (const gchar *path) +is_cache_up_to_date (const char *path) { - gchar *cache_path; + char *cache_path; int retval; cache_path = g_build_filename (path, CACHE_NAME, NULL); @@ -109,10 +109,10 @@ is_cache_up_to_date (const gchar *path) #else /* !HAVE_FTW_H */ gboolean -is_cache_up_to_date (const gchar *path) +is_cache_up_to_date (const char *path) { GStatBuf path_stat, cache_stat; - gchar *cache_path; + char *cache_path; int retval; retval = g_stat (path, &path_stat); @@ -141,10 +141,10 @@ is_cache_up_to_date (const gchar *path) #endif /* !HAVE_FTW_H */ static gboolean -has_theme_index (const gchar *path) +has_theme_index (const char *path) { gboolean result; - gchar *index_path; + char *index_path; index_path = g_build_filename (path, "index.theme", NULL); @@ -236,7 +236,7 @@ load_icon_data (const char *path) int i; int *ivalues; GError *error = NULL; - gchar **keys; + char **keys; gsize n_keys; IconData *data; @@ -295,16 +295,16 @@ load_icon_data (const char *path) } keys = g_key_file_get_keys (icon_file, "Icon Data", &n_keys, &error); - data->display_names = g_new0 (gchar *, 2 * n_keys + 1); + data->display_names = g_new0 (char *, 2 * n_keys + 1); data->n_display_names = 0; for (i = 0; i < n_keys; i++) { - gchar *lang, *name; + char *lang, *name; if (g_str_has_prefix (keys[i], "DisplayName")) { - gchar *open, *close = NULL; + char *open, *close = NULL; open = strchr (keys[i], '['); @@ -350,9 +350,9 @@ load_icon_data (const char *path) * probably go to GLib */ static void -canonicalize_filename (gchar *filename) +canonicalize_filename (char *filename) { - gchar *p, *q; + char *p, *q; gboolean last_was_slash = FALSE; p = filename; @@ -418,12 +418,12 @@ canonicalize_filename (gchar *filename) *q = '\0'; } -static gchar * -follow_links (const gchar *path) +static char * +follow_links (const char *path) { - gchar *target; - gchar *d, *s; - gchar *path2 = NULL; + char *target; + char *d, *s; + char *path2 = NULL; path2 = g_strdup (path); while (g_file_test (path2, G_FILE_TEST_IS_SYMLINK)) @@ -459,14 +459,14 @@ follow_links (const gchar *path) static void maybe_cache_image_data (Image *image, - const gchar *path) + const char *path) { if (!index_only && !image->image_data && (g_str_has_suffix (path, ".png") || g_str_has_suffix (path, ".xpm"))) { GdkPixbuf *pixbuf; ImageData *idata; - gchar *path2; + char *path2; idata = g_hash_table_lookup (image_data_hash, path); path2 = follow_links (path); @@ -523,12 +523,12 @@ G_GNUC_END_IGNORE_DEPRECATIONS; static void maybe_cache_icon_data (Image *image, - const gchar *path) + const char *path) { if (g_str_has_suffix (path, ".icon")) { IconData *idata = NULL; - gchar *path2 = NULL; + char *path2 = NULL; idata = g_hash_table_lookup (icon_data_hash, path); path2 = follow_links (path); @@ -576,7 +576,7 @@ maybe_cache_icon_data (Image *image, * directory separators on all platforms. */ static void -replace_backslashes_with_slashes (gchar *path) +replace_backslashes_with_slashes (char *path) { size_t i; if (path == NULL) @@ -587,8 +587,8 @@ replace_backslashes_with_slashes (gchar *path) } static GList * -scan_directory (const gchar *base_path, - const gchar *subdir, +scan_directory (const char *base_path, + const char *subdir, GHashTable *files, GList *directories, int depth) @@ -596,8 +596,8 @@ scan_directory (const gchar *base_path, GHashTable *dir_hash; GDir *dir; GList *list = NULL, *iterator = NULL; - const gchar *name; - gchar *dir_path; + const char *name; + char *dir_path; gboolean dir_added = FALSE; guint dir_index = 0xffff; @@ -620,18 +620,18 @@ scan_directory (const gchar *base_path, { name = iterator->data; - gchar *path; + char *path; gboolean retval; int flags = 0; Image *image; - gchar *basename, *dot; + char *basename, *dot; path = g_build_filename (dir_path, name, NULL); retval = g_file_test (path, G_FILE_TEST_IS_DIR); if (retval) { - gchar *subsubdir; + char *subsubdir; if (subdir) subsubdir = g_build_path ("/", subdir, name, NULL); @@ -714,7 +714,7 @@ typedef struct _HashNode HashNode; struct _HashNode { HashNode *next; - gchar *name; + char *name; GList *image_list; int offset; }; @@ -762,21 +762,21 @@ convert_to_hash (gpointer key, gpointer value, gpointer user_data) static GHashTable *string_pool = NULL; static int -find_string (const gchar *n) +find_string (const char *n) { return GPOINTER_TO_INT (g_hash_table_lookup (string_pool, n)); } static void -add_string (const gchar *n, int offset) +add_string (const char *n, int offset) { g_hash_table_insert (string_pool, (gpointer) n, GINT_TO_POINTER (offset)); } static gboolean -write_string (FILE *cache, const gchar *n) +write_string (FILE *cache, const char *n) { - gchar *s; + char *s; int i, l; l = ALIGN_VALUE (strlen (n) + 1, 4); @@ -1417,7 +1417,7 @@ write_file (FILE *cache, GHashTable *files, GList *directories) } static gboolean -validate_file (const gchar *file) +validate_file (const char *file) { GMappedFile *map; CacheInfo info; @@ -1469,11 +1469,11 @@ safe_fclose (FILE *f) } static void -build_cache (const gchar *path) +build_cache (const char *path) { - gchar *cache_path, *tmp_cache_path; + char *cache_path, *tmp_cache_path; #ifdef G_OS_WIN32 - gchar *bak_cache_path = NULL; + char *bak_cache_path = NULL; #endif GHashTable *files; FILE *cache; @@ -1620,10 +1620,10 @@ opentmp: } static void -write_csource (const gchar *path) +write_csource (const char *path) { - gchar *cache_path; - gchar *data; + char *cache_path; + char *data; gsize len; int i; @@ -1666,9 +1666,9 @@ static GOptionEntry args[] = { }; static void -printerr_handler (const gchar *string) +printerr_handler (const char *string) { - const gchar *charset; + const char *charset; fputs (g_get_prgname (), stderr); fputs (": ", stderr); @@ -1676,7 +1676,7 @@ printerr_handler (const gchar *string) fputs (string, stderr); /* charset is UTF-8 already */ else { - gchar *result; + char *result; result = g_convert_with_fallback (string, -1, charset, "UTF-8", "?", NULL, NULL, NULL); @@ -1694,7 +1694,7 @@ printerr_handler (const gchar *string) int main (int argc, char **argv) { - gchar *path; + char *path; GOptionContext *context; if (argc < 2) @@ -1723,7 +1723,7 @@ main (int argc, char **argv) if (validate) { - gchar *file = g_build_filename (path, CACHE_NAME, NULL); + char *file = g_build_filename (path, CACHE_NAME, NULL); if (!g_file_test (file, G_FILE_TEST_IS_REGULAR)) { diff --git a/modules/printbackends/gtkcloudprintaccount.c b/modules/printbackends/gtkcloudprintaccount.c index 42f3d03900..bc2b9ab8f1 100644 --- a/modules/printbackends/gtkcloudprintaccount.c +++ b/modules/printbackends/gtkcloudprintaccount.c @@ -49,11 +49,11 @@ struct _GtkCloudprintAccount { GObject parent_instance; - gchar *printer_id; - gchar *goa_path; - gchar *presentation_identity; + char *printer_id; + char *goa_path; + char *presentation_identity; RestProxy *rest_proxy; - gchar *oauth2_access_token; + char *oauth2_access_token; }; static void gtk_cloudprint_account_class_init (GtkCloudprintAccountClass *class); @@ -100,9 +100,9 @@ gtk_cloudprint_account_get_type (void) * Returns: the new #GtkCloudprintAccount object **/ GtkCloudprintAccount * -gtk_cloudprint_account_new (const gchar *id, - const gchar *path, - const gchar *presentation_identity) +gtk_cloudprint_account_new (const char *id, + const char *path, + const char *presentation_identity) { GtkCloudprintAccount *account = g_object_new (GTK_TYPE_CLOUDPRINT_ACCOUNT, NULL); @@ -189,7 +189,7 @@ cloudprint_json_parse (RestProxyCall *call, JsonObject **result, GError **error) if (!success) { - const gchar *message = "(no message)"; + const char *message = "(no message)"; if (json_object_has_member (json_object, "message")) message = json_object_get_string_member (json_object, "message"); @@ -484,7 +484,7 @@ gtk_cloudprint_account_printer_rest_call_cb (RestProxyCall *call, void gtk_cloudprint_account_printer (GtkCloudprintAccount *account, - const gchar *printerid, + const char *printerid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) @@ -577,17 +577,17 @@ void gtk_cloudprint_account_submit (GtkCloudprintAccount *account, GtkPrinterCloudprint *printer, GMappedFile *file, - const gchar *title, + const char *title, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; RestProxyCall *call; - gchar *printerid = NULL; + char *printerid = NULL; RestParam *param; GError *error = NULL; - gchar *auth; + char *auth; g_object_get (printer, "printer-id", &printerid, @@ -655,7 +655,7 @@ gtk_cloudprint_account_submit_finish (GtkCloudprintAccount *account, return g_task_propagate_pointer (G_TASK (result), error); } -const gchar * +const char * gtk_cloudprint_account_get_presentation_identity (GtkCloudprintAccount *account) { return account->presentation_identity; diff --git a/modules/printbackends/gtkcloudprintaccount.h b/modules/printbackends/gtkcloudprintaccount.h index ef788743d3..7cb2333ac2 100644 --- a/modules/printbackends/gtkcloudprintaccount.h +++ b/modules/printbackends/gtkcloudprintaccount.h @@ -33,9 +33,9 @@ typedef struct _GtkPrinterCloudprint GtkPrinterCloudprint; typedef struct _GtkCloudprintAccount GtkCloudprintAccount; void gtk_cloudprint_account_register_type (GTypeModule *module); -GtkCloudprintAccount *gtk_cloudprint_account_new (const gchar *id, - const gchar *path, - const gchar *presentation_identity); +GtkCloudprintAccount *gtk_cloudprint_account_new (const char *id, + const char *path, + const char *presentation_identity); GType gtk_cloudprint_account_get_type (void) G_GNUC_CONST; void gtk_cloudprint_account_search (GtkCloudprintAccount *account, @@ -48,7 +48,7 @@ JsonNode *gtk_cloudprint_account_search_finish (GtkCloudprintAccount *account, GError **error); void gtk_cloudprint_account_printer (GtkCloudprintAccount *account, - const gchar *printerid, + const char *printerid, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); @@ -59,7 +59,7 @@ JsonObject *gtk_cloudprint_account_printer_finish (GtkCloudprintAccount *account void gtk_cloudprint_account_submit (GtkCloudprintAccount *account, GtkPrinterCloudprint *printer, GMappedFile *file, - const gchar *title, + const char *title, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); @@ -67,7 +67,7 @@ JsonObject *gtk_cloudprint_account_submit_finish (GtkCloudprintAccount *account, GAsyncResult *result, GError **error); -const gchar *gtk_cloudprint_account_get_presentation_identity (GtkCloudprintAccount *account); +const char *gtk_cloudprint_account_get_presentation_identity (GtkCloudprintAccount *account); G_END_DECLS diff --git a/modules/printbackends/gtkcupssecretsutils.c b/modules/printbackends/gtkcupssecretsutils.c index ab3a94b964..f5e328fa78 100644 --- a/modules/printbackends/gtkcupssecretsutils.c +++ b/modules/printbackends/gtkcupssecretsutils.c @@ -38,7 +38,7 @@ typedef struct { GDBusConnection *dbus_connection; SecretsServiceAction action; - gchar **auth_info, + char **auth_info, **auth_info_labels, **auth_info_required, *printer_uri, @@ -60,7 +60,7 @@ typedef struct * Returns: A GVariant dictionary of string pairs or NULL on error. */ static GVariant * -create_attributes (const gchar *printer_uri, +create_attributes (const char *printer_uri, const char **additional_attrs, const char **additional_labels) { @@ -105,7 +105,7 @@ get_secret_cb (GObject *source_object, GError *error = NULL; GVariant *output, *attributes; - gchar **auth_info = NULL, + char **auth_info = NULL, *key = NULL, *value = NULL; GVariantIter *iter = NULL; @@ -137,7 +137,7 @@ get_secret_cb (GObject *source_object, /* Iterate over the attributes to fill the auth info */ g_variant_get (attributes, "a{ss}", &iter); - auth_info = g_new0 (gchar *, + auth_info = g_new0 (char *, g_strv_length (task_data->auth_info_required) + 1); while (g_variant_iter_loop (iter, "{ss}", &key, &value)) @@ -247,7 +247,7 @@ create_item_cb (GObject *source_object, GTask *task; GError *error = NULL; GVariant *output; - gchar *item = NULL; + char *item = NULL; task = user_data; @@ -364,10 +364,10 @@ do_store_auth_info (GTask *task) static void prompt_completed_cb (GDBusConnection *connection, - const gchar *sender_name, - const gchar *object_path, - const gchar *interface_name, - const gchar *signal_name, + const char *sender_name, + const char *object_path, + const char *interface_name, + const char *signal_name, GVariant *parameters, gpointer user_data) { @@ -472,7 +472,7 @@ unlock_collection_cb (GObject *source_object, SecretsServiceData *task_data; GError *error = NULL; GVariant *output; - const gchar *prompt_path; + const char *prompt_path; task = user_data; task_data = g_task_get_task_data (task); @@ -540,8 +540,8 @@ unlock_read_alias_cb (GObject *source_object, GError *error = NULL; GVariant *output, *subresult; gsize path_len = 0; - const gchar *collection_path; - const gchar *to_unlock[2]; + const char *collection_path; + const char *to_unlock[2]; task = user_data; task_data = g_task_get_task_data (task); @@ -695,7 +695,7 @@ search_items_cb (GObject *source_object, for (i = 0; i < array_cnt; i++) { GVariant * const item_paths = g_variant_get_child_value (output, i); - const gchar **items = NULL; + const char **items = NULL; if (item_paths == NULL) { @@ -970,8 +970,8 @@ gtk_cups_secrets_service_query_task (gpointer source_object, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data, - const gchar *printer_uri, - gchar **auth_info_required) + const char *printer_uri, + char **auth_info_required) { GTask *task; SecretsServiceData *task_data; @@ -1020,9 +1020,9 @@ store_done_cb (GObject *source_object, * Tries to store the auth_info in a secrets service. */ void -gtk_cups_secrets_service_store (gchar **auth_info, - gchar **auth_info_labels, - const gchar *printer_uri) +gtk_cups_secrets_service_store (char **auth_info, + char **auth_info_labels, + const char *printer_uri) { GTask *task; SecretsServiceData *task_data; diff --git a/modules/printbackends/gtkcupssecretsutils.h b/modules/printbackends/gtkcupssecretsutils.h index 1a0424a3bf..e8fb07b143 100644 --- a/modules/printbackends/gtkcupssecretsutils.h +++ b/modules/printbackends/gtkcupssecretsutils.h @@ -27,14 +27,14 @@ void gtk_cups_secrets_service_query_task (gpointer source_obj GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data, - const gchar *printer_uri, - gchar **auth_info_required); + const char *printer_uri, + char **auth_info_required); guint gtk_cups_secrets_service_watch (GBusNameAppearedCallback appeared, GBusNameVanishedCallback vanished, gpointer user_data); -void gtk_cups_secrets_service_store (gchar **auth_info, - gchar **auth_info_labels, - const gchar *printer_uri); +void gtk_cups_secrets_service_store (char **auth_info, + char **auth_info_labels, + const char *printer_uri); G_END_DECLS diff --git a/modules/printbackends/gtkcupsutils.c b/modules/printbackends/gtkcupsutils.c index 3387cce99d..7955302819 100644 --- a/modules/printbackends/gtkcupsutils.c +++ b/modules/printbackends/gtkcupsutils.c @@ -47,7 +47,7 @@ static void _get_read_data (GtkCupsRequest *request); struct _GtkCupsResult { - gchar *error_msg; + char *error_msg; ipp_t *ipp_response; GtkCupsErrorType error_type; @@ -404,7 +404,7 @@ static const ipp_option_t ipp_options[] = { static ipp_tag_t -_find_option_tag (const gchar *option) +_find_option_tag (const char *option) { int lower_bound, upper_bound, num_options; int current_option; @@ -456,8 +456,8 @@ _find_option_tag (const gchar *option) */ void gtk_cups_request_encode_option (GtkCupsRequest *request, - const gchar *option, - const gchar *value) + const char *option, + const char *value) { ipp_tag_t option_tag; @@ -690,7 +690,7 @@ _connect (GtkCupsRequest *request) static void _post_send (GtkCupsRequest *request) { - gchar length[255]; + char length[255]; struct stat data_info; GTK_NOTE (PRINTING, @@ -1500,7 +1500,7 @@ gtk_cups_connection_test_new (const char *server, const int port) { GtkCupsConnectionTest *result = NULL; - gchar *port_str = NULL; + char *port_str = NULL; result = g_new (GtkCupsConnectionTest, 1); diff --git a/modules/printbackends/gtkcupsutils.h b/modules/printbackends/gtkcupsutils.h index 84303f5163..5ed7b9aaa0 100644 --- a/modules/printbackends/gtkcupsutils.h +++ b/modules/printbackends/gtkcupsutils.h @@ -82,8 +82,8 @@ struct _GtkCupsRequest http_status_t last_status; ipp_t *ipp_request; - gchar *server; - gchar *resource; + char *server; + char *resource; GIOChannel *data_io; int attempts; @@ -93,14 +93,14 @@ struct _GtkCupsRequest GtkCupsPollState poll_state; guint64 bytes_received; - gchar *password; - gchar *username; + char *password; + char *username; int own_http : 1; int need_password : 1; int need_auth_info : 1; - gchar **auth_info_required; - gchar **auth_info; + char **auth_info_required; + char **auth_info; GtkCupsPasswordState password_state; }; @@ -176,8 +176,8 @@ void gtk_cups_request_free (GtkCupsRequest * GtkCupsResult * gtk_cups_request_get_result (GtkCupsRequest *request); gboolean gtk_cups_request_is_done (GtkCupsRequest *request); void gtk_cups_request_encode_option (GtkCupsRequest *request, - const gchar *option, - const gchar *value); + const char *option, + const char *value); void gtk_cups_request_set_ipp_version (GtkCupsRequest *request, int major, int minor); diff --git a/modules/printbackends/gtkprintbackendcloudprint.c b/modules/printbackends/gtkprintbackendcloudprint.c index 8c6a1c29b7..a78bbe6d73 100644 --- a/modules/printbackends/gtkprintbackendcloudprint.c +++ b/modules/printbackends/gtkprintbackendcloudprint.c @@ -65,9 +65,9 @@ struct _GtkPrintBackendCloudprint struct { - gchar *id; - gchar *path; - gchar *presentation_identity; + char *id; + char *path; + char *presentation_identity; } typedef TGOAAccount; static GObjectClass *backend_parent_class; @@ -213,7 +213,7 @@ _cairo_write (void *closure, while (length > 0) { - g_io_channel_write_chars (io, (const gchar *) data, length, &written, &error); + g_io_channel_write_chars (io, (const char *) data, length, &written, &error); if (error != NULL) { @@ -257,7 +257,7 @@ typedef struct { GIOChannel *target_io; gpointer user_data; GDestroyNotify dnotify; - gchar *path; + char *path; /* Base64 encoding state */ int b64state; @@ -315,7 +315,7 @@ cloudprint_print_cb (GtkPrintBackendCloudprint *print_backend, { _PrintStreamData *ps = (_PrintStreamData *) user_data; gsize encodedlen; - gchar encoded[4]; /* Up to 4 bytes are needed to finish encoding */ + char encoded[4]; /* Up to 4 bytes are needed to finish encoding */ GError *error = NULL; encodedlen = g_base64_encode_close (FALSE, @@ -391,11 +391,11 @@ cloudprint_write (GIOChannel *source, GIOCondition con, gpointer user_data) { - gchar buf[_STREAM_MAX_CHUNK_SIZE]; + char buf[_STREAM_MAX_CHUNK_SIZE]; /* Base64 converts 24 bits into 32 bits, so divide the number of * bytes by 3 (rounding up) and multiply by 4. Also, if the previous * call left a non-zero state we may need an extra 4 bytes. */ - gchar encoded[(_STREAM_MAX_CHUNK_SIZE / 3 + 1) * 4 + 4]; + char encoded[(_STREAM_MAX_CHUNK_SIZE / 3 + 1) * 4 + 4]; gsize bytes_read; GError *error = NULL; GIOStatus read_status; @@ -454,7 +454,7 @@ gtk_print_backend_cloudprint_print_stream (GtkPrintBackend *print_backend gpointer user_data, GDestroyNotify dnotify) { - const gchar *prefix = "data:application/pdf;base64,"; + const char *prefix = "data:application/pdf;base64,"; GError *internal_error = NULL; _PrintStreamData *ps; int tmpfd; @@ -560,7 +560,7 @@ get_accounts (GVariant *output) { for (i = 0; i < g_variant_n_children (objects); i++) { - const gchar *object_name; + const char *object_name; GVariant *object_variant; g_variant_get_child (objects, i, "{&o@a{sa{sv}}}", @@ -571,7 +571,7 @@ get_accounts (GVariant *output) { for (j = 0; j < g_variant_n_children (object_variant); j++) { - const gchar *service_name; + const char *service_name; GVariant *service_variant; g_variant_get_child (object_variant, j, "{&s@a{sv}}", @@ -582,14 +582,14 @@ get_accounts (GVariant *output) { TGOAAccount *account; gboolean printers_disabled = FALSE; - gchar *provider_type = NULL; + char *provider_type = NULL; account = g_new0 (TGOAAccount, 1); account->path = g_strdup (object_name); for (k = 0; k < g_variant_n_children (service_variant); k++) { - const gchar *property_name; + const char *property_name; GVariant *property_variant; GVariant *value; @@ -914,7 +914,7 @@ cloudprint_printer_get_options (GtkPrinter *printer, { GtkPrinterOptionSet *set; GtkPrinterOption *option; - const gchar *n_up[] = { "1" }; + const char *n_up[] = { "1" }; set = gtk_printer_option_set_new (); @@ -1010,7 +1010,7 @@ cloudprint_printer_request_details (GtkPrinter *printer) { GtkPrintBackendCloudprint *backend; GtkCloudprintAccount *account = NULL; - gchar *printerid = NULL; + char *printerid = NULL; g_object_get (printer, "cloudprint-account", &account, diff --git a/modules/printbackends/gtkprintbackendcups.c b/modules/printbackends/gtkprintbackendcups.c index bd972b966c..940b57f393 100644 --- a/modules/printbackends/gtkprintbackendcups.c +++ b/modules/printbackends/gtkprintbackendcups.c @@ -136,7 +136,7 @@ struct _GtkPrintBackendCups GList *requests; GHashTable *auth; - gchar *username; + char *username; gboolean authentication_lock; #ifdef HAVE_COLORD CdClient *colord_client; @@ -215,23 +215,23 @@ static cairo_surface_t * cups_printer_create_cairo_surface (GtkPrinter GIOChannel *cache_io); static void gtk_print_backend_cups_set_password (GtkPrintBackend *backend, - gchar **auth_info_required, - gchar **auth_info, + char **auth_info_required, + char **auth_info, gboolean store_auth_info); void overwrite_and_free (gpointer data); -static gboolean is_address_local (const gchar *address); +static gboolean is_address_local (const char *address); static gboolean request_auth_info (gpointer data); static void lookup_auth_info (gpointer data); static void avahi_request_printer_list (GtkPrintBackendCups *cups_backend); static void secrets_service_appeared_cb (GDBusConnection *connection, - const gchar *name, - const gchar *name_owner, + const char *name, + const char *name_owner, gpointer user_data); static void secrets_service_vanished_cb (GDBusConnection *connection, - const gchar *name, + const char *name, gpointer user_data); G_DEFINE_DYNAMIC_TYPE(GtkPrintBackendCups, gtk_print_backend_cups, GTK_TYPE_PRINT_BACKEND) @@ -356,7 +356,7 @@ _cairo_write_to_cups (void *closure, while (length > 0) { - g_io_channel_write_chars (io, (gchar *)data, length, &written, &error); + g_io_channel_write_chars (io, (char *)data, length, &written, &error); if (error != NULL) { @@ -391,7 +391,7 @@ cups_printer_create_cairo_surface (GtkPrinter *printer, ppd_attr_t *ppd_attr_res = NULL; ppd_attr_t *ppd_attr_screen_freq = NULL; ppd_attr_t *ppd_attr_res_screen_freq = NULL; - gchar *res_string = NULL; + char *res_string = NULL; int level = 2; G_GNUC_BEGIN_IGNORE_DEPRECATIONS @@ -548,15 +548,15 @@ typedef struct { #define SIGNED_INTEGER_REGEX "[+-]?([0-9]+)" static void -add_cups_options (const gchar *key, - const gchar *value, +add_cups_options (const char *key, + const char *value, gpointer user_data) { CupsOptionsData *data = (CupsOptionsData *) user_data; GtkCupsRequest *request = data->request; GtkPrinterCups *printer = data->printer; gboolean custom_value = FALSE; - gchar *new_value = NULL; + char *new_value = NULL; int i; if (!key || !value) @@ -685,7 +685,7 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend *print_backend, GtkPageSetup *page_setup; GtkCupsRequest *request = NULL; GtkPrintSettings *settings; - const gchar *title; + const char *title; char printer_absolute_uri[HTTP_MAX_URI]; http_t *http = NULL; @@ -775,7 +775,7 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend *print_backend, if (title_bytes >= IPP_MAX_NAME) { - gchar *end; + char *end; end = g_utf8_find_prev_char (title, title + IPP_MAX_NAME - 1); title_truncated = g_utf8_substring (title, @@ -837,7 +837,7 @@ gtk_print_backend_cups_print_stream (GtkPrintBackend *print_backend, void overwrite_and_free (gpointer data) { - gchar *password = (gchar *) data; + char *password = (char *) data; if (password != NULL) { @@ -986,7 +986,7 @@ gtk_print_backend_cups_dispose (GObject *object) } static gboolean -is_address_local (const gchar *address) +is_address_local (const char *address) { if (address[0] == '/' || strcmp (address, "127.0.0.1") == 0 || @@ -998,16 +998,16 @@ is_address_local (const gchar *address) static void gtk_print_backend_cups_set_password (GtkPrintBackend *backend, - gchar **auth_info_required, - gchar **auth_info, + char **auth_info_required, + char **auth_info, gboolean store_auth_info) { GtkPrintBackendCups *cups_backend = GTK_PRINT_BACKEND_CUPS (backend); GList *l; char dispatch_hostname[HTTP_MAX_URI]; - gchar *username = NULL; - gchar *hostname = NULL; - gchar *password = NULL; + char *username = NULL; + char *hostname = NULL; + char *password = NULL; int length; int i; @@ -1026,7 +1026,7 @@ gtk_print_backend_cups_set_password (GtkPrintBackend *backend, if (hostname != NULL && username != NULL && password != NULL) { - gchar *key = g_strconcat (username, "@", hostname, NULL); + char *key = g_strconcat (username, "@", hostname, NULL); g_hash_table_insert (cups_backend->auth, key, g_strdup (password)); GTK_NOTE (PRINTING, g_print ("CUPS backend: caching password for %s\n", key)); @@ -1048,14 +1048,14 @@ gtk_print_backend_cups_set_password (GtkPrintBackend *backend, { if (auth_info != NULL) { - dispatch->request->auth_info = g_new0 (gchar *, length + 1); + dispatch->request->auth_info = g_new0 (char *, length + 1); for (i = 0; i < length; i++) dispatch->request->auth_info[i] = g_strdup (auth_info[i]); } /* Save the password if the user requested it */ if (password != NULL && store_auth_info) { - const gchar *printer_uri = + const char *printer_uri = gtk_cups_request_ipp_get_string (dispatch->request, IPP_TAG_URI, "printer-uri"); @@ -1082,14 +1082,14 @@ static gboolean request_password (gpointer data) { GtkPrintCupsDispatchWatch *dispatch = data; - const gchar *username; - gchar *password; - gchar *prompt = NULL; - gchar *key = NULL; + const char *username; + char *password; + char *prompt = NULL; + char *key = NULL; char hostname[HTTP_MAX_URI]; - gchar **auth_info_required; - gchar **auth_info_default; - gchar **auth_info_display; + char **auth_info_required; + char **auth_info_default; + char **auth_info_display; gboolean *auth_info_visible; int length = 3; int i; @@ -1106,16 +1106,16 @@ request_password (gpointer data) else username = cupsUser (); - auth_info_required = g_new0 (gchar*, length + 1); + auth_info_required = g_new0 (char *, length + 1); auth_info_required[0] = g_strdup ("hostname"); auth_info_required[1] = g_strdup ("username"); auth_info_required[2] = g_strdup ("password"); - auth_info_default = g_new0 (gchar*, length + 1); + auth_info_default = g_new0 (char *, length + 1); auth_info_default[0] = g_strdup (hostname); auth_info_default[1] = g_strdup (username); - auth_info_display = g_new0 (gchar*, length + 1); + auth_info_display = g_new0 (char *, length + 1); auth_info_display[1] = g_strdup (_("Username:")); auth_info_display[2] = g_strdup (_("Password:")); @@ -1303,7 +1303,7 @@ lookup_auth_info_cb (GObject *source_object, { GTask *task; GtkPrintCupsDispatchWatch *dispatch; - gchar **auth_info; + char **auth_info; GError *error = NULL; int i; @@ -1350,7 +1350,7 @@ lookup_auth_info (gpointer user_data) gsize length, i; gboolean need_secret_auth_info = FALSE; - const gchar *printer_uri; + const char *printer_uri; dispatch = user_data; @@ -1394,13 +1394,13 @@ request_auth_info (gpointer user_data) GtkPrintCupsDispatchWatch *dispatch; const char *job_title; const char *printer_uri; - gchar *prompt = NULL; + char *prompt = NULL; char *printer_name = NULL; int length; int i; gboolean *auth_info_visible = NULL; - gchar **auth_info_default = NULL; - gchar **auth_info_display = NULL; + char **auth_info_default = NULL; + char **auth_info_display = NULL; dispatch = (GtkPrintCupsDispatchWatch *) user_data; @@ -1412,8 +1412,8 @@ request_auth_info (gpointer user_data) length = g_strv_length (dispatch->request->auth_info_required); auth_info_visible = g_new0 (gboolean, length); - auth_info_default = g_new0 (gchar *, length + 1); - auth_info_display = g_new0 (gchar *, length + 1); + auth_info_default = g_new0 (char *, length + 1); + auth_info_display = g_new0 (char *, length + 1); for (i = 0; i < length; i++) { @@ -1587,9 +1587,9 @@ cups_dispatch_watch_finalize (GSource *source) result = gtk_cups_request_get_result (dispatch->request); if (gtk_cups_result_get_error_type (result) == GTK_CUPS_ERROR_AUTH) { - const gchar *username; - gchar hostname[HTTP_MAX_URI]; - gchar *key; + const char *username; + char hostname[HTTP_MAX_URI]; + char *key; httpGetHostname (dispatch->request->http, hostname, sizeof (hostname)); if (is_address_local (hostname)) @@ -1782,7 +1782,7 @@ static void cups_request_job_info (CupsJobPollData *data) { GtkCupsRequest *request; - gchar *job_uri; + char *job_uri; request = gtk_cups_request_new_with_username (NULL, GTK_CUPS_POST, @@ -1846,9 +1846,9 @@ mark_printer_inactive (GtkPrinter *printer, static int find_printer (GtkPrinter *printer, - const gchar *find_name) + const char *find_name) { - const gchar *printer_name; + const char *printer_name; printer_name = gtk_printer_get_name (printer); return g_ascii_strcasecmp (printer_name, find_name); @@ -1948,33 +1948,33 @@ typedef struct typedef struct { - const gchar *printer_name; - const gchar *printer_uri; - const gchar *member_uris; - const gchar *location; - const gchar *description; - gchar *state_msg; - const gchar *reason_msg; + const char *printer_name; + const char *printer_uri; + const char *member_uris; + const char *location; + const char *description; + char *state_msg; + const char *reason_msg; PrinterStateLevel reason_level; int state; int job_count; gboolean is_paused; gboolean is_accepting_jobs; - const gchar *default_cover_before; - const gchar *default_cover_after; + const char *default_cover_before; + const char *default_cover_after; gboolean default_printer; gboolean got_printer_type; gboolean remote_printer; gboolean avahi_printer; - gchar *avahi_resource_path; - gchar **auth_info_required; + char *avahi_resource_path; + char **auth_info_required; int default_number_up; guchar ipp_version_major; guchar ipp_version_minor; gboolean supports_copies; gboolean supports_collate; gboolean supports_number_up; - gchar *media_default; + char *media_default; GList *media_supported; GList *media_size_supported; float media_bottom_margin_default; @@ -1982,13 +1982,13 @@ typedef struct float media_left_margin_default; float media_right_margin_default; gboolean media_margin_default_set; - gchar *sides_default; + char *sides_default; GList *sides_supported; char **covers; int number_of_covers; - gchar *output_bin_default; + char *output_bin_default; GList *output_bin_supported; - gchar *original_device_uri; + char *original_device_uri; } PrinterSetupInfo; static void @@ -2005,8 +2005,8 @@ get_ipp_version (const char *ipp_version_string, guchar *ipp_version_major, guchar *ipp_version_minor) { - gchar **ipp_version_strv; - gchar *endptr; + char **ipp_version_strv; + char *endptr; *ipp_version_major = 1; *ipp_version_minor = 1; @@ -2185,7 +2185,7 @@ cups_printer_handle_attribute (GtkPrintBackendCups *cups_backend, { if (strcmp (ippGetString (attr, 0, NULL), "none") != 0) { - info->auth_info_required = g_new0 (gchar *, ippGetCount (attr) + 1); + info->auth_info_required = g_new0 (char *, ippGetCount (attr) + 1); for (i = 0; i < ippGetCount (attr); i++) info->auth_info_required[i] = g_strdup (ippGetString (attr, i, NULL)); } @@ -2519,11 +2519,11 @@ set_printer_icon_name_from_info (GtkPrinter *printer, gtk_printer_set_icon_name (printer, "printer"); } -static gchar * +static char * get_reason_msg_desc (guint i, - const gchar *printer_name) + const char *printer_name) { - gchar *reason_msg_desc; + char *reason_msg_desc; /* The numbers must match the indices in the printer_messages array */ switch (i) @@ -2594,7 +2594,7 @@ set_info_state_message (PrinterSetupInfo *info) if (info->state_msg == NULL || strlen (info->state_msg) == 0) { - gchar *tmp_msg2 = NULL; + char *tmp_msg2 = NULL; if (info->is_paused && !info->is_accepting_jobs) /* Translators: this is a printer status. */ tmp_msg2 = g_strdup ( _("Paused; Rejecting Jobs")); @@ -2615,7 +2615,7 @@ set_info_state_message (PrinterSetupInfo *info) /* Set description of the reason and combine it with printer-state-message. */ if (info->reason_msg) { - gchar *reason_msg_desc = NULL; + char *reason_msg_desc = NULL; gboolean found = FALSE; for (i = 0; i < G_N_ELEMENTS (printer_messages); i++) @@ -2642,7 +2642,7 @@ set_info_state_message (PrinterSetupInfo *info) } else { - gchar *tmp_msg = NULL; + char *tmp_msg = NULL; /* Translators: this string connects multiple printer states together. */ tmp_msg = g_strjoin ( _("; "), info->state_msg, reason_msg_desc, NULL); @@ -2657,7 +2657,7 @@ set_info_state_message (PrinterSetupInfo *info) static void set_default_printer (GtkPrintBackendCups *cups_backend, - const gchar *default_printer_name) + const char *default_printer_name) { cups_backend->default_printer = g_strdup (default_printer_name); cups_backend->got_default_printer = TRUE; @@ -2840,32 +2840,32 @@ cups_request_printer_info (GtkPrinterCups *printer) typedef struct { - gchar *printer_uri; - gchar *location; - gchar *host; + char *printer_uri; + char *location; + char *host; int port; - gchar *printer_name; - gchar *name; - gchar *resource_path; + char *printer_name; + char *name; + char *resource_path; gboolean got_printer_type; guint printer_type; gboolean got_printer_state; guint printer_state; - gchar *type; - gchar *domain; - gchar *UUID; + char *type; + char *domain; + char *UUID; GtkPrintBackendCups *backend; } AvahiConnectionTestData; static GtkPrinter * find_printer_by_uuid (GtkPrintBackendCups *backend, - const gchar *UUID) + const char *UUID) { GtkPrinterCups *printer; GtkPrinter *result = NULL; GList *printers; GList *iter; - gchar *printer_uuid; + char *printer_uuid; printers = gtk_print_backend_get_printer_list (GTK_PRINT_BACKEND (backend)); for (iter = printers; iter != NULL; iter = iter->next) @@ -3032,11 +3032,11 @@ avahi_connection_test_cb (GObject *source_object, } static gboolean -avahi_txt_get_key_value_pair (const gchar *entry, - gchar **key, - gchar **value) +avahi_txt_get_key_value_pair (const char *entry, + char **key, + char **value) { - const gchar *equal_sign; + const char *equal_sign; *key = NULL; *value = NULL; @@ -3065,25 +3065,25 @@ avahi_service_resolver_cb (GObject *source_object, { AvahiConnectionTestData *data; GtkPrintBackendCups *backend; - const gchar *name; - const gchar *host; - const gchar *type; - const gchar *domain; - const gchar *address; - const gchar *protocol_string; + const char *name; + const char *host; + const char *type; + const char *domain; + const char *address; + const char *protocol_string; GVariant *output; GVariant *txt; GVariant *child; guint32 flags; guint16 port; GError *error = NULL; - gchar *tmp; - gchar *printer_name; - gchar **printer_name_strv; - gchar **printer_name_compressed_strv; - gchar *endptr; - gchar *key; - gchar *value; + char *tmp; + char *printer_name; + char **printer_name_strv; + char **printer_name_compressed_strv; + char *endptr; + char *key; + char *value; gsize length; int interface; int protocol; @@ -3185,7 +3185,7 @@ avahi_service_resolver_cb (GObject *source_object, g_strcanon (printer_name, PRINTER_NAME_ALLOWED_CHARACTERS, '-'); printer_name_strv = g_strsplit_set (printer_name, "-", -1); - printer_name_compressed_strv = g_new0 (gchar *, g_strv_length (printer_name_strv) + 1); + printer_name_compressed_strv = g_new0 (char *, g_strv_length (printer_name_strv) + 1); for (i = 0, j = 0; printer_name_strv[i] != NULL; i++) { if (printer_name_strv[i][0] != '\0') @@ -3248,17 +3248,17 @@ avahi_service_resolver_cb (GObject *source_object, static void avahi_service_browser_signal_handler (GDBusConnection *connection, - const gchar *sender_name, - const gchar *object_path, - const gchar *interface_name, - const gchar *signal_name, + const char *sender_name, + const char *object_path, + const char *interface_name, + const char *signal_name, GVariant *parameters, gpointer user_data) { GtkPrintBackendCups *backend = GTK_PRINT_BACKEND_CUPS (user_data); - gchar *name; - gchar *type; - gchar *domain; + char *name; + char *type; + char *domain; guint flags; int interface; int protocol; @@ -3496,7 +3496,7 @@ cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend, ipp_t *response; gboolean list_has_changed; GList *removed_printer_checklist; - gchar *remote_default_printer = NULL; + char *remote_default_printer = NULL; GList *iter; list_has_changed = FALSE; @@ -3890,11 +3890,11 @@ cups_request_ppd (GtkPrinter *printer) GtkPrinterCups *cups_printer; GtkCupsRequest *request; char *ppd_filename = NULL; - gchar *resource; + char *resource; http_t *http; GetPPDData *data; int fd; - const gchar *hostname; + const char *hostname; int port; cups_printer = GTK_PRINTER_CUPS (printer); @@ -4100,7 +4100,7 @@ cups_parse_user_options (const char *filename, cups_option_t **options) { FILE *fp; - gchar line[1024], *lineptr, *name; + char line[1024], *lineptr, *name; if ((fp = g_fopen (filename, "r")) == NULL) return num_options; @@ -4506,11 +4506,11 @@ static const struct { * Handles "format not a string literal" error * https://mail.gnome.org/archives/desktop-devel-list/2016-March/msg00075.html */ -static gchar * +static char * get_ipp_choice_translation_string (int index, guint i) { - gchar *translation; + char *translation; if (i < G_N_ELEMENTS (ipp_choice_translations)) translation = g_strdup (_(ipp_choice_translations[i].translation)); @@ -4753,7 +4753,7 @@ available_choices (ppd_file_t *ppd, { ppd_option_t *other_option; int i, j; - gchar *conflicts; + char *conflicts; ppd_const_t *constraint; const char *choice, *other_choice; ppd_option_t *option1, *option2; @@ -4919,7 +4919,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS static GtkPrinterOption * create_pickone_option (ppd_file_t *ppd_file, ppd_option_t *ppd_option, - const gchar *gtk_name) + const char *gtk_name) { GtkPrinterOption *option; ppd_choice_t **available; @@ -5045,7 +5045,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS static GtkPrinterOption * create_boolean_option (ppd_file_t *ppd_file, ppd_option_t *ppd_option, - const gchar *gtk_name) + const char *gtk_name) { GtkPrinterOption *option; ppd_choice_t **available; @@ -5081,8 +5081,8 @@ create_boolean_option (ppd_file_t *ppd_file, return option; } -static gchar * -get_ppd_option_name (const gchar *keyword) +static char * +get_ppd_option_name (const char *keyword) { int i; @@ -5093,8 +5093,8 @@ get_ppd_option_name (const gchar *keyword) return g_strdup_printf ("cups-%s", keyword); } -static gchar * -get_lpoption_name (const gchar *lpoption) +static char * +get_lpoption_name (const char *lpoption) { int i; @@ -5120,8 +5120,8 @@ strptr_cmp (const void *a, static gboolean -string_in_table (const gchar *str, - const gchar *table[], +string_in_table (const char *str, + const char *table[], int table_len) { return bsearch (&str, table, table_len, sizeof (char *), (void *)strptr_cmp) != NULL; @@ -5208,7 +5208,7 @@ handle_group (GtkPrinterOptionSet *set, GtkPrintSettings *settings) { int i; - const gchar *name; + const char *name; /* Ignore installable options */ name = ppd_group_name (toplevel_group); @@ -5244,9 +5244,9 @@ colord_printer_option_set_changed_cb (GtkPrinterOptionSet *set, * Lookup translation and GTK name of given IPP option name. */ static gboolean -get_ipp_option_translation (const gchar *ipp_option_name, - gchar **gtk_option_name, - gchar **translation) +get_ipp_option_translation (const char *ipp_option_name, + char **gtk_option_name, + char **translation) { int i; @@ -5271,15 +5271,15 @@ get_ipp_option_translation (const gchar *ipp_option_name, /* * Lookup translation of given IPP choice. */ -static gchar * -get_ipp_choice_translation (const gchar *ipp_option_name, - const gchar *ipp_choice) +static char * +get_ipp_choice_translation (const char *ipp_option_name, + const char *ipp_choice) { - const gchar *nptr; + const char *nptr; guint64 index; - gchar *translation = NULL; + char *translation = NULL; gsize ipp_choice_length; - gchar *endptr; + char *endptr; int i; for (i = 0; ipp_choice_translations[i].ipp_option_name != NULL; i++) @@ -5322,11 +5322,11 @@ get_ipp_choice_translation (const gchar *ipp_option_name, /* * Format an IPP choice to a displayable string. */ -static gchar * -format_ipp_choice (const gchar *ipp_choice) +static char * +format_ipp_choice (const char *ipp_choice) { gboolean after_space = TRUE; - gchar *result = NULL; + char *result = NULL; gsize i; if (ipp_choice != NULL) @@ -5362,9 +5362,9 @@ setup_ipp_option (const char *ipp_option_name, GtkPrinterOptionSet *set) { GtkPrinterOption *option = NULL; - gchar *gtk_option_name = NULL; - gchar *translation = NULL; - gchar *ipp_choice; + char *gtk_option_name = NULL; + char *translation = NULL; + char *ipp_choice; gsize i; get_ipp_option_translation (ipp_option_name, @@ -5396,7 +5396,7 @@ setup_ipp_option (const char *ipp_option_name, i = 0; for (iter = ipp_choices; iter != NULL; iter = iter->next) { - ipp_choice = (gchar *) iter->data; + ipp_choice = (char *) iter->data; choices[i] = g_strdup (ipp_choice); @@ -5590,7 +5590,7 @@ cups_printer_get_options (GtkPrinter *printer, } for (i = 0; i < num_of_covers; i++) - cover_display_translated[i] = (gchar *)g_dpgettext2 (GETTEXT_PACKAGE, "cover page", cover_display[i]); + cover_display_translated[i] = (char *)g_dpgettext2 (GETTEXT_PACKAGE, "cover page", cover_display[i]); /* Translators, this is the label used for the option in the print * dialog that controls the front cover page. @@ -5653,7 +5653,7 @@ cups_printer_get_options (GtkPrinter *printer, { GtkPaperSize *paper_size; ppd_option_t *ppd_option; - const gchar *ppd_name; + const char *ppd_name; G_GNUC_BEGIN_IGNORE_DEPRECATIONS @@ -5673,7 +5673,7 @@ cups_printer_get_options (GtkPrinter *printer, } else { - gchar *custom_name; + char *custom_name; char width[G_ASCII_DTOSTR_BUF_SIZE]; char height[G_ASCII_DTOSTR_BUF_SIZE]; @@ -5731,7 +5731,7 @@ cups_printer_get_options (GtkPrinter *printer, name = get_lpoption_name (opts[i].name); if (strcmp (name, "cups-job-sheets") == 0) { - gchar **values; + char **values; int num_values; values = g_strsplit (opts[i].value, ",", 2); @@ -5955,9 +5955,9 @@ map_settings_to_option (GtkPrinterOption *option, const NameMapping table[], int n_elements, GtkPrintSettings *settings, - const gchar *standard_name, - const gchar *cups_name, - const gchar *ipp_name) + const char *standard_name, + const char *cups_name, + const char *ipp_name) { int i; char *name; @@ -6014,13 +6014,13 @@ map_settings_to_option (GtkPrinterOption *option, } static void -map_option_to_settings (const gchar *value, +map_option_to_settings (const char *value, const NameMapping table[], int n_elements, GtkPrintSettings *settings, - const gchar *standard_name, - const gchar *cups_name, - const gchar *ipp_name, + const char *standard_name, + const char *cups_name, + const char *ipp_name, gboolean is_ipp_option) { int i; @@ -6316,7 +6316,7 @@ supports_am_pm (void) * Returns a newly allocated string holding UTC time in HH:MM:SS format * or NULL. */ -static gchar * +static char * localtime_to_utctime (const char *local_time) { const char *formats_0[] = {" %I : %M : %S %p ", " %p %I : %M : %S ", @@ -6331,7 +6331,7 @@ localtime_to_utctime (const char *local_time) struct tm local_print_time; struct tm utc_print_time; struct tm diff_time; - gchar *utc_time = NULL; + char *utc_time = NULL; int i, n; if (local_time == NULL || local_time[0] == '\0') @@ -6411,7 +6411,7 @@ cups_printer_get_settings_from_options (GtkPrinter *printer, if (strcmp (print_at, "at") == 0) { - gchar *utc_time = NULL; + char *utc_time = NULL; utc_time = localtime_to_utctime (print_at_time); @@ -6612,7 +6612,7 @@ create_page_setup (ppd_file_t *ppd_file, } static GtkPageSetup * -create_page_setup_from_media (gchar *media, +create_page_setup_from_media (char *media, MediaSize *media_size, gboolean media_margin_default_set, int media_bottom_margin_default, @@ -6675,7 +6675,7 @@ cups_printer_list_papers (GtkPrinter *printer) MediaSize *media_size; GList *media_iter; GList *media_size_iter; - gchar *media; + char *media; for (media_iter = cups_printer->media_supported, media_size_iter = cups_printer->media_size_supported; @@ -6683,7 +6683,7 @@ cups_printer_list_papers (GtkPrinter *printer) media_iter = media_iter->next, media_size_iter = media_size_iter->next) { - media = (gchar *) media_iter->data; + media = (char *) media_iter->data; media_size = (MediaSize *) media_size_iter->data; page_setup = create_page_setup_from_media (media, @@ -6734,7 +6734,7 @@ cups_printer_get_default_page_size (GtkPrinter *printer) MediaSize *media_size; GList *media_iter; GList *media_size_iter; - gchar *media; + char *media; for (media_iter = cups_printer->media_supported, media_size_iter = cups_printer->media_size_supported; @@ -6742,7 +6742,7 @@ cups_printer_get_default_page_size (GtkPrinter *printer) media_iter = media_iter->next, media_size_iter = media_size_iter->next) { - media = (gchar *) media_iter->data; + media = (char *) media_iter->data; media_size = (MediaSize *) media_size_iter->data; if (g_strcmp0 (cups_printer->media_default, media) == 0) @@ -6803,7 +6803,7 @@ cups_printer_get_hard_margins_for_paper_size (GtkPrinter *printer, { ppd_file_t *ppd_file; ppd_size_t *size; - const gchar *paper_name; + const char *paper_name; int i; ppd_file = gtk_printer_cups_get_ppd (GTK_PRINTER_CUPS (printer)); @@ -6866,8 +6866,8 @@ cups_printer_get_capabilities (GtkPrinter *printer) static void secrets_service_appeared_cb (GDBusConnection *connection, - const gchar *name, - const gchar *name_owner, + const char *name, + const char *name_owner, gpointer user_data) { GtkPrintBackendCups *backend = GTK_PRINT_BACKEND_CUPS (user_data); @@ -6877,7 +6877,7 @@ secrets_service_appeared_cb (GDBusConnection *connection, static void secrets_service_vanished_cb (GDBusConnection *connection, - const gchar *name, + const char *name, gpointer user_data) { GtkPrintBackendCups *backend = GTK_PRINT_BACKEND_CUPS (user_data); diff --git a/modules/printbackends/gtkprintbackendfile.c b/modules/printbackends/gtkprintbackendfile.c index 79100603bc..4e0691702e 100644 --- a/modules/printbackends/gtkprintbackendfile.c +++ b/modules/printbackends/gtkprintbackendfile.c @@ -65,7 +65,7 @@ typedef enum N_FORMATS } OutputFormat; -static const gchar* formats[N_FORMATS] = +static const char * formats[N_FORMATS] = { "pdf", "ps", @@ -171,7 +171,7 @@ gtk_print_backend_file_class_finalize (GtkPrintBackendFileClass *class) static OutputFormat format_from_settings (GtkPrintSettings *settings) { - const gchar *value; + const char *value; int i; if (settings == NULL) @@ -191,19 +191,19 @@ format_from_settings (GtkPrintSettings *settings) return (OutputFormat) i; } -static gchar * +static char * output_file_from_settings (GtkPrintSettings *settings, - const gchar *default_format) + const char *default_format) { - gchar *uri = NULL; + char *uri = NULL; if (settings) uri = g_strdup (gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_OUTPUT_URI)); if (uri == NULL) { - const gchar *extension, *basename = NULL, *output_dir = NULL; - gchar *name, *locale_name, *path; + const char *extension, *basename = NULL, *output_dir = NULL; + char *name, *locale_name, *path; if (default_format) extension = default_format; @@ -244,11 +244,11 @@ output_file_from_settings (GtkPrintSettings *settings, output_dir = gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_OUTPUT_DIR); if (output_dir == NULL) { - const gchar *document_dir = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS); + const char *document_dir = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS); if (document_dir == NULL) { - gchar *current_dir = g_get_current_dir (); + char *current_dir = g_get_current_dir (); path = g_build_filename (current_dir, locale_name, NULL); g_free (current_dir); } @@ -289,7 +289,7 @@ _cairo_write (void *closure, { GIOStatus status; - status = g_io_channel_write_chars (io, (const gchar *) data, length, &written, &error); + status = g_io_channel_write_chars (io, (const char *) data, length, &written, &error); if (status == G_IO_STATUS_ERROR) { @@ -368,7 +368,7 @@ file_print_cb (GtkPrintBackendFile *print_backend, GError *error, gpointer user_data) { - gchar *uri; + char *uri; _PrintStreamData *ps = (_PrintStreamData *) user_data; GtkRecentManager *recent_manager; @@ -403,7 +403,7 @@ file_write (GIOChannel *source, GIOCondition con, gpointer user_data) { - gchar buf[_STREAM_MAX_CHUNK_SIZE]; + char buf[_STREAM_MAX_CHUNK_SIZE]; gsize bytes_read; GError *error; GIOStatus read_status; @@ -462,7 +462,7 @@ gtk_print_backend_file_print_stream (GtkPrintBackend *print_backend, GError *internal_error = NULL; _PrintStreamData *ps; GtkPrintSettings *settings; - gchar *uri; + char *uri; GFile *file = NULL; settings = gtk_print_job_get_settings (job); @@ -534,7 +534,7 @@ set_printer_format_from_option_set (GtkPrinter *printer, GtkPrinterOptionSet *set) { GtkPrinterOption *format_option; - const gchar *value; + const char *value; int i; format_option = gtk_printer_option_set_lookup (set, "output-file-format"); @@ -574,7 +574,7 @@ file_printer_output_file_format_changed (GtkPrinterOption *format_option, gpointer user_data) { GtkPrinterOption *uri_option; - gchar *base = NULL; + char *base = NULL; _OutputFormatChangedData *data = (_OutputFormatChangedData *) user_data; if (! format_option->value) @@ -585,8 +585,8 @@ file_printer_output_file_format_changed (GtkPrinterOption *format_option, if (uri_option && uri_option->value) { - const gchar *uri = uri_option->value; - const gchar *dot = strrchr (uri, '.'); + const char *uri = uri_option->value; + const char *dot = strrchr (uri, '.'); if (dot) { @@ -614,7 +614,7 @@ file_printer_output_file_format_changed (GtkPrinterOption *format_option, if (base) { - gchar *tmp = g_strdup_printf ("%s.%s", base, format_option->value); + char *tmp = g_strdup_printf ("%s.%s", base, format_option->value); gtk_printer_option_set (uri_option, tmp); g_free (tmp); diff --git a/modules/printbackends/gtkprintbackendlpr.c b/modules/printbackends/gtkprintbackendlpr.c index b78cc6b2e6..1e8e0e3550 100644 --- a/modules/printbackends/gtkprintbackendlpr.c +++ b/modules/printbackends/gtkprintbackendlpr.c @@ -160,7 +160,7 @@ _cairo_write (void *closure, while (length > 0) { - g_io_channel_write_chars (io, (const gchar*)data, length, &written, &error); + g_io_channel_write_chars (io, (const char *)data, length, &written, &error); if (error != NULL) { @@ -240,7 +240,7 @@ lpr_write (GIOChannel *source, GIOCondition con, gpointer user_data) { - gchar buf[_LPR_MAX_CHUNK_SIZE]; + char buf[_LPR_MAX_CHUNK_SIZE]; gsize bytes_read; GError *error; GIOStatus status; @@ -305,7 +305,7 @@ gtk_print_backend_lpr_print_stream (GtkPrintBackend *print_backend, GtkPrintSettings *settings; int argc; int in_fd; - gchar **argv = NULL; + char **argv = NULL; const char *cmd_line; settings = gtk_print_job_get_settings (job); diff --git a/modules/printbackends/gtkprintercloudprint.c b/modules/printbackends/gtkprintercloudprint.c index 4f299fdcab..306aa6360d 100644 --- a/modules/printbackends/gtkprintercloudprint.c +++ b/modules/printbackends/gtkprintercloudprint.c @@ -43,7 +43,7 @@ struct _GtkPrinterCloudprint GtkPrinter parent_instance; GtkCloudprintAccount *account; - gchar *id; + char *id; }; enum { @@ -109,7 +109,7 @@ gtk_printer_cloudprint_new (const char *name, gboolean is_virtual, GtkPrintBackend *backend, GtkCloudprintAccount *account, - const gchar *id) + const char *id) { return g_object_new (GTK_TYPE_PRINTER_CLOUDPRINT, "name", name, diff --git a/modules/printbackends/gtkprintercloudprint.h b/modules/printbackends/gtkprintercloudprint.h index 9443039e27..0d44caabe9 100644 --- a/modules/printbackends/gtkprintercloudprint.h +++ b/modules/printbackends/gtkprintercloudprint.h @@ -35,7 +35,7 @@ GtkPrinterCloudprint *gtk_printer_cloudprint_new (const char *name, gboolean is_virtual, GtkPrintBackend *backend, GtkCloudprintAccount *account, - const gchar *id); + const char *id); GType gtk_printer_cloudprint_get_type (void) G_GNUC_CONST; G_END_DECLS diff --git a/modules/printbackends/gtkprintercups.c b/modules/printbackends/gtkprintercups.c index e50dcf7d98..83d2b0aabd 100644 --- a/modules/printbackends/gtkprintercups.c +++ b/modules/printbackends/gtkprintercups.c @@ -259,7 +259,7 @@ gtk_printer_cups_get_property (GObject *object, static void colord_update_ui_from_settings (GtkPrinterCups *printer) { - const gchar *title = NULL; + const char *title = NULL; /* not yet connected to colord */ if (printer->colord_client == NULL) @@ -373,10 +373,10 @@ gtk_printer_cups_update_settings (GtkPrinterCups *printer, GtkPrintSettings *settings, GtkPrinterOptionSet *set) { - gchar *qualifier = NULL; - gchar **qualifiers = NULL; + char *qualifier = NULL; + char **qualifiers = NULL; GtkPrinterOption *option; - const gchar *format[3]; + const char *format[3]; /* nothing set yet */ if (printer->colord_device == NULL) @@ -420,7 +420,7 @@ gtk_printer_cups_update_settings (GtkPrinterCups *printer, qualifiers = g_strsplit (qualifier, ",", -1); cd_device_get_profile_for_qualifiers (printer->colord_device, - (const gchar **) qualifiers, + (const char **) qualifiers, printer->colord_cancellable, colord_client_device_get_profile_for_qualifiers_cb, g_object_ref (printer)); @@ -497,7 +497,7 @@ out: static void colord_update_device (GtkPrinterCups *printer) { - gchar *colord_device_id = NULL; + char *colord_device_id = NULL; /* not yet connected to the daemon */ if (!cd_client_get_connected (printer->colord_client)) @@ -640,10 +640,10 @@ gtk_printer_cups_get_ppd (GtkPrinterCups *printer) return printer->ppd_file; } -const gchar * +const char * gtk_printer_cups_get_ppd_name (GtkPrinterCups *printer) { - const gchar *result; + const char *result; result = printer->ppd_name; diff --git a/modules/printbackends/gtkprintercups.h b/modules/printbackends/gtkprintercups.h index af759b0235..83109b24cd 100644 --- a/modules/printbackends/gtkprintercups.h +++ b/modules/printbackends/gtkprintercups.h @@ -47,23 +47,23 @@ struct _GtkPrinterCups { GtkPrinter parent_instance; - gchar *device_uri; - gchar *original_device_uri; - gchar *printer_uri; - gchar *hostname; + char *device_uri; + char *original_device_uri; + char *printer_uri; + char *hostname; int port; - gchar **auth_info_required; - gchar *original_hostname; - gchar *original_resource; + char **auth_info_required; + char *original_hostname; + char *original_resource; int original_port; gboolean request_original_uri; /* Request PPD from original host */ ipp_pstate_t state; gboolean reading_ppd; - gchar *ppd_name; + char *ppd_name; ppd_file_t *ppd_file; - gchar *media_default; + char *media_default; GList *media_supported; GList *media_size_supported; int media_bottom_margin_default; @@ -71,13 +71,13 @@ struct _GtkPrinterCups int media_left_margin_default; int media_right_margin_default; gboolean media_margin_default_set; - gchar *sides_default; + char *sides_default; GList *sides_supported; - gchar *output_bin_default; + char *output_bin_default; GList *output_bin_supported; - gchar *default_cover_before; - gchar *default_cover_after; + char *default_cover_before; + char *default_cover_after; int default_number_up; @@ -91,8 +91,8 @@ struct _GtkPrinterCups CdDevice *colord_device; CdProfile *colord_profile; GCancellable *colord_cancellable; - gchar *colord_title; - gchar *colord_qualifier; + char *colord_title; + char *colord_qualifier; #endif gboolean avahi_browsed; @@ -122,7 +122,7 @@ GtkPrinterCups *gtk_printer_cups_new (const char *name, GtkPrintBackend *backend, gpointer colord_client); ppd_file_t *gtk_printer_cups_get_ppd (GtkPrinterCups *printer); -const gchar *gtk_printer_cups_get_ppd_name (GtkPrinterCups *printer); +const char *gtk_printer_cups_get_ppd_name (GtkPrinterCups *printer); #ifdef HAVE_COLORD void gtk_printer_cups_update_settings (GtkPrinterCups *printer, diff --git a/tests/listmodel.c b/tests/listmodel.c index 8c3320842b..b4a2864dbf 100644 --- a/tests/listmodel.c +++ b/tests/listmodel.c @@ -13,7 +13,7 @@ typedef struct { GObject parent; - gchar *label; + char *label; int id; } MyObject; @@ -132,7 +132,7 @@ add_some (GtkButton *button, GListStore *store) int n, i; guint n_items; GObject *obj; - gchar *label; + char *label; for (n = 0; n < 50; n++) { @@ -178,7 +178,7 @@ main (int argc, char *argv[]) for (i = 0; i < 100; i++) { MyObject *obj; - gchar *label; + char *label; label = g_strdup_printf ("item %d", i); obj = g_object_new (my_object_get_type (), diff --git a/tests/overlayscroll.c b/tests/overlayscroll.c index c3b595bb74..35ad08e5fd 100644 --- a/tests/overlayscroll.c +++ b/tests/overlayscroll.c @@ -18,7 +18,7 @@ #include #include -static gchar * +static char * get_content (void) { GString *s; @@ -54,7 +54,7 @@ int main (int argc, char *argv[]) { GtkWidget *window; - gchar *content; + char *content; GtkWidget *box; GtkWidget *sw; GtkWidget *tv; diff --git a/tests/syncscroll.c b/tests/syncscroll.c index d42fc9b8f5..5d724dca64 100644 --- a/tests/syncscroll.c +++ b/tests/syncscroll.c @@ -1,7 +1,7 @@ #include static void -fill_text_view (GtkWidget *tv, const gchar *text) +fill_text_view (GtkWidget *tv, const char *text) { int i; GString *s; diff --git a/tests/testaccel.c b/tests/testaccel.c index a74a081e40..3fde8a5d5e 100644 --- a/tests/testaccel.c +++ b/tests/testaccel.c @@ -117,7 +117,7 @@ key_test (void) } int -main (int argc, gchar **argv) +main (int argc, char **argv) { GtkWidget *dialog; diff --git a/tests/testappchooser.c b/tests/testappchooser.c index f398694d0e..f5abdde70c 100644 --- a/tests/testappchooser.c +++ b/tests/testappchooser.c @@ -34,7 +34,7 @@ dialog_response (GtkDialog *d, gpointer user_data) { GAppInfo *app_info; - const gchar *name; + const char *name; g_print ("Response: %d\n", response_id); @@ -79,7 +79,7 @@ static void prepare_dialog (void) { gboolean use_file = FALSE; - gchar *content_type = NULL; + char *content_type = NULL; if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio_file))) use_file = TRUE; @@ -183,7 +183,7 @@ int main (int argc, char **argv) { GtkWidget *w1; - gchar *path; + char *path; gboolean done = FALSE; gtk_init (); diff --git a/tests/testappchooserbutton.c b/tests/testappchooserbutton.c index 1cc98923d9..9024b51dfa 100644 --- a/tests/testappchooserbutton.c +++ b/tests/testappchooserbutton.c @@ -45,7 +45,7 @@ combo_changed_cb (GtkAppChooserButton *chooser_button, static void special_item_activated_cb (GtkAppChooserButton *b, - const gchar *item_name, + const char *item_name, gpointer user_data) { gtk_image_set_from_gicon (GTK_IMAGE (sel_image), g_themed_icon_new ("face-smile")); @@ -54,7 +54,7 @@ special_item_activated_cb (GtkAppChooserButton *b, static void action_cb (GtkAppChooserButton *b, - const gchar *item_name, + const char *item_name, gpointer user_data) { g_print ("Activated custom item %s\n", item_name); diff --git a/tests/testassistant.c b/tests/testassistant.c index 00b1674d52..0d0d88259a 100644 --- a/tests/testassistant.c +++ b/tests/testassistant.c @@ -24,7 +24,7 @@ #include static GtkWidget* -get_test_page (const gchar *text) +get_test_page (const char *text) { return gtk_label_new (text); } @@ -50,7 +50,7 @@ complete_cb (GtkWidget *check, static GtkWidget * add_completion_test_page (GtkWidget *assistant, - const gchar *text, + const char *text, gboolean visible, gboolean complete) { @@ -315,10 +315,10 @@ create_generous_assistant (GtkWidget *widget) } } -static gchar selected_branch = 'A'; +static char selected_branch = 'A'; static void -select_branch (GtkWidget *widget, gchar branch) +select_branch (GtkWidget *widget, char branch) { selected_branch = branch; } @@ -572,7 +572,7 @@ static void flip_pages (GtkButton *button, GtkAssistant *assistant) { GtkWidget *page; - gchar *title; + char *title; page = gtk_assistant_get_nth_page (assistant, 1); @@ -677,7 +677,7 @@ quit_cb (GtkWidget *widget, } int -main (int argc, gchar *argv[]) +main (int argc, char *argv[]) { GtkWidget *window, *box, *button; int i; diff --git a/tests/testbaseline.c b/tests/testbaseline.c index d5fe781876..32915a6972 100644 --- a/tests/testbaseline.c +++ b/tests/testbaseline.c @@ -61,7 +61,7 @@ image_size_value_changed (GtkSpinButton *spin_button, static void set_font_size (GtkWidget *widget, int size) { - const gchar *class[3] = { "small-font", "medium-font", "large-font" }; + const char *class[3] = { "small-font", "medium-font", "large-font" }; gtk_widget_add_css_class (widget, class[size]); } diff --git a/tests/testcalendar.c b/tests/testcalendar.c index 2610a86688..d9f5722b1c 100644 --- a/tests/testcalendar.c +++ b/tests/testcalendar.c @@ -67,7 +67,7 @@ static void calendar_set_signal_strings (char *sig_str, CalendarData *data) { - const gchar *prev_sig; + const char *prev_sig; prev_sig = gtk_label_get_text (GTK_LABEL (data->prev_sig)); gtk_label_set_text (GTK_LABEL (data->prev2_sig), prev_sig); diff --git a/tests/testcellarea.c b/tests/testcellarea.c index 6c66daa98a..c86eb75276 100644 --- a/tests/testcellarea.c +++ b/tests/testcellarea.c @@ -298,7 +298,7 @@ focus_list_model (void) static void cell_toggled (GtkCellRendererToggle *cell_renderer, - const gchar *path, + const char *path, GtkIconView *iconview) { GtkTreeModel *model = gtk_icon_view_get_model (iconview); @@ -316,8 +316,8 @@ cell_toggled (GtkCellRendererToggle *cell_renderer, static void cell_edited (GtkCellRendererToggle *cell_renderer, - const gchar *path, - const gchar *new_text, + const char *path, + const char *new_text, GtkIconView *iconview) { GtkTreeModel *model = gtk_icon_view_get_model (iconview); diff --git a/tests/testcolumnview.c b/tests/testcolumnview.c index 51acea59ff..95d298c223 100644 --- a/tests/testcolumnview.c +++ b/tests/testcolumnview.c @@ -129,7 +129,7 @@ row_data_update_info (RowData *data, static void copy_attribute (GFileInfo *to, GFileInfo *from, - const gchar *attribute) + const char *attribute) { GFileAttributeType type; gpointer value; diff --git a/tests/testcombo.c b/tests/testcombo.c index fd1099c3df..21794045df 100644 --- a/tests/testcombo.c +++ b/tests/testcombo.c @@ -941,7 +941,7 @@ main (int argc, char **argv) GtkTreePath *path; GtkTreeIter iter; GtkCellArea *area; - gchar *text; + char *text; int i; gboolean done = FALSE; diff --git a/tests/testdialog.c b/tests/testdialog.c index 75027b3c9b..660912cf00 100644 --- a/tests/testdialog.c +++ b/tests/testdialog.c @@ -202,7 +202,7 @@ my_dialog_init (MyDialog *dialog) static void my_dialog_class_init (MyDialogClass *class) { - gchar *buffer; + char *buffer; gsize size; GBytes *bytes; @@ -271,7 +271,7 @@ my_dialog2_init (MyDialog2 *dialog) static void my_dialog2_class_init (MyDialog2Class *class) { - gchar *buffer; + char *buffer; gsize size; GBytes *bytes; diff --git a/tests/testdnd2.c b/tests/testdnd2.c index a393bd9393..591d12fe53 100644 --- a/tests/testdnd2.c +++ b/tests/testdnd2.c @@ -326,7 +326,7 @@ drag_cancel (GtkDragSource *source, } static GtkWidget * -make_image (const gchar *icon_name, int hotspot) +make_image (const char *icon_name, int hotspot) { GtkWidget *image; GtkDragSource *source; diff --git a/tests/testentrycompletion.c b/tests/testentrycompletion.c index 37473a6b79..a62b40978d 100644 --- a/tests/testentrycompletion.c +++ b/tests/testentrycompletion.c @@ -157,11 +157,11 @@ create_completion_model (void) static gboolean match_func (GtkEntryCompletion *completion, - const gchar *key, + const char *key, GtkTreeIter *iter, gpointer user_data) { - gchar *item = NULL; + char *item = NULL; GtkTreeModel *model; gboolean ret = FALSE; @@ -266,7 +266,7 @@ match_selected_cb (GtkEntryCompletion *completion, GtkTreeModel *model, GtkTreeIter *iter) { - gchar *str; + char *str; GtkWidget *entry; entry = gtk_entry_completion_get_entry (completion); diff --git a/tests/testerrors.c b/tests/testerrors.c index 6e92026160..ecdf3c2725 100644 --- a/tests/testerrors.c +++ b/tests/testerrors.c @@ -129,7 +129,7 @@ test_error_trapping (GdkDisplay *gdk_display) } int -main (int argc, gchar *argv[]) +main (int argc, char *argv[]) { GdkDisplay *gdk_display; GdkDisplay *extra_display; diff --git a/tests/testfilechooserbutton.c b/tests/testfilechooserbutton.c index 01844b112c..239790c8af 100644 --- a/tests/testfilechooserbutton.c +++ b/tests/testfilechooserbutton.c @@ -39,7 +39,7 @@ static GOptionEntry entries[] = { { NULL } }; -static gchar *gtk_src_dir = NULL; +static char *gtk_src_dir = NULL; static void print_selected_path_clicked_cb (GtkWidget *button, @@ -165,8 +165,8 @@ chooser_selection_changed_cb (GtkFileChooser *chooser, } static void -add_new_filechooser_button (const gchar *mnemonic, - const gchar *chooser_title, +add_new_filechooser_button (const char *mnemonic, + const char *chooser_title, GtkFileChooserAction action, GtkWidget *group_box, GtkSizeGroup *label_group) @@ -219,7 +219,7 @@ main (int argc, GtkWidget *win, *vbox, *frame, *group_box; GtkSizeGroup *label_group; GOptionContext *context; - gchar *cwd; + char *cwd; gboolean done = FALSE; context = g_option_context_new ("- test GtkFileChooserButton widget"); diff --git a/tests/testflowbox.c b/tests/testflowbox.c index 727e16708b..f2841bf301 100644 --- a/tests/testflowbox.c +++ b/tests/testflowbox.c @@ -44,7 +44,7 @@ populate_flowbox_simple (GtkFlowBox *flowbox) for (i = 0; i < N_ITEMS; i++) { - gchar *text = g_strdup_printf ("Item %02d", i); + char *text = g_strdup_printf ("Item %02d", i); widget = gtk_label_new (text); frame = gtk_frame_new (NULL); @@ -127,7 +127,7 @@ populate_flowbox_wrappy (GtkFlowBox *flowbox) GtkWidget *widget, *frame; int i; - const gchar *strings[] = { + const char *strings[] = { "These are", "some wrappy label", "texts", "of various", "lengths.", "They should always be", "shown", "consecutively. Except it's", "hard to say", "where exactly the", "label", "will wrap", "and where exactly", @@ -160,7 +160,7 @@ populate_flowbox_images (GtkFlowBox *flowbox) for (i = 0; i < N_ITEMS; i++) { - gchar *text = g_strdup_printf ("Item %02d", i); + char *text = g_strdup_printf ("Item %02d", i); widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); gtk_widget_set_hexpand (widget, TRUE); @@ -343,10 +343,10 @@ sort_func (GtkFlowBoxChild *a, GtkFlowBoxChild *b, gpointer data) { - gchar *ida, *idb; + char *ida, *idb; - ida = (gchar *)g_object_get_data (G_OBJECT (gtk_flow_box_child_get_child (a)), "id"); - idb = (gchar *)g_object_get_data (G_OBJECT (gtk_flow_box_child_get_child (b)), "id"); + ida = (char *)g_object_get_data (G_OBJECT (gtk_flow_box_child_get_child (a)), "id"); + idb = (char *)g_object_get_data (G_OBJECT (gtk_flow_box_child_get_child (b)), "id"); return g_strcmp0 (ida, idb); } diff --git a/tests/testfontchooserdialog.c b/tests/testfontchooserdialog.c index 7d3a88af0e..6b1f894b26 100644 --- a/tests/testfontchooserdialog.c +++ b/tests/testfontchooserdialog.c @@ -59,7 +59,7 @@ notify_preview_text_cb (GObject *fontchooser, GParamSpec *pspec, gpointer data) } static void -font_activated_cb (GtkFontChooser *chooser, const gchar *font_name, gpointer data) +font_activated_cb (GtkFontChooser *chooser, const char *font_name, gpointer data) { g_debug ("font-activated: %s", font_name); } diff --git a/tests/testgmenu.c b/tests/testgmenu.c index c4f9639139..0db92d6577 100644 --- a/tests/testgmenu.c +++ b/tests/testgmenu.c @@ -32,7 +32,7 @@ /* The example menu {{{1 */ -static const gchar menu_markup[] = +static const char menu_markup[] = "\n" "\n" "
\n" @@ -199,7 +199,7 @@ enabled_cell_func (GtkTreeViewColumn *column, gpointer data) { GActionGroup *group = data; - gchar *name; + char *name; gboolean enabled; gtk_tree_model_get (model, iter, 0, &name, -1); @@ -217,7 +217,7 @@ state_cell_func (GtkTreeViewColumn *column, gpointer data) { GActionGroup *group = data; - gchar *name; + char *name; GVariant *state; gtk_tree_model_get (model, iter, 0, &name, -1); @@ -251,12 +251,12 @@ state_cell_func (GtkTreeViewColumn *column, static void enabled_cell_toggled (GtkCellRendererToggle *cell, - const gchar *path_str, + const char *path_str, GtkTreeModel *model) { GActionGroup *group; GAction *action; - gchar *name; + char *name; GtkTreePath *path; GtkTreeIter iter; gboolean enabled; @@ -278,12 +278,12 @@ enabled_cell_toggled (GtkCellRendererToggle *cell, static void state_cell_toggled (GtkCellRendererToggle *cell, - const gchar *path_str, + const char *path_str, GtkTreeModel *model) { GActionGroup *group; GAction *action; - gchar *name; + char *name; GtkTreePath *path; GtkTreeIter iter; GVariant *state; @@ -317,13 +317,13 @@ state_cell_toggled (GtkCellRendererToggle *cell, static void state_cell_edited (GtkCellRendererCombo *cell, - const gchar *path_str, - const gchar *new_text, + const char *path_str, + const char *new_text, GtkTreeModel *model) { GActionGroup *group; GAction *action; - gchar *name; + char *name; GtkTreePath *path; GtkTreeIter iter; @@ -349,7 +349,7 @@ create_action_treeview (GActionGroup *group) GtkTreeIter iter; GtkTreeViewColumn *column; GtkCellRenderer *cell; - gchar **group_actions; + char **group_actions; int i; store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); @@ -438,7 +438,7 @@ toggle_sumerian (GtkToggleButton *button, gpointer data) static void action_list_add (GtkTreeModel *store, - const gchar *action) + const char *action) { GtkTreeIter iter; @@ -448,10 +448,10 @@ action_list_add (GtkTreeModel *store, static void action_list_remove (GtkTreeModel *store, - const gchar *action) + const char *action) { GtkTreeIter iter; - gchar *text; + char *text; gtk_tree_model_get_iter_first (store, &iter); do { diff --git a/tests/testgrid.c b/tests/testgrid.c index 690b7eb94c..bb9a4ce829 100644 --- a/tests/testgrid.c +++ b/tests/testgrid.c @@ -1,12 +1,12 @@ #include static GtkWidget * -oriented_test_widget (const gchar *label, const gchar *color) +oriented_test_widget (const char *label, const char *color) { GtkWidget *box; GtkWidget *widget; GtkCssProvider *provider; - gchar *data; + char *data; widget = gtk_label_new (label); box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); @@ -24,7 +24,7 @@ oriented_test_widget (const gchar *label, const gchar *color) } static GtkWidget * -test_widget (const gchar *label, const gchar *color) +test_widget (const char *label, const char *color) { return oriented_test_widget (label, color); } @@ -277,7 +277,7 @@ scrolling (void) for (i = 1; i < 16; i++) { - gchar *color; + char *color; color = g_strdup_printf ("#%02x00%02x", 128 + 8*i, 128 - 8*i); child = test_widget (color, color); gtk_grid_attach (GTK_GRID (grid), child, 0, i, i + 1, 1); @@ -287,7 +287,7 @@ scrolling (void) for (i = 1; i < 16; i++) { - gchar *color; + char *color; color = g_strdup_printf ("#%02x00%02x", 128 - 8*i, 128 + 8*i); child = oriented_test_widget (color, color); gtk_grid_attach (GTK_GRID (grid), child, i, 0, 1, i); diff --git a/tests/testgtk.c b/tests/testgtk.c index 674274908e..310f59ab71 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -632,7 +632,7 @@ static void statusbar_push (GtkWidget *button, GtkStatusbar *statusbar) { - gchar text[1024]; + char text[1024]; sprintf (text, "something %d", statusbar_counter++); @@ -643,7 +643,7 @@ static void statusbar_push_long (GtkWidget *button, GtkStatusbar *statusbar) { - gchar text[1024]; + char text[1024]; sprintf (text, "Just because a system has menu choices written with English words, phrases or sentences, that is no guarantee, that it is comprehensible. Individual words may not be familiar to some users (for example, \"repaginate\"), and two menu items may appear to satisfy the users's needs, whereas only one does (for example, \"put away\" or \"eject\")."); @@ -667,7 +667,7 @@ statusbar_steal (GtkWidget *button, static void statusbar_popped (GtkStatusbar *statusbar, guint context_id, - const gchar *text) + const char *text) { if (!text) statusbar_counter = 1; @@ -867,7 +867,7 @@ create_selectable_control (GtkWidget *widget) static void dialog_response (GtkWidget *dialog, int response_id, GtkLabel *label) { - const gchar *text; + const char *text; gtk_window_destroy (GTK_WINDOW (dialog)); @@ -879,7 +879,7 @@ dialog_response (GtkWidget *dialog, int response_id, GtkLabel *label) } static gboolean -activate_link (GtkWidget *label, const gchar *uri, gpointer data) +activate_link (GtkWidget *label, const char *uri, gpointer data) { if (g_strcmp0 (uri, "keynav") == 0) { @@ -1079,7 +1079,7 @@ on_rotated_text_draw (GtkDrawingArea *drawing_area, int height, gpointer tile_pixbuf) { - static const gchar *words[] = { "The", "grand", "old", "Duke", "of", "York", + static const char *words[] = { "The", "grand", "old", "Duke", "of", "York", "had", "10,000", "men" }; int n_words; int i; @@ -1362,7 +1362,7 @@ create_tooltips (GtkWidget *widget) static void pack_image (GtkWidget *box, - const gchar *text, + const char *text, GtkWidget *image) { gtk_box_append (GTK_BOX (box), @@ -1578,8 +1578,8 @@ create_listbox (GtkWidget *widget) static GtkWidget * -accel_button_new (const gchar *text, - const gchar *accel) +accel_button_new (const char *text, + const char *accel) { guint keyval; GdkModifierType modifiers; @@ -2424,7 +2424,7 @@ change_digits (GtkWidget *widget, GtkSpinButton *spin) static void get_value (GtkWidget *widget, gpointer data) { - gchar buf[32]; + char buf[32]; GtkLabel *label; GtkSpinButton *spin; @@ -2443,7 +2443,7 @@ get_value (GtkWidget *widget, gpointer data) static void get_spin_value (GtkWidget *widget, gpointer data) { - gchar *buffer; + char *buffer; GtkLabel *label; GtkSpinButton *spin; @@ -2462,7 +2462,7 @@ static int spin_button_time_output_func (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; - static gchar buf[6]; + static char buf[6]; gdouble hours; gdouble minutes; @@ -2483,7 +2483,7 @@ spin_button_month_input_func (GtkSpinButton *spin_button, static const char *month[12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; - gchar *tmp1, *tmp2; + char *tmp1, *tmp2; gboolean found = FALSE; for (i = 1; i <= 12; i++) @@ -2531,8 +2531,8 @@ static int spin_button_hex_input_func (GtkSpinButton *spin_button, gdouble *new_val) { - const gchar *buf; - gchar *err; + const char *buf; + char *err; gdouble res; buf = gtk_editable_get_text (GTK_EDITABLE (spin_button)); @@ -2548,7 +2548,7 @@ static int spin_button_hex_output_func (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; - static gchar buf[7]; + static char buf[7]; gdouble val; adjustment = gtk_spin_button_get_adjustment (spin_button); @@ -2811,7 +2811,7 @@ cursor_draw (GtkDrawingArea *darea, cairo_fill (cr); } -static const gchar *cursor_names[] = { +static const char *cursor_names[] = { "none", "default", "help", @@ -2871,14 +2871,14 @@ cursor_pressed_cb (GtkGesture *gesture, GtkWidget *entry) { GtkWidget *widget; - const gchar *name; + const char *name; int i; const int n = G_N_ELEMENTS (cursor_names); int button; widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture)); - name = (const gchar *)g_object_get_data (G_OBJECT (widget), "name"); + name = (const char *)g_object_get_data (G_OBJECT (widget), "name"); if (name != NULL) { for (i = 0; i < n; i++) @@ -2901,7 +2901,7 @@ static void set_cursor_from_name (GtkWidget *entry, GtkWidget *widget) { - const gchar *name; + const char *name; name = gtk_editable_get_text (GTK_EDITABLE (entry)); gtk_widget_set_cursor_from_name (widget, name); @@ -2921,7 +2921,7 @@ change_cursor_theme (GtkWidget *widget, gpointer data) { #if defined(GDK_WINDOWING_X11) || defined (GDK_WINDOWING_WAYLAND) - const gchar *theme; + const char *theme; int size; GdkDisplay *display; GtkWidget *entry; @@ -3395,7 +3395,7 @@ typedef struct static void screen_display_check (GtkWidget *widget, ScreenDisplaySelection *data) { - const gchar *display_name; + const char *display_name; GdkDisplay *display; GtkWidget *dialog; GdkDisplay *new_display = NULL; @@ -3426,7 +3426,7 @@ screen_display_check (GtkWidget *widget, ScreenDisplaySelection *data) gboolean found = FALSE; while (gtk_tree_model_iter_nth_child (model, &iter, NULL, i++)) { - gchar *name; + char *name; gtk_tree_model_get (model, &iter, 0, &name, -1); found = !g_ascii_strcasecmp (display_name, name); g_free (name); @@ -3514,7 +3514,7 @@ create_display_screen (GtkWidget *widget) * GtkRange */ -static gchar* +static char * reformat_value (GtkScale *scale, gdouble value) { @@ -4021,9 +4021,9 @@ toggle_shrink (GtkWidget *widget, GtkWidget *child) static GtkWidget * create_pane_options (GtkPaned *paned, - const gchar *frame_label, - const gchar *label1, - const gchar *label2) + const char *frame_label, + const char *label1, + const char *label2) { GtkWidget *child1, *child2; GtkWidget *frame; @@ -4627,7 +4627,7 @@ surface_state_callback (GdkSurface *window, GParamSpec *pspec, GtkWidget *label) { - gchar *msg; + char *msg; GdkSurfaceState new_state; new_state = gdk_toplevel_get_state (GDK_TOPLEVEL (window)); @@ -5116,7 +5116,7 @@ progress_timeout (gpointer data) { ProgressData *pdata = data; gdouble new_val; - gchar *text; + char *text; if (pdata->activity) { @@ -5919,7 +5919,7 @@ create_main_window (void) GtkWidget *scrolled_window; GtkWidget *button; GtkWidget *label; - gchar buffer[64]; + char buffer[64]; GtkWidget *separator; int i; diff --git a/tests/testheaderbar.c b/tests/testheaderbar.c index d9b1760057..b2a63c459b 100644 --- a/tests/testheaderbar.c +++ b/tests/testheaderbar.c @@ -218,8 +218,8 @@ split_decorations (GtkSettings *settings, GtkBuilder *builder) { GtkWidget *sheader, *mheader; - gchar *layout, *p1, *p2; - gchar **p; + char *layout, *p1, *p2; + char **p; sheader = (GtkWidget *)gtk_builder_get_object (builder, "sidebar-header"); mheader = (GtkWidget *)gtk_builder_get_object (builder, "main-header"); @@ -359,7 +359,7 @@ create_stacked_headerbar (GtkApplication *app) /* technorama */ -static const gchar css[] = +static const char css[] = ".main.background { " " background-image: linear-gradient(to bottom, red, blue);" " border-width: 0px; " @@ -505,7 +505,7 @@ create_technorama (GtkApplication *app) } struct { - const gchar *name; + const char *name; void (*cb) (GtkApplication *app); } buttons[] = { diff --git a/tests/testheightforwidth.c b/tests/testheightforwidth.c index 063a916f5b..d7233ddcaf 100644 --- a/tests/testheightforwidth.c +++ b/tests/testheightforwidth.c @@ -21,9 +21,9 @@ #include typedef struct { - const gchar *name; - const gchar *tooltip; - const gchar *interface; + const char *name; + const char *tooltip; + const char *interface; GtkWidget *window; } TestInterface; diff --git a/tests/testiconview.c b/tests/testiconview.c index a09aba44f9..b0f8808cf5 100644 --- a/tests/testiconview.c +++ b/tests/testiconview.c @@ -131,7 +131,7 @@ add_n_items (GtkIconView *icon_list, int n) GtkTreeIter iter; GtkListStore *store; GdkPixbuf *pixbuf; - gchar *str, *str2; + char *str, *str2; int i; store = GTK_LIST_STORE (gtk_icon_view_get_model (icon_list)); @@ -174,7 +174,7 @@ add_large (GtkWidget *button, GtkIconView *icon_list) GtkTreeIter iter; GdkPixbuf *pixbuf, *pb; - gchar *str; + char *str; store = GTK_LIST_STORE (gtk_icon_view_get_model (icon_list)); pixbuf = gdk_pixbuf_new_from_file ("gnome-textfile.png", NULL); @@ -275,7 +275,7 @@ item_activated (GtkIconView *icon_view, { GtkTreeIter iter; GtkTreeModel *model; - gchar *text; + char *text; model = gtk_icon_view_get_model (icon_view); gtk_tree_model_get_iter (model, &iter, path); @@ -288,7 +288,7 @@ item_activated (GtkIconView *icon_view, static void toggled (GtkCellRendererToggle *cell, - gchar *path_string, + char *path_string, gpointer data) { GtkTreeModel *model = GTK_TREE_MODEL (data); @@ -307,8 +307,8 @@ toggled (GtkCellRendererToggle *cell, static void edited (GtkCellRendererText *cell, - gchar *path_string, - gchar *new_text, + char *path_string, + char *new_text, gpointer data) { GtkTreeModel *model = GTK_TREE_MODEL (data); @@ -391,7 +391,7 @@ popup_menu_handler (GtkWidget *widget) } int -main (int argc, gchar **argv) +main (int argc, char **argv) { GtkWidget *paned, *tv; GtkWidget *window, *icon_list, *scrolled_window; diff --git a/tests/testkineticscrolling.c b/tests/testkineticscrolling.c index be9d49f640..1189cc9d14 100644 --- a/tests/testkineticscrolling.c +++ b/tests/testkineticscrolling.c @@ -93,7 +93,7 @@ kinetic_scrolling (void) for (i = 0; i < 80; i++) { GtkTreeIter iter; - gchar *iter_label = g_strdup_printf ("Row number %d", i); + char *iter_label = g_strdup_printf ("Row number %d", i); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, iter_label, -1); diff --git a/tests/testlevelbar.c b/tests/testlevelbar.c index 5a79ec66ef..242aa727dd 100644 --- a/tests/testlevelbar.c +++ b/tests/testlevelbar.c @@ -28,7 +28,7 @@ static void add_custom_css (void) { GtkCssProvider *provider; - const gchar data[] = + const char data[] = "levelbar block.my-offset {" " background: magenta;" "}"; diff --git a/tests/testlist.c b/tests/testlist.c index 25579739be..285aaa74da 100644 --- a/tests/testlist.c +++ b/tests/testlist.c @@ -44,7 +44,7 @@ row_class_init (RowClass *class) } static GtkWidget * -row_new (const gchar* text, int sort_id) { +row_new (const char * text, int sort_id) { Row *row; row = g_object_new (row_get_type (), NULL); diff --git a/tests/testlist2.c b/tests/testlist2.c index e9465f63bd..0a43faf29e 100644 --- a/tests/testlist2.c +++ b/tests/testlist2.c @@ -29,7 +29,7 @@ remove_this_row (GtkButton *button, GtkWidget *child) gtk_revealer_set_reveal_child (GTK_REVEALER (revealer), FALSE); } -static GtkWidget *create_row (const gchar *label); +static GtkWidget *create_row (const char *label); static void row_revealed (GObject *revealer, GParamSpec *pspec, gpointer data) @@ -74,7 +74,7 @@ add_separator (GtkListBoxRow *row, GtkListBoxRow *before, gpointer data) } static GtkWidget * -create_row (const gchar *text) +create_row (const char *text) { GtkWidget *row, *label, *button; @@ -110,7 +110,7 @@ int main (int argc, char *argv[]) { GtkWidget *window, *list, *sw, *row; int i; - gchar *text; + char *text; gboolean done = FALSE; gtk_init (); diff --git a/tests/testlist3.c b/tests/testlist3.c index a800f3b9f3..db238f1829 100644 --- a/tests/testlist3.c +++ b/tests/testlist3.c @@ -57,7 +57,7 @@ drag_drop (GtkDropTarget *dest, } static GtkWidget * -create_row (const gchar *text) +create_row (const char *text) { GtkWidget *row, *box, *label, *image; GtkDragSource *source; @@ -127,7 +127,7 @@ main (int argc, char *argv[]) GtkWidget *window, *list, *sw, *row; GtkWidget *hbox, *vbox, *combo, *button; int i; - gchar *text; + char *text; GtkCssProvider *provider; gtk_init (); diff --git a/tests/testlist4.c b/tests/testlist4.c index e7bbf3ed5b..5bf7910ff0 100644 --- a/tests/testlist4.c +++ b/tests/testlist4.c @@ -10,14 +10,14 @@ typedef GtkApplicationClass TestAppClass; static GType test_app_get_type (void); G_DEFINE_TYPE (TestApp, test_app, GTK_TYPE_APPLICATION) -static GtkWidget *create_row (const gchar *label); +static GtkWidget *create_row (const char *label); static void activate_first_row (GSimpleAction *simple, GVariant *parameter, gpointer user_data) { - const gchar *text = "First row activated (no parameter action)"; + const char *text = "First row activated (no parameter action)"; g_print ("%s\n", text); gtk_label_set_label (GTK_LABEL (user_data), text); @@ -28,7 +28,7 @@ activate_print_string (GSimpleAction *simple, GVariant *parameter, gpointer user_data) { - const gchar *text = g_variant_get_string (parameter, NULL); + const char *text = g_variant_get_string (parameter, NULL); g_print ("%s\n", text); gtk_label_set_label (GTK_LABEL (user_data), text); @@ -40,7 +40,7 @@ activate_print_int (GSimpleAction *simple, gpointer user_data) { const int value = g_variant_get_int32 (parameter); - gchar *text; + char *text; text = g_strdup_printf ("Row %d activated (int action)", value); @@ -54,7 +54,7 @@ row_without_gaction_activated_cb (GtkListBox *list, gpointer user_data) { int index = gtk_list_box_row_get_index (row); - gchar *text; + char *text; text = g_strdup_printf ("Row %d activated (signal based)", index); @@ -72,7 +72,7 @@ add_separator (GtkListBoxRow *row, GtkListBoxRow *before, gpointer data) } static GtkWidget * -create_row (const gchar *text) +create_row (const char *text) { GtkWidget *row_content, *label; @@ -94,7 +94,7 @@ new_window (GApplication *app) GtkListBoxRow *row; int i; - gchar *text, *text2; + char *text, *text2; window = gtk_application_window_new (GTK_APPLICATION (app)); gtk_window_set_default_size (GTK_WINDOW (window), 300, 300); diff --git a/tests/testlistview.c b/tests/testlistview.c index 6e82bdff9b..54cbfb5506 100644 --- a/tests/testlistview.c +++ b/tests/testlistview.c @@ -391,7 +391,7 @@ row_data_update_info (RowData *data, static void copy_attribute (GFileInfo *to, GFileInfo *from, - const gchar *attribute) + const char *attribute) { GFileAttributeType type; gpointer value; diff --git a/tests/testlogout.c b/tests/testlogout.c index 39a38b2b3a..67788debde 100644 --- a/tests/testlogout.c +++ b/tests/testlogout.c @@ -12,7 +12,7 @@ static void inhibitor_toggled (GtkToggleButton *button, GtkApplication *app) { gboolean active; - const gchar *reason; + const char *reason; GtkApplicationInhibitFlags flags; GtkWidget *toplevel; guint cookie; @@ -34,7 +34,7 @@ inhibitor_toggled (GtkToggleButton *button, GtkApplication *app) if (active) { - gchar *text; + char *text; g_print ("Calling gtk_application_inhibit: %d, '%s'\n", flags, reason); diff --git a/tests/testnotebookdnd.c b/tests/testnotebookdnd.c index 3858aa6383..5bb1ce4458 100644 --- a/tests/testnotebookdnd.c +++ b/tests/testnotebookdnd.c @@ -175,7 +175,7 @@ create_notebook (const char **labels, static GtkWidget* create_notebook_non_dragable_content (const char **labels, - const gchar *group, + const char *group, GtkPositionType pos) { GtkWidget *notebook, *title, *page, *action_widget; @@ -226,7 +226,7 @@ create_notebook_non_dragable_content (const char **labels, static GtkWidget* create_notebook_with_notebooks (const char **labels, - const gchar *group, + const char *group, GtkPositionType pos) { GtkWidget *notebook, *title, *page; @@ -287,7 +287,7 @@ quit_cb (GtkWidget *widget, } int -main (int argc, gchar *argv[]) +main (int argc, char *argv[]) { GtkWidget *window, *grid; gboolean done = FALSE; diff --git a/tests/testoverlay.c b/tests/testoverlay.c index 7c175cfbbe..00be3026e7 100644 --- a/tests/testoverlay.c +++ b/tests/testoverlay.c @@ -220,7 +220,7 @@ test_scrolling (void) GtkWidget *text; GtkWidget *child; GtkTextBuffer *buffer; - gchar *contents; + char *contents; gsize len; win = gtk_window_new (); @@ -261,7 +261,7 @@ test_scrolling (void) return win; } -static const gchar *buffer = +static const char *buffer = "" " " " GtkBuilder support" @@ -368,7 +368,7 @@ test_chase (void) GtkWidget *text; GtkWidget *child; GtkTextBuffer *text_buffer; - gchar *contents; + char *contents; gsize len; GtkEventController *controller; diff --git a/tests/testoverlaystyleclass.c b/tests/testoverlaystyleclass.c index 47032021c7..51c24ca7b1 100644 --- a/tests/testoverlaystyleclass.c +++ b/tests/testoverlaystyleclass.c @@ -27,7 +27,7 @@ main (int argc, char *argv[]) { GtkWidget *win, *overlay, *grid, *main_child, *child, *label, *sw; GtkCssProvider *provider; - gchar *str; + char *str; gtk_init (); diff --git a/tests/testperf.c b/tests/testperf.c index 27b9d623aa..c674516241 100644 --- a/tests/testperf.c +++ b/tests/testperf.c @@ -69,7 +69,7 @@ main (int argc, char *argv[]) GSubprocessLauncher *launcher; GSubprocess *subprocess; int fd; - gchar *name; + char *name; SysprofCaptureReader *reader; SysprofCaptureCursor *cursor; SysprofCaptureCondition *condition; diff --git a/tests/testrc.c b/tests/testrc.c index 91d979bfc1..ce1b882977 100644 --- a/tests/testrc.c +++ b/tests/testrc.c @@ -24,8 +24,8 @@ * the _-prefix stripping. */ struct { - gchar *pattern; - gchar *test; + char *pattern; + char *test; gboolean match; } tests[] = { { "", "", TRUE }, @@ -58,7 +58,7 @@ main (int argc, char *argv[]) for (i = 0; tests[i].test; i++) { GSList *list; - gchar *path, *rpath; + char *path, *rpath; gboolean result; list = _gtk_rc_parse_widget_class_path (tests[i].pattern); diff --git a/tests/testrevealer.c b/tests/testrevealer.c index 9ec28b3caa..0a97193587 100644 --- a/tests/testrevealer.c +++ b/tests/testrevealer.c @@ -2,7 +2,7 @@ int main (int argc, - gchar ** argv) + char ** argv) { GtkWidget *window, *revealer, *box, *widget, *entry; diff --git a/tests/testscale.c b/tests/testscale.c index 86e9b47da2..277a837e4b 100644 --- a/tests/testscale.c +++ b/tests/testscale.c @@ -108,14 +108,14 @@ int main (int argc, char *argv[]) GtkWidget *button; GtkWidget *frame; GtkWidget *scale; - const gchar *labels[3] = { + const char *labels[3] = { "Left", "Middle", "Right" }; gdouble bath_marks[4] = { 0.0, 33.3, 66.6, 100.0 }; - const gchar *bath_labels[4] = { + const char *bath_labels[4] = { "Cold", "Baby bath", "Hot tub", @@ -123,7 +123,7 @@ int main (int argc, char *argv[]) }; gdouble pos_marks[4] = { 0.0, 33.3, 66.6, 100.0 }; - const gchar *pos_labels[4] = { "Left", "Right", "Top", "Bottom" }; + const char *pos_labels[4] = { "Left", "Right", "Top", "Bottom" }; gboolean done = FALSE; gtk_init (); diff --git a/tests/testscrolledge.c b/tests/testscrolledge.c index 94f808f7e8..5661202d1a 100644 --- a/tests/testscrolledge.c +++ b/tests/testscrolledge.c @@ -24,7 +24,7 @@ static void populate_list (GtkListBox *list) { int i; - gchar *text; + char *text; GtkWidget *row, *label; int n; GtkWidget *child; diff --git a/tests/testselectionmode.c b/tests/testselectionmode.c index 325e80b2f0..b001e253c5 100644 --- a/tests/testselectionmode.c +++ b/tests/testselectionmode.c @@ -82,7 +82,7 @@ add_row (GtkWidget *list, int i) { GtkWidget *row; GtkWidget *label; - gchar *text; + char *text; row = selectable_row_new (); text = g_strdup_printf ("Docker %d", i); diff --git a/tests/testsensitive.c b/tests/testsensitive.c index 88eccfb1b5..e53d80049d 100644 --- a/tests/testsensitive.c +++ b/tests/testsensitive.c @@ -10,7 +10,7 @@ static void state_flags_changed (GtkWidget *widget) { GtkStateFlags flags; - const gchar *sep; + const char *sep; g_print ("state changed: \n"); diff --git a/tests/teststack.c b/tests/teststack.c index 571d58fc07..70931fa20f 100644 --- a/tests/teststack.c +++ b/tests/teststack.c @@ -51,8 +51,8 @@ toggle_transitions (GtkWidget *combo, gpointer data) static void on_back_button_clicked (GtkButton *button, gpointer user_data) { - const gchar *seq[] = { "1", "2", "3" }; - const gchar *vis; + const char *seq[] = { "1", "2", "3" }; + const char *vis; int i; vis = gtk_stack_get_visible_child_name (GTK_STACK (stack)); @@ -70,8 +70,8 @@ on_back_button_clicked (GtkButton *button, gpointer user_data) static void on_forward_button_clicked (GtkButton *button, gpointer user_data) { - const gchar *seq[] = { "1", "2", "3" }; - const gchar *vis; + const char *seq[] = { "1", "2", "3" }; + const char *vis; int i; vis = gtk_stack_get_visible_child_name (GTK_STACK (stack)); @@ -89,7 +89,7 @@ on_forward_button_clicked (GtkButton *button, gpointer user_data) static void update_back_button_sensitivity (GtkStack *_stack, GParamSpec *pspec, GtkWidget *button) { - const gchar *vis; + const char *vis; vis = gtk_stack_get_visible_child_name (GTK_STACK (stack)); gtk_widget_set_sensitive (button, g_strcmp0 (vis, "1") != 0); @@ -98,7 +98,7 @@ update_back_button_sensitivity (GtkStack *_stack, GParamSpec *pspec, GtkWidget * static void update_forward_button_sensitivity (GtkStack *_stack, GParamSpec *pspec, GtkWidget *button) { - const gchar *vis; + const char *vis; vis = gtk_stack_get_visible_child_name (GTK_STACK (stack)); gtk_widget_set_sensitive (button, g_strcmp0 (vis, "3") != 0); @@ -106,7 +106,7 @@ update_forward_button_sensitivity (GtkStack *_stack, GParamSpec *pspec, GtkWidge int main (int argc, - gchar ** argv) + char ** argv) { GtkWidget *window, *box, *button, *hbox, *combo, *layout; GtkWidget *w2, *w3; diff --git a/tests/testtexthistory.c b/tests/testtexthistory.c index fddc86daf5..556b2ac45f 100644 --- a/tests/testtexthistory.c +++ b/tests/testtexthistory.c @@ -93,7 +93,7 @@ static void do_delete (gpointer funcs_data, guint begin, guint end, - const gchar *expected_text, + const char *expected_text, guint len) { Text *t = funcs_data; diff --git a/tests/testtooltips.c b/tests/testtooltips.c index a955d56dd5..6f6b951d24 100644 --- a/tests/testtooltips.c +++ b/tests/testtooltips.c @@ -120,8 +120,8 @@ query_tooltip_tree_view_cb (GtkWidget *widget, GtkTreeView *tree_view = GTK_TREE_VIEW (widget); GtkTreeModel *model = gtk_tree_view_get_model (tree_view); GtkTreePath *path = NULL; - gchar *tmp; - gchar *pathstring; + char *tmp; + char *pathstring; char buffer[512]; diff --git a/tests/testtreecolumns.c b/tests/testtreecolumns.c index 768418d315..b67e318d4d 100644 --- a/tests/testtreecolumns.c +++ b/tests/testtreecolumns.c @@ -511,7 +511,7 @@ add_clicked (GtkWidget *button, gpointer data) GtkTreeViewColumn *column; GtkTreeSelection *selection; GtkCellRenderer *cell; - gchar *label = g_strdup_printf ("Column %d", i); + char *label = g_strdup_printf ("Column %d", i); cell = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (label, cell, "text", 0, NULL); @@ -546,7 +546,7 @@ get_visible (GtkTreeViewColumn *tree_column, static void set_visible (GtkCellRendererToggle *cell, - gchar *path_str, + char *path_str, gpointer data) { GtkTreeView *tree_view = (GtkTreeView *) data; @@ -576,7 +576,7 @@ move_to_left (GtkTreeModel *src, GtkTreeIter iter; GtkTreeViewColumn *column; GtkTreeSelection *selection; - gchar *label; + char *label; gtk_tree_model_get (src, src_iter, 0, &label, 1, &column, -1); @@ -606,7 +606,7 @@ move_to_right (GtkTreeIter *src_iter, GtkTreeModel *dest, GtkTreeIter *dest_iter) { - gchar *label; + char *label; GtkTreeViewColumn *column; int before = -1; @@ -636,7 +636,7 @@ move_up_or_down (GtkTreeModel *src, GtkTreeIter *dest_iter) { GtkTreeViewColumn *column; - gchar *label; + char *label; int before = -1; gtk_tree_model_get (src, src_iter, 0, &label, 1, &column, -1); @@ -750,7 +750,7 @@ main (int argc, char *argv[]) for (i = 0; i < 10; i++) { GtkTreeIter iter; - gchar *string = g_strdup_printf ("%d", i); + char *string = g_strdup_printf ("%d", i); gtk_list_store_append (GTK_LIST_STORE (sample_model), &iter); gtk_list_store_set (GTK_LIST_STORE (sample_model), &iter, 0, string, -1); g_free (string); diff --git a/tests/testtreecolumnsizing.c b/tests/testtreecolumnsizing.c index a2932f48ea..d0c0c23a92 100644 --- a/tests/testtreecolumnsizing.c +++ b/tests/testtreecolumnsizing.c @@ -48,7 +48,7 @@ create_model (void) for (i = 0; i < N_ROWS; i++) { - gchar *str; + char *str; str = g_strdup_printf ("Row %d", i); gtk_list_store_insert_with_values (store, NULL, i, @@ -94,7 +94,7 @@ static void combo_box_changed (GtkComboBox *combo_box, gpointer user_data) { - gchar *str; + char *str; GList *list; GList *columns; diff --git a/tests/testtreednd.c b/tests/testtreednd.c index 736b071c9a..d219173f40 100644 --- a/tests/testtreednd.c +++ b/tests/testtreednd.c @@ -29,7 +29,7 @@ my_model_drag_data_get (GtkTreeDragSource *source, { GdkContentProvider *content; GtkTreeIter iter; - gchar *text; + char *text; gtk_tree_model_get_iter (GTK_TREE_MODEL (source), &iter, path); gtk_tree_model_get (GTK_TREE_MODEL (source), &iter, 0, &text, -1); diff --git a/tests/testtreeedit.c b/tests/testtreeedit.c index e3b17668ef..d47a35b5a6 100644 --- a/tests/testtreeedit.c +++ b/tests/testtreeedit.c @@ -20,7 +20,7 @@ #include typedef struct { - const gchar *string; + const char *string; gboolean is_editable; gboolean is_sensitive; int progress; @@ -81,7 +81,7 @@ create_model (void) static void editable_toggled (GtkCellRendererToggle *cell, - gchar *path_string, + char *path_string, gpointer data) { GtkTreeModel *model = GTK_TREE_MODEL (data); @@ -100,7 +100,7 @@ editable_toggled (GtkCellRendererToggle *cell, static void sensitive_toggled (GtkCellRendererToggle *cell, - gchar *path_string, + char *path_string, gpointer data) { GtkTreeModel *model = GTK_TREE_MODEL (data); @@ -119,8 +119,8 @@ sensitive_toggled (GtkCellRendererToggle *cell, static void edited (GtkCellRendererText *cell, - gchar *path_string, - gchar *new_text, + char *path_string, + char *new_text, gpointer data) { GtkTreeModel *model = GTK_TREE_MODEL (data); @@ -188,7 +188,7 @@ create_control (GtkWidget *box, int number, int cntl, CallbackData *data) { GtkWidget *checkbutton; GCallback callback = NULL; - gchar *name = NULL; + char *name = NULL; switch (cntl) { @@ -228,7 +228,7 @@ quit_cb (GtkWidget *widget, } int -main (int argc, gchar **argv) +main (int argc, char **argv) { GtkWidget *window; GtkWidget *scrolled_window; diff --git a/tests/testtreefocus.c b/tests/testtreefocus.c index da5802c3bf..10e98daada 100644 --- a/tests/testtreefocus.c +++ b/tests/testtreefocus.c @@ -22,7 +22,7 @@ typedef struct _TreeStruct TreeStruct; struct _TreeStruct { - const gchar *label; + const char *label; gboolean alex; gboolean havoc; gboolean tim; @@ -224,7 +224,7 @@ make_model (void) static void alex_toggled (GtkCellRendererToggle *cell, - gchar *path_str, + char *path_str, gpointer data) { GtkTreeModel *model = (GtkTreeModel *) data; @@ -243,7 +243,7 @@ alex_toggled (GtkCellRendererToggle *cell, static void havoc_toggled (GtkCellRendererToggle *cell, - gchar *path_str, + char *path_str, gpointer data) { GtkTreeModel *model = (GtkTreeModel *) data; @@ -262,7 +262,7 @@ havoc_toggled (GtkCellRendererToggle *cell, static void owen_toggled (GtkCellRendererToggle *cell, - gchar *path_str, + char *path_str, gpointer data) { GtkTreeModel *model = (GtkTreeModel *) data; @@ -281,7 +281,7 @@ owen_toggled (GtkCellRendererToggle *cell, static void tim_toggled (GtkCellRendererToggle *cell, - gchar *path_str, + char *path_str, gpointer data) { GtkTreeModel *model = (GtkTreeModel *) data; @@ -300,7 +300,7 @@ tim_toggled (GtkCellRendererToggle *cell, static void dave_toggled (GtkCellRendererToggle *cell, - gchar *path_str, + char *path_str, gpointer data) { GtkTreeModel *model = (GtkTreeModel *) data; diff --git a/tests/testtreemodel.c b/tests/testtreemodel.c index dffa4647d6..913bfce662 100644 --- a/tests/testtreemodel.c +++ b/tests/testtreemodel.c @@ -47,7 +47,7 @@ list_store_append (GtkTreeModel *model, { GtkListStore *store = GTK_LIST_STORE (model); GtkTreeIter iter; - gchar *text; + char *text; text = g_strdup_printf ("row %d", i); gtk_list_store_append (store, &iter); @@ -62,7 +62,7 @@ list_store_prepend (GtkTreeModel *model, { GtkListStore *store = GTK_LIST_STORE (model); GtkTreeIter iter; - gchar *text; + char *text; text = g_strdup_printf ("row %d", i); gtk_list_store_prepend (store, &iter); @@ -77,7 +77,7 @@ list_store_insert (GtkTreeModel *model, { GtkListStore *store = GTK_LIST_STORE (model); GtkTreeIter iter; - gchar *text; + char *text; int n; text = g_strdup_printf ("row %d", i); @@ -93,7 +93,7 @@ compare (GtkTreeModel *model, GtkTreeIter *b, gpointer data) { - gchar *str_a, *str_b; + char *str_a, *str_b; int result; gtk_tree_model_get (model, a, 1, &str_a, -1); @@ -114,7 +114,7 @@ tree_store_append (GtkTreeModel *model, { GtkTreeStore *store = GTK_TREE_STORE (model); GtkTreeIter iter; - gchar *text; + char *text; text = g_strdup_printf ("row %d", i); gtk_tree_store_append (store, &iter, NULL); @@ -129,7 +129,7 @@ tree_store_prepend (GtkTreeModel *model, { GtkTreeStore *store = GTK_TREE_STORE (model); GtkTreeIter iter; - gchar *text; + char *text; text = g_strdup_printf ("row %d", i); gtk_tree_store_prepend (store, &iter, NULL); @@ -144,7 +144,7 @@ tree_store_insert_flat (GtkTreeModel *model, { GtkTreeStore *store = GTK_TREE_STORE (model); GtkTreeIter iter; - gchar *text; + char *text; int n; text = g_strdup_printf ("row %d", i); @@ -188,7 +188,7 @@ tree_store_insert_deep (GtkTreeModel *model, { GtkTreeStore *store = GTK_TREE_STORE (model); GtkTreeIter iter; - gchar *text; + char *text; FindData data; text = g_strdup_printf ("row %d", i); diff --git a/tests/testtreepos.c b/tests/testtreepos.c index 80be31a0be..2980c027b5 100644 --- a/tests/testtreepos.c +++ b/tests/testtreepos.c @@ -68,7 +68,7 @@ release_event (GtkGestureClick *gesture, { GtkTreeModel *model; GtkTreeIter iter; - gchar *text; + char *text; model = gtk_tree_view_get_model (tv); gtk_tree_model_get_iter (model, &iter, path); diff --git a/tests/testtreesort.c b/tests/testtreesort.c index 8b923c11dc..a83945b06d 100644 --- a/tests/testtreesort.c +++ b/tests/testtreesort.c @@ -23,10 +23,10 @@ typedef struct _ListSort ListSort; struct _ListSort { - const gchar *word_1; - const gchar *word_2; - const gchar *word_3; - const gchar *word_4; + const char *word_1; + const char *word_2; + const char *word_3; + const char *word_4; int number_1; }; diff --git a/tests/testtreeview.c b/tests/testtreeview.c index 2efb476b22..3aa24d01ca 100644 --- a/tests/testtreeview.c +++ b/tests/testtreeview.c @@ -164,7 +164,7 @@ get_model_types (void) static void toggled_callback (GtkCellRendererToggle *celltoggle, - gchar *path_string, + char *path_string, GtkTreeView *tree_view) { GtkTreeModel *model = NULL; @@ -236,8 +236,8 @@ toggled_callback (GtkCellRendererToggle *celltoggle, static void edited_callback (GtkCellRendererText *renderer, - const gchar *path_string, - const gchar *new_text, + const char *path_string, + const char *new_text, GtkTreeView *tree_view) { GtkTreeModel *model = NULL; @@ -545,7 +545,7 @@ typesystem_recurse (GType type, guint n_children = 0; int i; GtkTreeIter iter; - gchar *str; + char *str; gtk_tree_store_append (store, &iter, parent_iter); @@ -958,7 +958,7 @@ gtk_real_model_types_get_value (GtkTreeModel *tree_model, { case 0: { - gchar *str; + char *str; g_value_init (value, G_TYPE_STRING); diff --git a/tests/testverticalcells.c b/tests/testverticalcells.c index 2ef1929977..b5487a26d9 100644 --- a/tests/testverticalcells.c +++ b/tests/testverticalcells.c @@ -25,11 +25,11 @@ typedef struct _TreeEntry TreeEntry; struct _TreeEntry { - const gchar *icon; - const gchar *info; - const gchar *description; - const gchar *fine_print; - const gchar *fine_print_color; + const char *icon; + const char *info; + const char *description; + const char *fine_print; + const char *fine_print_color; int progress; TreeEntry *entries; }; @@ -300,7 +300,7 @@ quit_cb (GtkWidget *widget, } int -main (int argc, gchar **argv) +main (int argc, char **argv) { GtkWidget *window; GtkWidget *scrolled_window; diff --git a/tests/testwindowsize.c b/tests/testwindowsize.c index 3b7e795a47..8e2a1afd02 100644 --- a/tests/testwindowsize.c +++ b/tests/testwindowsize.c @@ -11,7 +11,7 @@ static GtkWidget *resizable_check; static void size_changed_cb (GdkSurface *surface, int width, int height, GtkLabel *label) { - gchar *str; + char *str; str = g_strdup_printf ("%d x %d", width, height); gtk_label_set_label (label, str); diff --git a/tests/treestoretest.c b/tests/treestoretest.c index 34a833538b..e477def08f 100644 --- a/tests/treestoretest.c +++ b/tests/treestoretest.c @@ -37,7 +37,7 @@ static void node_set (GtkTreeIter *iter) { int n; - gchar *str; + char *str; str = g_strdup_printf ("Row (%d)", node_count++); gtk_tree_store_set (base_model, iter, 0, str, -1); @@ -126,7 +126,7 @@ iter_insert_with_values (GtkWidget *button, GtkTreeView *tree_view) GtkTreeIter iter; GtkTreeIter selected; GtkTreeModel *model = gtk_tree_view_get_model (tree_view); - gchar *str1, *str2; + char *str1, *str2; entry = g_object_get_data (G_OBJECT (button), "user_data"); str1 = g_strdup_printf ("Row (%d)", node_count++); diff --git a/testsuite/a11y/accessibility-dump.c b/testsuite/a11y/accessibility-dump.c index 5beed2cf33..d1189dc41e 100644 --- a/testsuite/a11y/accessibility-dump.c +++ b/testsuite/a11y/accessibility-dump.c @@ -252,12 +252,12 @@ compare_attr (gconstpointer a, gconstpointer b) static void dump_text_attributes (GString *string, int depth, - const gchar *name, + const char *name, AtkAttributeSet *attributes) { GSList *l; AtkAttribute *attr; - const gchar *value; + const char *value; if (attributes == NULL) return; @@ -301,7 +301,7 @@ dump_text_attributes (GString *string, atk_attribute_set_free (attributes); } -static const gchar * +static const char * layer_name (AtkLayer layer) { GEnumClass *class; @@ -334,7 +334,7 @@ dump_atk_text (AtkText *atk_text, guint depth, GString *string) { - gchar *text; + char *text; int i, start, end; g_string_append_printf (string, "%*s\n", depth, ""); @@ -436,7 +436,7 @@ dump_atk_value (AtkValue *atk_value, { AtkRange *range; gdouble value; - gchar *text; + char *text; value = 0.0; text = NULL; @@ -483,7 +483,7 @@ dump_atk_hyperlink (AtkHyperlink *link, for (i = 0; i < atk_hyperlink_get_n_anchors (link); i++) { - gchar *uri; + char *uri; uri = atk_hyperlink_get_uri (link, i); g_string_append_printf (string, " %s", uri); @@ -548,7 +548,7 @@ dump_atk_table (AtkTable *table, int n_selected; int i, j; AtkObject *obj; - const gchar *desc; + const char *desc; g_string_append_printf (string, "%*s\n", depth, ""); diff --git a/testsuite/a11y/children.c b/testsuite/a11y/children.c index cb370f9001..25315c990a 100644 --- a/testsuite/a11y/children.c +++ b/testsuite/a11y/children.c @@ -211,11 +211,11 @@ test_add_remove (GtkWidget *widget) } static void -add_child_test (const gchar *prefix, +add_child_test (const char *prefix, GTestFixtureFunc test_func, GtkWidget *widget) { - gchar *path; + char *path; path = g_strdup_printf ("%s/%s", prefix, G_OBJECT_TYPE_NAME (widget)); g_test_add_vtable (path, diff --git a/testsuite/a11y/state/state-record.c b/testsuite/a11y/state/state-record.c index 98c055c723..b1f1292336 100644 --- a/testsuite/a11y/state/state-record.c +++ b/testsuite/a11y/state/state-record.c @@ -23,16 +23,16 @@ #include #include -static gchar **states; +static char **states; static void record_state_change (AtkObject *accessible, - const gchar *state, + const char *state, gboolean set, GString *string) { GtkWidget *w; - const gchar *name; + const char *name; if (states) { @@ -63,9 +63,9 @@ stop (gpointer data) } static void -do_action (GtkBuilder *builder, const gchar *action, GString *string) +do_action (GtkBuilder *builder, const char *action, GString *string) { - gchar **parts; + char **parts; int len; int i; @@ -134,14 +134,14 @@ do_action (GtkBuilder *builder, const gchar *action, GString *string) } static void -record_events (const gchar *ui_file, - const gchar *in_file, +record_events (const char *ui_file, + const char *in_file, GString *string) { GtkBuilder *builder; GError *error; - gchar *contents; - gchar **actions; + char *contents; + char **actions; int i, len; builder = gtk_builder_new (); @@ -163,9 +163,9 @@ record_events (const gchar *ui_file, g_strfreev (actions); } -static gchar * -get_test_file (const gchar *test_file, - const gchar *extension, +static char * +get_test_file (const char *test_file, + const char *extension, gboolean must_exist) { GString *file = g_string_new (NULL); @@ -237,7 +237,7 @@ done: static void test_ui_file (GFile *file) { - gchar *ui_file, *in_file, *out_file; + char *ui_file, *in_file, *out_file; GString *record; GError *error = NULL; @@ -350,7 +350,7 @@ static const GOptionEntry test_args[] = { int main (int argc, char *argv[]) { - const gchar *basedir; + const char *basedir; GFile *dir; GError *error = NULL; GOptionContext *context; diff --git a/testsuite/a11y/testfocus.c b/testsuite/a11y/testfocus.c index 6775e6d170..2360f47c32 100644 --- a/testsuite/a11y/testfocus.c +++ b/testsuite/a11y/testfocus.c @@ -1,6 +1,6 @@ #include -static const gchar * +static const char * get_name (gpointer obj) { GtkWidget *widget; @@ -66,7 +66,7 @@ notify_cb (GObject *obj, GParamSpec *pspec, gpointer data) } static void -state_change_cb (AtkObject *obj, const gchar *name, gboolean state_set) +state_change_cb (AtkObject *obj, const char *name, gboolean state_set) { AtkStateSet *set; diff --git a/testsuite/a11y/text.c b/testsuite/a11y/text.c index c78a24061d..23460430f8 100644 --- a/testsuite/a11y/text.c +++ b/testsuite/a11y/text.c @@ -23,7 +23,7 @@ static void set_text (GtkWidget *widget, - const gchar *text) + const char *text) { if (GTK_IS_LABEL (widget)) gtk_label_set_text (GTK_LABEL (widget), text); @@ -37,11 +37,11 @@ set_text (GtkWidget *widget, static void append_text (GtkWidget *widget, - const gchar *text) + const char *text) { if (GTK_IS_LABEL (widget)) { - gchar *tmp; + char *tmp; tmp = g_strconcat (gtk_label_get_text (GTK_LABEL (widget)), text, NULL); gtk_label_set_text (GTK_LABEL (widget), tmp); @@ -49,7 +49,7 @@ append_text (GtkWidget *widget, } else if (GTK_IS_EDITABLE (widget)) { - gchar *tmp; + char *tmp; tmp = g_strconcat (gtk_editable_get_text (GTK_EDITABLE (widget)), text, NULL); gtk_editable_set_text (GTK_EDITABLE (widget), tmp); @@ -72,8 +72,8 @@ static void test_basic (GtkWidget *widget) { AtkText *atk_text; - const gchar *text = "Text goes here"; - gchar *ret; + const char *text = "Text goes here"; + char *ret; int count; gunichar c; @@ -128,8 +128,8 @@ static void test_text_changed (GtkWidget *widget) { AtkText *atk_text; - const gchar *text = "Täxt goes here"; - const gchar *text2 = "Täxt again"; + const char *text = "Täxt goes here"; + const char *text2 = "Täxt again"; SignalData delete_data; SignalData insert_data; gboolean cant_append = FALSE; @@ -200,11 +200,11 @@ typedef struct { AtkTextBoundary boundary; int start; int end; - const gchar *word; + const char *word; } Word; #ifdef DUMP_RESULTS -static const gchar * +static const char * boundary (AtkTextBoundary b) { switch (b) @@ -220,7 +220,7 @@ boundary (AtkTextBoundary b) } } -static const gchar * +static const char * gravity (int g) { if (g < 0) return "before"; @@ -228,10 +228,10 @@ gravity (int g) else return "around"; } -const gchar * +const char * char_rep (gunichar c) { - static gchar out[6]; + static char out[6]; switch (c) { @@ -246,8 +246,8 @@ char_rep (gunichar c) } } -gchar * -escape (const gchar *p) +char * +escape (const char *p) { GString *s; @@ -272,11 +272,11 @@ show_text_attributes (PangoLayout *l) { const PangoLogAttr *attr; int n_attrs; - const gchar *s; - gchar e; - const gchar *p; + const char *s; + char e; + const char *p; int i; - const gchar *text; + const char *text; GSList *lines, *li; glong so, eo; @@ -385,7 +385,7 @@ static void test_words (GtkWidget *widget) { AtkText *atk_text; - const gchar *text = "abc! def\nghi jkl\nmno"; + const char *text = "abc! def\nghi jkl\nmno"; Word expected[] = { { -1, 0, ATK_TEXT_BOUNDARY_CHAR, 0, 0, "" }, { -1, 1, ATK_TEXT_BOUNDARY_CHAR, 0, 1, "a" }, @@ -831,7 +831,7 @@ test_words (GtkWidget *widget) { 0, -1, } }; int start, end; - gchar *word; + char *word; int i; atk_text = ATK_TEXT (gtk_widget_get_accessible (widget)); @@ -964,9 +964,9 @@ static void test_selection (GtkWidget *widget) { AtkText *atk_text; - const gchar *text = "Bla bla bla"; + const char *text = "Bla bla bla"; int n; - gchar *ret; + char *ret; int start, end; SelectionData data1; SelectionData data2; @@ -1030,11 +1030,11 @@ setup_test (GtkWidget *widget) } static void -add_text_test (const gchar *prefix, +add_text_test (const char *prefix, GTestFixtureFunc test_func, GtkWidget *widget) { - gchar *path; + char *path; path = g_strdup_printf ("%s/%s", prefix, G_OBJECT_TYPE_NAME (widget)); g_test_add_vtable (path, @@ -1062,7 +1062,7 @@ test_bold_label (void) { GtkWidget *label; AtkObject *atk_obj; - gchar *text; + char *text; /*http://bugzilla.gnome.org/show_bug.cgi?id=126797 */ diff --git a/testsuite/a11y/tree-performance.c b/testsuite/a11y/tree-performance.c index e86bb9f97b..c25e491bf4 100644 --- a/testsuite/a11y/tree-performance.c +++ b/testsuite/a11y/tree-performance.c @@ -22,7 +22,7 @@ #define N_ROWS 10000 -const gchar list_ui[] = +const char list_ui[] = "" " " " " @@ -205,7 +205,7 @@ test_a11y_performance_list (void) g_test_message ("%d accessibles before, %d after\n", count_before, count_after); } -const gchar tree_ui[] = +const char tree_ui[] = "" " " " " diff --git a/testsuite/a11y/tree-relationships.c b/testsuite/a11y/tree-relationships.c index 82d15fb3cd..852bf3429f 100644 --- a/testsuite/a11y/tree-relationships.c +++ b/testsuite/a11y/tree-relationships.c @@ -20,7 +20,7 @@ #include -const gchar list_ui[] = +const char list_ui[] = "" " " " " @@ -105,7 +105,7 @@ builder_get_toplevel (GtkBuilder *builder) return window; } -const gchar tree_ui[] = +const char tree_ui[] = "" " " " " @@ -235,7 +235,7 @@ test_a11y_tree_focus (void) SignalData data; AtkObject *accessible; AtkObject *child; - gchar *text; + char *text; builder = gtk_builder_new (); gtk_builder_add_from_string (builder, tree_ui, -1, &error); @@ -284,7 +284,7 @@ find_root_accessible (GtkTreeView *tv, const char *name) { AtkObject *child = atk_object_ref_accessible_child (tvaccessible, i); AtkObject *item; - gchar *text; + char *text; if (!child) return NULL; item = atk_object_ref_accessible_child (child, 0); diff --git a/testsuite/a11y/util.c b/testsuite/a11y/util.c index 906c98b9e0..c64d2dad9a 100644 --- a/testsuite/a11y/util.c +++ b/testsuite/a11y/util.c @@ -23,7 +23,7 @@ static void test_toolkit_name (void) { - const gchar *s; + const char *s; s = atk_get_toolkit_name (); g_assert_cmpstr (s, ==, "gtk"); @@ -32,7 +32,7 @@ test_toolkit_name (void) static void test_toolkit_version (void) { - const gchar *s; + const char *s; s = atk_get_toolkit_version (); g_assert_cmpstr (s, ==, GTK_VERSION); diff --git a/testsuite/a11y/value.c b/testsuite/a11y/value.c index bedf4d3e47..376eada8ea 100644 --- a/testsuite/a11y/value.c +++ b/testsuite/a11y/value.c @@ -43,7 +43,7 @@ set_value (GtkWidget *widget, typedef struct { int count; - gchar *last_name; + char *last_name; } NotifyData; static void @@ -63,7 +63,7 @@ test_basic (GtkWidget *widget) AtkValue *atk_value; gdouble value = 50; gdouble ret; - gchar *text; + char *text; atk_object = gtk_widget_get_accessible (widget); atk_value = ATK_VALUE (atk_object); @@ -90,11 +90,11 @@ setup_test (GtkWidget *widget) } static void -add_value_test (const gchar *prefix, +add_value_test (const char *prefix, GTestFixtureFunc test_func, GtkWidget *widget) { - gchar *path; + char *path; path = g_strdup_printf ("%s/%s", prefix, G_OBJECT_TYPE_NAME (widget)); g_test_add_vtable (path, diff --git a/testsuite/css/api.c b/testsuite/css/api.c index c44caa2e4e..d0ed09e98a 100644 --- a/testsuite/css/api.c +++ b/testsuite/css/api.c @@ -24,7 +24,7 @@ static void gtk_css_provider_load_data_not_null_terminated (void) { GtkCssProvider *p; - const gchar data[3] = {'*', '{', '}'}; + const char data[3] = {'*', '{', '}'}; p = gtk_css_provider_new(); diff --git a/testsuite/gdk/encoding.c b/testsuite/gdk/encoding.c index 9a4be26be2..40ef8ae9e0 100644 --- a/testsuite/gdk/encoding.c +++ b/testsuite/gdk/encoding.c @@ -17,7 +17,7 @@ test_to_text_list (void) int format; const guchar *text; int length; - gchar **list; + char **list; int n; encoding = g_intern_string ("UTF8_STRING"); diff --git a/testsuite/gdk/keysyms.c b/testsuite/gdk/keysyms.c index b7bd8d1670..217b8a4600 100644 --- a/testsuite/gdk/keysyms.c +++ b/testsuite/gdk/keysyms.c @@ -6,8 +6,8 @@ test_keysyms_basic (void) { struct { guint keyval; - const gchar *name; - const gchar *other_name; + const char *name; + const char *other_name; } tests[] = { { GDK_KEY_space, "space", NULL }, { GDK_KEY_a, "a", NULL }, diff --git a/testsuite/gdk/rgba.c b/testsuite/gdk/rgba.c index 46ba887d70..db3fbd3111 100644 --- a/testsuite/gdk/rgba.c +++ b/testsuite/gdk/rgba.c @@ -64,10 +64,10 @@ test_color_to_string (void) { GdkRGBA rgba; GdkRGBA out; - gchar *res; - gchar *res_de; - gchar *res_en; - gchar *orig; + char *res; + char *res_de; + char *res_en; + char *orig; /* Using /255. values for the r, g, b components should * make sure they round-trip exactly without rounding diff --git a/testsuite/gtk/builder.c b/testsuite/gtk/builder.c index b6da2dfbef..63c0b5d67f 100644 --- a/testsuite/gtk/builder.c +++ b/testsuite/gtk/builder.c @@ -43,9 +43,9 @@ _BUILDER_TEST_EXPORT void signal_extra2 (GtkButton *button, GParamSpec *spec); static GtkBuilder * -builder_new_from_string (const gchar *buffer, +builder_new_from_string (const char *buffer, gsize length, - const gchar *domain) + const char *domain) { GtkBuilder *builder; GError *error = NULL; @@ -202,7 +202,7 @@ test_connect_signals (void) { GtkBuilder *builder; GObject *window; - const gchar buffer[] = + const char buffer[] = "" " " " " @@ -214,26 +214,26 @@ test_connect_signals (void) " object=\"button\" after=\"yes\"/>" " " ""; - const gchar buffer_order[] = + const char buffer_order[] = "" " " " " " " " " ""; - const gchar buffer_extra[] = + const char buffer_extra[] = "" " " " " " " ""; - const gchar buffer_extra2[] = + const char buffer_extra2[] = "" " " " " " " ""; - const gchar buffer_after_child[] = + const char buffer_after_child[] = "" " " " " @@ -297,9 +297,9 @@ static void test_domain (void) { GtkBuilder *builder; - const gchar buffer1[] = ""; - const gchar buffer2[] = ""; - const gchar *domain; + const char buffer1[] = ""; + const char buffer2[] = ""; + const char *domain; builder = builder_new_from_string (buffer1, -1, NULL); domain = gtk_builder_get_translation_domain (builder); @@ -323,7 +323,7 @@ static void test_translation (void) { GtkBuilder *builder; - const gchar buffer[] = + const char buffer[] = "" " " " " @@ -353,7 +353,7 @@ static void test_sizegroup (void) { GtkBuilder * builder; - const gchar buffer1[] = + const char buffer1[] = "" " " " horizontal" @@ -376,7 +376,7 @@ test_sizegroup (void) " " " " ""; - const gchar buffer2[] = + const char buffer2[] = "" " " " horizontal" @@ -384,7 +384,7 @@ test_sizegroup (void) " " " " ""; - const gchar buffer3[] = + const char buffer3[] = "" " " " horizontal" @@ -454,7 +454,7 @@ test_sizegroup (void) static void test_list_store (void) { - const gchar buffer1[] = + const char buffer1[] = "" " " " " @@ -513,7 +513,7 @@ test_list_store (void) GtkBuilder *builder; GObject *store; GtkTreeIter iter; - gchar *surname, *lastname; + char *surname, *lastname; int age; builder = builder_new_from_string (buffer1, -1, NULL); @@ -613,7 +613,7 @@ test_list_store (void) static void test_tree_store (void) { - const gchar buffer[] = + const char buffer[] = "" " " " " @@ -637,7 +637,7 @@ test_tree_store (void) static void test_types (void) { - const gchar buffer[] = + const char buffer[] = "" " " " " @@ -663,19 +663,19 @@ test_types (void) " " " " ""; - const gchar buffer2[] = + const char buffer2[] = "" " " ""; - const gchar buffer3[] = + const char buffer3[] = "" " " ""; - const gchar buffer4[] = + const char buffer4[] = "" " " ""; - const gchar buffer5[] = + const char buffer5[] = "" " " ""; @@ -719,7 +719,7 @@ static void test_spin_button (void) { GtkBuilder *builder; - const gchar buffer[] = + const char buffer[] = "" "" "0" @@ -763,7 +763,7 @@ static void test_notebook (void) { GtkBuilder *builder; - const gchar buffer[] = + const char buffer[] = "" " " " " @@ -825,13 +825,13 @@ static void test_construct_only_property (void) { GtkBuilder *builder; - const gchar buffer[] = + const char buffer[] = "" " " " amazing" " " ""; - const gchar buffer2[] = + const char buffer2[] = "" " " " " @@ -860,7 +860,7 @@ static void test_object_properties (void) { GtkBuilder *builder; - const gchar buffer[] = + const char buffer[] = "" " " " " @@ -878,7 +878,7 @@ test_object_properties (void) " " " " ""; - const gchar buffer2[] = + const char buffer2[] = "" " " ""; @@ -904,7 +904,7 @@ test_children (void) { GtkBuilder * builder; GtkWidget *content_area; - const gchar buffer1[] = + const char buffer1[] = "" " " " " @@ -914,7 +914,7 @@ test_children (void) " " " " ""; - const gchar buffer2[] = + const char buffer2[] = "" " " " 1" @@ -982,7 +982,7 @@ static void test_layout_properties (void) { GtkBuilder * builder; - const gchar buffer1[] = + const char buffer1[] = "" " " " " @@ -1021,7 +1021,7 @@ static void test_treeview_column (void) { GtkBuilder *builder; - const gchar buffer[] = + const char buffer[] = "" "" " " @@ -1096,7 +1096,7 @@ static void test_icon_view (void) { GtkBuilder *builder; - const gchar buffer[] = + const char buffer[] = "" " " " " @@ -1142,7 +1142,7 @@ static void test_combo_box (void) { GtkBuilder *builder; - const gchar buffer[] = + const char buffer[] = "" " " " " @@ -1198,7 +1198,7 @@ static void test_combo_box_entry (void) { GtkBuilder *builder; - const gchar buffer[] = + const char buffer[] = "" " " " " @@ -1239,7 +1239,7 @@ test_combo_box_entry (void) " " ""; GObject *window, *combobox, *renderer; - gchar *text; + char *text; builder = builder_new_from_string (buffer, -1, NULL); combobox = gtk_builder_get_object (builder, "comboboxentry1"); @@ -1270,7 +1270,7 @@ static void test_cell_view (void) { GtkBuilder *builder; - const gchar *buffer = + const char *buffer = "" " " " " @@ -1329,7 +1329,7 @@ static void test_dialog (void) { GtkBuilder * builder; - const gchar buffer1[] = + const char buffer1[] = "" " " " " @@ -1374,7 +1374,7 @@ static void test_message_dialog (void) { GtkBuilder * builder; - const gchar buffer1[] = + const char buffer1[] = "" " " " " @@ -1404,7 +1404,7 @@ test_message_dialog (void) static void test_widget (void) { - const gchar *buffer = + const char *buffer = "" " " " button1" @@ -1414,7 +1414,7 @@ test_widget (void) " " " " ""; - const gchar *buffer2 = + const char *buffer2 = "" " " " " @@ -1424,7 +1424,7 @@ test_widget (void) " " " " ""; - const gchar *buffer3 = + const char *buffer3 = "" " " " " @@ -1454,7 +1454,7 @@ test_widget (void) " " " " ""; - const gchar *buffer4 = + const char *buffer4 = "" " " " " @@ -1523,20 +1523,20 @@ test_widget (void) static void test_window (void) { - const gchar *buffer1 = + const char *buffer1 = "" " " " " " " ""; - const gchar *buffer2 = + const char *buffer2 = "" " " " " ""; GtkBuilder *builder; GObject *window1; - gchar *title; + char *title; builder = builder_new_from_string (buffer1, -1, NULL); window1 = gtk_builder_get_object (builder, "window1"); @@ -1700,7 +1700,7 @@ static void test_reference_counting (void) { GtkBuilder *builder; - const gchar buffer1[] = + const char buffer1[] = "" " " " " @@ -1712,7 +1712,7 @@ test_reference_counting (void) " " " " ""; - const gchar buffer2[] = + const char buffer2[] = "" " " " vertical" @@ -1782,7 +1782,7 @@ test_pango_attributes (void) { GtkBuilder *builder; FoundAttrs found = { 0, }; - const gchar buffer[] = + const char buffer[] = "" " " " " @@ -1795,7 +1795,7 @@ test_pango_attributes (void) " " " " ""; - const gchar err_buffer1[] = + const char err_buffer1[] = "" " " " " @@ -1803,7 +1803,7 @@ test_pango_attributes (void) " " " " ""; - const gchar err_buffer2[] = + const char err_buffer2[] = "" " " " " @@ -1860,8 +1860,8 @@ test_requires (void) { GtkBuilder *builder; GError *error = NULL; - gchar *buffer; - const gchar buffer_fmt[] = + char *buffer; + const char buffer_fmt[] = "" " " ""; @@ -1882,9 +1882,9 @@ test_add_objects (void) GError *error; int ret; GObject *obj; - const gchar *objects[2] = {"mainbox", NULL}; - const gchar *objects2[3] = {"mainbox", "window2", NULL}; - const gchar buffer[] = + const char *objects[2] = {"mainbox", NULL}; + const char *objects2[3] = {"mainbox", "window2", NULL}; + const char buffer[] = "" " " " " @@ -1947,7 +1947,7 @@ test_message_area (void) { GtkBuilder *builder; GObject *obj, *obj1; - const gchar buffer[] = + const char buffer[] = "" " " " " @@ -1988,7 +1988,7 @@ test_gmenu (void) { GtkBuilder *builder; GObject *obj, *obj1; - const gchar buffer[] = + const char buffer[] = "" " " " " @@ -2062,7 +2062,7 @@ test_level_bar (void) GtkBuilder *builder; GError *error = NULL; GObject *obj, *obj1; - const gchar buffer1[] = + const char buffer1[] = "" " " " " @@ -2079,7 +2079,7 @@ test_level_bar (void) " " " " ""; - const gchar buffer2[] = + const char buffer2[] = "" " " " " @@ -2087,7 +2087,7 @@ test_level_bar (void) " " " " ""; - const gchar buffer3[] = + const char buffer3[] = "" " " " " @@ -2130,7 +2130,7 @@ test_expose_object (void) GError *error = NULL; GtkWidget *menu; GObject *obj; - const gchar buffer[] = + const char buffer[] = "" " " " external_menu" @@ -2159,7 +2159,7 @@ test_no_ids (void) GtkBuilder *builder; GError *error = NULL; GObject *obj; - const gchar buffer[] = + const char buffer[] = "" " " " " @@ -2196,7 +2196,7 @@ test_no_ids (void) static void test_property_bindings (void) { - const gchar *buffer = + const char *buffer = "" " " " " @@ -2339,7 +2339,7 @@ static void test_anaconda_signal (void) { GtkBuilder *builder; - const gchar buffer[] = + const char buffer[] = "" "" "" @@ -2388,7 +2388,7 @@ test_file_filter (void) GObject *obj; GtkFileFilter *filter; - const gchar buffer[] = + const char buffer[] = "" " " " Text and Images" @@ -2447,7 +2447,7 @@ static void test_transforms (void) { GtkBuilder * builder; - const gchar buffer1[] = + const char buffer1[] = "" " " " " diff --git a/testsuite/gtk/builderparser.c b/testsuite/gtk/builderparser.c index 0f11933509..7f26242d60 100644 --- a/testsuite/gtk/builderparser.c +++ b/testsuite/gtk/builderparser.c @@ -23,9 +23,9 @@ #include static void -test_file (const gchar *filename, GString *string) +test_file (const char *filename, GString *string) { - gchar *contents; + char *contents; gsize length; GError *error = NULL; gboolean ret; @@ -59,10 +59,10 @@ test_file (const gchar *filename, GString *string) g_object_unref (builder); } -static gchar * -get_expected_filename (const gchar *filename) +static char * +get_expected_filename (const char *filename) { - gchar *f, *p, *expected; + char *f, *p, *expected; f = g_strdup (filename); p = strstr (f, ".ui"); @@ -78,9 +78,9 @@ get_expected_filename (const gchar *filename) static void test_parse (gconstpointer d) { - const gchar *filename = d; - gchar *expected_file; - gchar *expected; + const char *filename = d; + char *expected_file; + char *expected; GError *error = NULL; GString *string; @@ -106,8 +106,8 @@ main (int argc, char *argv[]) { GDir *dir; GError *error = NULL; - const gchar *name; - gchar *path; + const char *name; + char *path; gtk_test_init (&argc, &argv, NULL); diff --git a/testsuite/gtk/defaultvalue.c b/testsuite/gtk/defaultvalue.c index 34e6fb9f18..3612ab84ba 100644 --- a/testsuite/gtk/defaultvalue.c +++ b/testsuite/gtk/defaultvalue.c @@ -490,7 +490,7 @@ main (int argc, char **argv) otypes = gtk_test_list_all_types (NULL); for (i = 0; otypes[i]; i++) { - gchar *testname; + char *testname; if (otypes[i] == GTK_TYPE_FILE_CHOOSER_NATIVE) continue; diff --git a/testsuite/gtk/displayclose.c b/testsuite/gtk/displayclose.c index 5c1c2fee8a..e274995cf2 100644 --- a/testsuite/gtk/displayclose.c +++ b/testsuite/gtk/displayclose.c @@ -3,7 +3,7 @@ int main (int argc, char **argv) { - const gchar *display_name; + const char *display_name; GdkDisplay *display; GtkWidget *win, *but; gboolean has_display; diff --git a/testsuite/gtk/entry.c b/testsuite/gtk/entry.c index 1f03c4f3d3..a5a8150c3e 100644 --- a/testsuite/gtk/entry.c +++ b/testsuite/gtk/entry.c @@ -24,8 +24,8 @@ typedef struct { int count; int start; int end; - gchar *text; - gchar *new_text; + char *text; + char *new_text; int position; int length; } EntryData; @@ -48,7 +48,7 @@ notify (GtkEditable *editable, GParamSpec *pspec, EntryData *data) static void insert_text (GtkEditable *editable, - const gchar *new_text, + const char *new_text, int new_text_length, int *position, EntryData *data) diff --git a/testsuite/gtk/filtermodel.c b/testsuite/gtk/filtermodel.c index 9e9916744c..51728532be 100644 --- a/testsuite/gtk/filtermodel.c +++ b/testsuite/gtk/filtermodel.c @@ -50,7 +50,7 @@ create_tree_store_set_values (GtkTreeStore *store, gboolean visible) { GtkTreePath *path; - gchar *path_string; + char *path_string; path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), iter); path_string = gtk_tree_path_to_string (path); @@ -525,7 +525,7 @@ check_filter_model_recurse (FilterTest *fixture, if (visible) { GtkTreePath *tmp; - gchar *filter_str, *store_str; + char *filter_str, *store_str; g_assert_true (filter_has_next); @@ -607,7 +607,7 @@ check_filter_model_with_root (FilterTest *fixture, static void check_level_length (GtkTreeModelFilter *filter, - const gchar *level, + const char *level, const int expected_length) { if (!level) @@ -633,7 +633,7 @@ check_level_length (GtkTreeModelFilter *filter, static void set_path_visibility (FilterTest *fixture, - const gchar *path, + const char *path, gboolean visible) { GtkTreeIter store_iter; @@ -648,7 +648,7 @@ set_path_visibility (FilterTest *fixture, #if 0 static void insert_path_with_visibility (FilterTest *fixture, - const gchar *path_string, + const char *path_string, gboolean visible) { int position; @@ -6184,7 +6184,7 @@ specific_bug_621076_visible_func (GtkTreeModel *model, gpointer data) { gboolean visible = FALSE; - gchar *str = NULL; + char *str = NULL; gtk_tree_model_get (model, iter, 0, &str, -1); if (str != NULL && g_str_has_prefix (str, "visible")) @@ -6480,7 +6480,7 @@ specific_bug_657353_visible_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { - gchar *str; + char *str; gboolean ret = FALSE; gtk_tree_model_get (model, iter, 0, &str, -1); diff --git a/testsuite/gtk/gestures.c b/testsuite/gtk/gestures.c index 6e0234e658..07dc374858 100644 --- a/testsuite/gtk/gestures.c +++ b/testsuite/gtk/gestures.c @@ -189,7 +189,7 @@ point_release (PointState *point, g_object_unref (ev); } -static const gchar * +static const char * phase_nick (GtkPropagationPhase phase) { GTypeClass *class; @@ -202,7 +202,7 @@ phase_nick (GtkPropagationPhase phase) return value->value_nick; } -static const gchar * +static const char * state_nick (GtkEventSequenceState state) { GTypeClass *class; @@ -253,7 +253,7 @@ press_cb (GtkGesture *g, int n_press, gdouble x, gdouble y, gpointer data) GdkEventSequence *sequence; GtkPropagationPhase phase; GestureData *gd = data; - const gchar *name; + const char *name; name = g_object_get_data (G_OBJECT (g), "name"); phase = gtk_event_controller_get_propagation_phase (c); @@ -275,7 +275,7 @@ static void cancel_cb (GtkGesture *g, GdkEventSequence *sequence, gpointer data) { GestureData *gd = data; - const gchar *name; + const char *name; name = g_object_get_data (G_OBJECT (g), "name"); @@ -288,7 +288,7 @@ static void begin_cb (GtkGesture *g, GdkEventSequence *sequence, gpointer data) { GestureData *gd = data; - const gchar *name; + const char *name; name = g_object_get_data (G_OBJECT (g), "name"); @@ -304,7 +304,7 @@ static void end_cb (GtkGesture *g, GdkEventSequence *sequence, gpointer data) { GestureData *gd = data; - const gchar *name; + const char *name; name = g_object_get_data (G_OBJECT (g), "name"); @@ -317,7 +317,7 @@ static void update_cb (GtkGesture *g, GdkEventSequence *sequence, gpointer data) { GestureData *gd = data; - const gchar *name; + const char *name; name = g_object_get_data (G_OBJECT (g), "name"); @@ -330,7 +330,7 @@ static void state_changed_cb (GtkGesture *g, GdkEventSequence *sequence, GtkEventSequenceState state, gpointer data) { GestureData *gd = data; - const gchar *name; + const char *name; name = g_object_get_data (G_OBJECT (g), "name"); @@ -344,7 +344,7 @@ state_changed_cb (GtkGesture *g, GdkEventSequence *sequence, GtkEventSequenceSta static GtkGesture * -add_gesture (GtkWidget *w, const gchar *name, GtkPropagationPhase phase, GString *str, GtkEventSequenceState state) +add_gesture (GtkWidget *w, const char *name, GtkPropagationPhase phase, GString *str, GtkEventSequenceState state) { GtkGesture *g; GestureData *data; @@ -370,7 +370,7 @@ add_gesture (GtkWidget *w, const gchar *name, GtkPropagationPhase phase, GString } static GtkGesture * -add_mt_gesture (GtkWidget *w, const gchar *name, GtkPropagationPhase phase, GString *str, GtkEventSequenceState state) +add_mt_gesture (GtkWidget *w, const char *name, GtkPropagationPhase phase, GString *str, GtkEventSequenceState state) { GtkGesture *g; GestureData *data; diff --git a/testsuite/gtk/gtktreemodelrefcount.c b/testsuite/gtk/gtktreemodelrefcount.c index 58d7f05738..27b77eb92f 100644 --- a/testsuite/gtk/gtktreemodelrefcount.c +++ b/testsuite/gtk/gtktreemodelrefcount.c @@ -184,7 +184,7 @@ static void dump_iter (GtkTreeModelRefCount *ref_model, GtkTreeIter *iter) { - gchar *path_str; + char *path_str; NodeInfo *info; GtkTreePath *path; diff --git a/testsuite/gtk/icontheme.c b/testsuite/gtk/icontheme.c index b6387ce9d9..4859edf39c 100644 --- a/testsuite/gtk/icontheme.c +++ b/testsuite/gtk/icontheme.c @@ -160,7 +160,7 @@ log_writer (GLogLevelFlags log_level, if (g_str_has_prefix (msg, "\tlookup name: ")) { - gchar *s; + char *s; s = g_strchomp (g_strdup (msg + strlen ("\tlookup name: "))); lookups = g_list_append (lookups, s); } @@ -179,7 +179,7 @@ assert_lookup_order (const char *icon_name, { guint debug_flags; va_list args; - const gchar *s; + const char *s; GtkIconPaintable *info; GList *l; @@ -216,7 +216,7 @@ assert_lookup_order (const char *icon_name, { g_assert (l != NULL); g_assert_cmpstr (s, ==, l->data); - s = va_arg (args, gchar*); + s = va_arg (args, char *); l = l->next; } g_assert (l == NULL); @@ -745,7 +745,7 @@ test_nonsquare_symbolic (void) GskRenderNode *node; graphene_rect_t bounds; - gchar *path = g_build_filename (g_test_get_dir (G_TEST_DIST), + char *path = g_build_filename (g_test_get_dir (G_TEST_DIST), "icons", "scalable", "nonsquare-symbolic.svg", diff --git a/testsuite/gtk/listbox.c b/testsuite/gtk/listbox.c index 43c2443651..a5c895235c 100644 --- a/testsuite/gtk/listbox.c +++ b/testsuite/gtk/listbox.c @@ -52,7 +52,7 @@ test_sort (void) GtkListBoxRow *row; GtkWidget *label; int i, r; - gchar *s; + char *s; int count; list = GTK_LIST_BOX (gtk_list_box_new ()); @@ -108,7 +108,7 @@ test_selection (void) GtkListBoxRow *row, *row2; GtkWidget *label; int i; - gchar *s; + char *s; int count; int index; @@ -197,7 +197,7 @@ test_multi_selection (void) GtkListBoxRow *row, *row2; GtkWidget *label; int i; - gchar *s; + char *s; int count; list = GTK_LIST_BOX (gtk_list_box_new ()); @@ -310,7 +310,7 @@ test_filter (void) GtkListBox *list; GtkListBoxRow *row; int i; - gchar *s; + char *s; GtkWidget *label; int count; @@ -357,7 +357,7 @@ header_func (GtkListBoxRow *row, int i; int *count = data; GtkWidget *header; - gchar *s; + char *s; (*count)++; @@ -402,7 +402,7 @@ test_header (void) GtkListBox *list; GtkListBoxRow *row; int i; - gchar *s; + char *s; GtkWidget *label; int count; diff --git a/testsuite/gtk/notify.c b/testsuite/gtk/notify.c index ed2076455f..905f0c002d 100644 --- a/testsuite/gtk/notify.c +++ b/testsuite/gtk/notify.c @@ -40,7 +40,7 @@ assert_notifies (GObject *object, typedef struct { - const gchar *name; + const char *name; int count; } NotifyData; @@ -245,8 +245,8 @@ check_property (GObject *instance, GParamSpec *pspec) { NotifyData data; gulong id; - gchar *value; - gchar *new_value; + char *value; + char *new_value; data.name = pspec->name; data.count = 0; @@ -686,7 +686,7 @@ main (int argc, char **argv) otypes = gtk_test_list_all_types (NULL); for (i = 0; otypes[i]; i++) { - gchar *testname; + char *testname; testname = g_strdup_printf ("/Notification/%s", g_type_name (otypes[i])); g_test_add_data_func (testname, &otypes[i], test_type); diff --git a/testsuite/gtk/object.c b/testsuite/gtk/object.c index f666d9218d..cd14013614 100644 --- a/testsuite/gtk/object.c +++ b/testsuite/gtk/object.c @@ -316,7 +316,7 @@ main (int argc, G_TYPE_IS_OBJECT (otypes[i]) && !G_TYPE_IS_ABSTRACT (otypes[i])) { - gchar *testpath = g_strdup_printf ("/properties/%s", g_type_name (otypes[i])); + char *testpath = g_strdup_printf ("/properties/%s", g_type_name (otypes[i])); g_test_add_data_func (testpath, (void*) otypes[i], widget_property_tests); g_free (testpath); } diff --git a/testsuite/gtk/objects-finalize.c b/testsuite/gtk/objects-finalize.c index 17bebfd9c8..15c68fab79 100644 --- a/testsuite/gtk/objects-finalize.c +++ b/testsuite/gtk/objects-finalize.c @@ -171,7 +171,7 @@ main (int argc, char **argv) !g_type_is_a (all_types[i], GTK_TYPE_SHORTCUT_TRIGGER) && !g_type_is_a (all_types[i], GTK_TYPE_SHORTCUT_ACTION)) { - gchar *test_path = g_strdup_printf ("/FinalizeObject/%s", g_type_name (all_types[i])); + char *test_path = g_strdup_printf ("/FinalizeObject/%s", g_type_name (all_types[i])); g_test_add_data_func (test_path, GSIZE_TO_POINTER (all_types[i]), test_finalize_object); diff --git a/testsuite/gtk/recentmanager.c b/testsuite/gtk/recentmanager.c index 9594c9fe1a..20f0cc1f5f 100644 --- a/testsuite/gtk/recentmanager.c +++ b/testsuite/gtk/recentmanager.c @@ -20,8 +20,8 @@ #include #include -const gchar *uri = "file:///tmp/testrecentchooser.txt"; -const gchar *uri2 = "file:///tmp/testrecentchooser2.txt"; +const char *uri = "file:///tmp/testrecentchooser.txt"; +const char *uri2 = "file:///tmp/testrecentchooser2.txt"; static void recent_manager_get_default (void) diff --git a/testsuite/gtk/templates.c b/testsuite/gtk/templates.c index 3653223878..9eb1974213 100644 --- a/testsuite/gtk/templates.c +++ b/testsuite/gtk/templates.c @@ -252,9 +252,9 @@ test_color_chooser_dialog_show (void) /* Avoid warnings from GVFS-RemoteVolumeMonitor */ static gboolean -ignore_gvfs_warning (const gchar *log_domain, +ignore_gvfs_warning (const char *log_domain, GLogLevelFlags log_level, - const gchar *message, + const char *message, gpointer user_data) { if (g_strcmp0 (log_domain, "GVFS-RemoteVolumeMonitor") == 0) diff --git a/testsuite/gtk/textbuffer.c b/testsuite/gtk/textbuffer.c index 7498f2b789..b0a2e243c2 100644 --- a/testsuite/gtk/textbuffer.c +++ b/testsuite/gtk/textbuffer.c @@ -24,7 +24,7 @@ #include "gtk/gtktexttypes.h" /* Private header, for UNKNOWN_CHAR */ static void -gtk_text_iter_spew (const GtkTextIter *iter, const gchar *desc) +gtk_text_iter_spew (const GtkTextIter *iter, const char *desc) { g_print (" %20s: line %d / char %d / line char %d / line byte %d\n", desc, @@ -157,7 +157,7 @@ count_toggles_in_buffer (GtkTextBuffer *buffer, static void check_specific_tag_in_range (GtkTextBuffer *buffer, - const gchar *tag_name, + const char *tag_name, const GtkTextIter *start, const GtkTextIter *end) { @@ -270,7 +270,7 @@ check_specific_tag_in_range (GtkTextBuffer *buffer, static void check_specific_tag (GtkTextBuffer *buffer, - const gchar *tag_name) + const char *tag_name) { GtkTextIter start, end; @@ -682,7 +682,7 @@ fill_buffer (GtkTextBuffer *buffer) for (i = 0; i < 10; i++) { - gchar *str; + char *str; gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0); @@ -1350,11 +1350,11 @@ test_tag (void) static void check_buffer_contents (GtkTextBuffer *buffer, - const gchar *contents) + const char *contents) { GtkTextIter start; GtkTextIter end; - gchar *buffer_contents; + char *buffer_contents; gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_get_end_iter (buffer, &end); diff --git a/testsuite/gtk/textiter.c b/testsuite/gtk/textiter.c index c13e277ca3..08d5894b13 100644 --- a/testsuite/gtk/textiter.c +++ b/testsuite/gtk/textiter.c @@ -47,17 +47,17 @@ test_empty_search (void) } static void -check_found_forward (const gchar *haystack, - const gchar *needle, +check_found_forward (const char *haystack, + const char *needle, GtkTextSearchFlags flags, int expected_start, int expected_end, - const gchar *expected_string) + const char *expected_string) { GtkTextBuffer *buffer; GtkTextIter i, s, e; gboolean res; - gchar *text; + char *text; buffer = gtk_text_buffer_new (NULL); @@ -80,17 +80,17 @@ check_found_forward (const gchar *haystack, } static void -check_found_backward (const gchar *haystack, - const gchar *needle, +check_found_backward (const char *haystack, + const char *needle, GtkTextSearchFlags flags, int expected_start, int expected_end, - const gchar *expected_string) + const char *expected_string) { GtkTextBuffer *buffer; GtkTextIter i, s, e; gboolean res; - gchar *text; + char *text; buffer = gtk_text_buffer_new (NULL); @@ -110,8 +110,8 @@ check_found_backward (const gchar *haystack, } static void -check_not_found (const gchar *haystack, - const gchar *needle, +check_not_found (const char *haystack, + const char *needle, GtkTextSearchFlags flags) { GtkTextBuffer *buffer; @@ -331,7 +331,7 @@ test_forward_to_tag_toggle (void) } static void -check_forward_line_end (const gchar *buffer_text, +check_forward_line_end (const char *buffer_text, int initial_offset, int result_offset, gboolean ret) @@ -363,7 +363,7 @@ test_forward_to_line_end (void) } static void -check_word_boundaries (const gchar *buffer_text, +check_word_boundaries (const char *buffer_text, int offset, gboolean starts_word, gboolean ends_word, @@ -385,7 +385,7 @@ check_word_boundaries (const gchar *buffer_text, } static void -check_forward_word_end (const gchar *buffer_text, +check_forward_word_end (const char *buffer_text, int initial_offset, int result_offset, gboolean ret) @@ -405,7 +405,7 @@ check_forward_word_end (const gchar *buffer_text, } static void -check_backward_word_start (const gchar *buffer_text, +check_backward_word_start (const char *buffer_text, int initial_offset, int result_offset, gboolean ret) @@ -535,7 +535,7 @@ test_visible_word_boundaries (void) } static void -check_is_cursor_position (const gchar *buffer_text, +check_is_cursor_position (const char *buffer_text, int offset, gboolean ret) { @@ -552,7 +552,7 @@ check_is_cursor_position (const gchar *buffer_text, } static void -check_cursor_position (const gchar *buffer_text, +check_cursor_position (const char *buffer_text, gboolean forward, int initial_offset, int result_offset, @@ -657,7 +657,7 @@ test_visible_cursor_positions (void) } static void -check_sentence_boundaries (const gchar *buffer_text, +check_sentence_boundaries (const char *buffer_text, int offset, gboolean starts_sentence, gboolean ends_sentence, @@ -679,7 +679,7 @@ check_sentence_boundaries (const gchar *buffer_text, } static void -check_forward_sentence_end (const gchar *buffer_text, +check_forward_sentence_end (const char *buffer_text, int initial_offset, int result_offset, gboolean ret) @@ -699,7 +699,7 @@ check_forward_sentence_end (const gchar *buffer_text, } static void -check_backward_sentence_start (const gchar *buffer_text, +check_backward_sentence_start (const char *buffer_text, int initial_offset, int result_offset, gboolean ret) diff --git a/testsuite/gtk/treemodel.c b/testsuite/gtk/treemodel.c index a9ebd0d06d..b0018edfda 100644 --- a/testsuite/gtk/treemodel.c +++ b/testsuite/gtk/treemodel.c @@ -133,7 +133,7 @@ signal_monitor_generic_handler (SignalMonitor *m, if (g_queue_is_empty (m->queue)) { - gchar *path_str; + char *path_str; path_str = gtk_tree_path_to_string (path); g_error ("Signal queue empty, got signal %s path %s", @@ -164,7 +164,7 @@ signal_monitor_generic_handler (SignalMonitor *m, (gtk_tree_path_get_depth (s->path) != 0 && gtk_tree_path_compare (s->path, path) != 0)) { - gchar *path_str, *s_path_str; + char *path_str, *s_path_str; s_path_str = gtk_tree_path_to_string (s->path); path_str = gtk_tree_path_to_string (path); @@ -329,7 +329,7 @@ signal_monitor_append_signal_reordered (SignalMonitor *m, void signal_monitor_append_signal (SignalMonitor *m, SignalName signal, - const gchar *path_string) + const char *path_string) { Signal *s; GtkTreePath *path; diff --git a/testsuite/gtk/treemodel.h b/testsuite/gtk/treemodel.h index b43c1ad335..cd32a1ead6 100644 --- a/testsuite/gtk/treemodel.h +++ b/testsuite/gtk/treemodel.h @@ -55,4 +55,4 @@ void signal_monitor_append_signal_path (SignalMonitor *m, GtkTreePath *path); void signal_monitor_append_signal (SignalMonitor *m, SignalName signal, - const gchar *path_string); + const char *path_string); diff --git a/testsuite/gtk/treepath.c b/testsuite/gtk/treepath.c index da77bf0a43..147ac64e43 100644 --- a/testsuite/gtk/treepath.c +++ b/testsuite/gtk/treepath.c @@ -64,10 +64,10 @@ test_prepend (void) static void test_to_string (void) { - const gchar *str = "0:1:2:3:4:5:6:7:8:9:10"; + const char *str = "0:1:2:3:4:5:6:7:8:9:10"; GtkTreePath *p; int *indices; - gchar *s; + char *s; int i; p = gtk_tree_path_new_from_string (str); diff --git a/testsuite/gtk/typename.c b/testsuite/gtk/typename.c index ddbdf44746..1b357b67dc 100644 --- a/testsuite/gtk/typename.c +++ b/testsuite/gtk/typename.c @@ -19,8 +19,8 @@ #include /* Keep in sync with gtkbuilder.c ! */ -static gchar * -type_name_mangle (const gchar *name, +static char * +type_name_mangle (const char *name, gboolean split_first_cap) { GString *symbol_name = g_string_new (""); @@ -44,9 +44,9 @@ type_name_mangle (const gchar *name, } static void -check (const gchar *TN, const gchar *gtf, const char *gtf_splitcap) +check (const char *TN, const char *gtf, const char *gtf_splitcap) { - gchar *symbol; + char *symbol; symbol = type_name_mangle (TN, FALSE); g_assert_cmpstr (symbol, ==, gtf); diff --git a/testsuite/performance/test-performance.c b/testsuite/performance/test-performance.c index 506763a751..8715eefcb0 100644 --- a/testsuite/performance/test-performance.c +++ b/testsuite/performance/test-performance.c @@ -120,7 +120,7 @@ main (int argc, char *argv[]) GSubprocessLauncher *launcher; GSubprocess *subprocess; int fd; - gchar *name; + char *name; SysprofCaptureReader *reader; SysprofCaptureCursor *cursor; SysprofCaptureCondition *condition; From 556997f9df3b771733fc49a02d5424aee276e29f Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 24 Jul 2020 22:25:56 +0200 Subject: [PATCH 3/4] Replace "gfloat" with "float" --- demos/gtk-demo/main.c | 1 - docs/CODING-STYLE.md | 4 ++-- gtk/a11y/gtktextcellaccessible.c | 4 ++-- gtk/gtkcellrenderer.c | 12 ++++++------ gtk/gtkcellrenderer.h | 8 ++++---- gtk/gtkcellrendererpixbuf.c | 2 +- gtk/gtkcellrendererprogress.c | 6 +++--- gtk/gtkcellrendererspinner.c | 2 +- gtk/gtkcellrenderertext.c | 2 +- gtk/gtkcellrenderertoggle.c | 2 +- gtk/gtkentry.c | 5 +++-- gtk/gtkentry.h | 4 ++-- gtk/gtkframe.c | 6 +++--- gtk/gtkframe.h | 4 ++-- gtk/gtkiconview.c | 6 +++--- gtk/gtkiconview.h | 4 ++-- gtk/gtkiconviewprivate.h | 4 ++-- gtk/gtklabel.c | 14 +++++++------- gtk/gtklabel.h | 8 ++++---- gtk/gtkmarshalers.list | 2 +- gtk/gtktreedatalist.c | 2 +- gtk/gtktreedatalist.h | 2 +- gtk/gtktreeview.c | 8 ++++---- gtk/gtktreeview.h | 4 ++-- gtk/gtktreeviewcolumn.c | 6 +++--- gtk/gtktreeviewcolumn.h | 4 ++-- tests/testframe.c | 2 +- tests/testtooltips.c | 6 +++--- testsuite/gtk/notify.c | 4 ++-- 29 files changed, 69 insertions(+), 69 deletions(-) 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; From 3078b180fe79efd0e58239dabb7098c40aced1a8 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 24 Jul 2020 22:32:16 +0200 Subject: [PATCH 4/4] Replace "gdouble" with "double" --- demos/gtk-demo/assistant.c | 2 +- demos/gtk-demo/drawingarea.c | 4 +- demos/gtk-demo/font_features.c | 4 +- demos/gtk-demo/fontplane.c | 18 +-- demos/gtk-demo/gestures.c | 22 +-- demos/gtk-demo/hypertext.c | 8 +- demos/gtk-demo/listview_colors.c | 14 +- demos/gtk-demo/main.c | 2 - demos/gtk-demo/paint.c | 20 +-- demos/gtk-demo/printing.c | 4 +- demos/gtk-demo/spinbutton.c | 18 +-- demos/widget-factory/widget-factory.c | 6 +- docs/reference/gtk/getting_started.md | 4 +- examples/drawing.c | 4 +- gdk/broadway/gdkdevice-broadway.c | 18 +-- gdk/broadway/gdksurface-broadway.c | 4 +- gdk/gdkcairo.c | 4 +- gdk/gdkcairo.h | 4 +- gdk/gdkdevice.c | 74 ++++----- gdk/gdkdevice.h | 6 +- gdk/gdkdeviceprivate.h | 46 +++--- gdk/gdkdisplay.c | 2 +- gdk/gdkdisplayprivate.h | 2 +- gdk/gdkevents.c | 22 +-- gdk/gdkinternals.h | 8 +- gdk/gdkrgba.c | 4 +- gdk/gdksurface.c | 2 +- gdk/gdksurfaceprivate.h | 4 +- gdk/macos/gdkmacosdevice.c | 12 +- gdk/macos/gdkmacosdisplay-translate.c | 10 +- gdk/macos/gdkmacosdrag.c | 4 +- gdk/macos/gdkmacossurface.c | 4 +- gdk/wayland/gdkdevice-wayland.c | 48 +++--- gdk/wayland/gdkdisplay-wayland.c | 4 +- gdk/wayland/gdksurface-wayland.c | 4 +- gdk/win32/gdkclipdrop-win32.c | 2 +- gdk/win32/gdkcursor-win32.c | 4 +- gdk/win32/gdkdevice-virtual.c | 8 +- gdk/win32/gdkdevice-win32.c | 6 +- gdk/win32/gdkdevice-win32.h | 4 +- gdk/win32/gdkdevice-wintab.c | 14 +- gdk/win32/gdkdevice-wintab.h | 6 +- gdk/win32/gdkdevicemanager-win32.c | 4 +- gdk/win32/gdkdrag-win32.c | 4 +- gdk/win32/gdkevents-win32.c | 8 +- gdk/win32/gdksurface-win32.c | 48 +++--- gdk/win32/gdksurface-win32.h | 10 +- gdk/win32/gdkwin32misc.h | 4 +- gdk/x11/gdkdevice-xi2.c | 44 +++--- gdk/x11/gdkdevicemanager-xi2.c | 30 ++-- gdk/x11/gdkdrag-x11.c | 4 +- gdk/x11/gdkeventsource.c | 2 +- gdk/x11/gdkprivate-x11.h | 10 +- gdk/x11/gdksurface-x11.c | 16 +- gdk/x11/gdkxftdefaults.c | 2 +- gsk/gskcairoblur.c | 6 +- gsk/gskrendernodeimpl.c | 2 +- gtk/a11y/gtklevelbaraccessible.c | 4 +- gtk/a11y/gtkpanedaccessible.c | 4 +- gtk/a11y/gtkprogressbaraccessible.c | 2 +- gtk/a11y/gtkrangeaccessible.c | 10 +- gtk/a11y/gtkscalebuttonaccessible.c | 6 +- gtk/a11y/gtkspinbuttonaccessible.c | 6 +- gtk/a11y/gtktextcellaccessible.c | 2 +- gtk/a11y/gtktextviewaccessible.c | 4 +- gtk/gen-paper-names.c | 8 +- gtk/gsettings-mapping.c | 10 +- gtk/gskpango.c | 2 +- gtk/gtkadjustment.c | 92 ++++++------ gtk/gtkadjustment.h | 54 +++---- gtk/gtkadjustmentprivate.h | 4 +- gtk/gtkbuilder.c | 2 +- gtk/gtkbutton.c | 8 +- gtk/gtkcalendar.c | 8 +- gtk/gtkcellrendererspin.c | 2 +- gtk/gtkcellrendererspinner.c | 10 +- gtk/gtkcellrenderertext.c | 2 +- gtk/gtkcolorchooserwidget.c | 2 +- gtk/gtkcoloreditor.c | 8 +- gtk/gtkcolorplane.c | 32 ++-- gtk/gtkcolorscale.c | 12 +- gtk/gtkcolorswatch.c | 10 +- gtk/gtkcolorswatchprivate.h | 8 +- gtk/gtkcombobox.c | 10 +- gtk/gtkcssboxesimplprivate.h | 4 +- gtk/gtkcsscolorvalue.c | 10 +- gtk/gtkcsscolorvalueprivate.h | 6 +- gtk/gtkcustompaperunixdialog.c | 2 +- gtk/gtkdragsource.c | 4 +- gtk/gtkentry.c | 24 +-- gtk/gtkentry.h | 8 +- gtk/gtkeventcontrollerscroll.c | 22 +-- gtk/gtkexpander.c | 8 +- gtk/gtkfilechooserwidget.c | 8 +- gtk/gtkflowbox.c | 34 ++--- gtk/gtkfontchooserwidget.c | 16 +- gtk/gtkgesture.c | 18 +-- gtk/gtkgesture.h | 8 +- gtk/gtkgestureclick.c | 10 +- gtk/gtkgestureclickprivate.h | 8 +- gtk/gtkgesturedrag.c | 20 +-- gtk/gtkgesturedrag.h | 8 +- gtk/gtkgesturedragprivate.h | 12 +- gtk/gtkgesturelongpress.c | 10 +- gtk/gtkgesturelongpressprivate.h | 4 +- gtk/gtkgesturepan.c | 20 +-- gtk/gtkgesturepanprivate.h | 2 +- gtk/gtkgesturerotate.c | 16 +- gtk/gtkgesturerotate.h | 2 +- gtk/gtkgesturerotateprivate.h | 4 +- gtk/gtkgesturestylus.c | 10 +- gtk/gtkgesturestylus.h | 4 +- gtk/gtkgesturestylusprivate.h | 16 +- gtk/gtkgestureswipe.c | 16 +- gtk/gtkgestureswipe.h | 4 +- gtk/gtkgestureswipeprivate.h | 4 +- gtk/gtkgesturezoom.c | 14 +- gtk/gtkgesturezoom.h | 2 +- gtk/gtkgesturezoomprivate.h | 2 +- gtk/gtkhsla.c | 20 +-- gtk/gtkiconview.c | 10 +- gtk/gtkimcontextwayland.c | 12 +- gtk/gtkinfobar.c | 4 +- gtk/gtkkineticscrolling.c | 60 ++++---- gtk/gtkkineticscrollingprivate.h | 18 +-- gtk/gtklabel.c | 42 +++--- gtk/gtklevelbar.c | 42 +++--- gtk/gtklevelbar.h | 20 +-- gtk/gtklistbox.c | 24 +-- gtk/gtkmagnifier.c | 14 +- gtk/gtkmagnifierprivate.h | 12 +- gtk/gtkmarshalers.list | 2 +- gtk/gtknotebook.c | 8 +- gtk/gtkpadcontroller.c | 4 +- gtk/gtkpagesetup.c | 32 ++-- gtk/gtkpagesetup.h | 24 +-- gtk/gtkpagesetupunixdialog.c | 2 +- gtk/gtkpaned.c | 22 +-- gtk/gtkpapersize.c | 50 +++--- gtk/gtkpapersize.h | 28 ++-- gtk/gtkpathbar.c | 8 +- gtk/gtkplacessidebar.c | 32 ++-- gtk/gtkpointerfocus.c | 8 +- gtk/gtkpointerfocusprivate.h | 10 +- gtk/gtkprintbackend.c | 32 ++-- gtk/gtkprintbackendprivate.h | 20 +-- gtk/gtkprintcontext.c | 50 +++--- gtk/gtkprintcontext.h | 16 +- gtk/gtkprinter.c | 20 +-- gtk/gtkprinter.h | 16 +- gtk/gtkprinterprivate.h | 4 +- gtk/gtkprintjob.c | 8 +- gtk/gtkprintjob.h | 4 +- gtk/gtkprintoperation-portal.c | 2 +- gtk/gtkprintoperation-private.h | 12 +- gtk/gtkprintoperation-unix.c | 16 +- gtk/gtkprintoperation-win32.c | 4 +- gtk/gtkprintoperation.c | 24 +-- gtk/gtkprintsettings.c | 32 ++-- gtk/gtkprintsettings.h | 28 ++-- gtk/gtkprintunixdialog.c | 16 +- gtk/gtkprintutils.c | 8 +- gtk/gtkprintutils.h | 4 +- gtk/gtkprivate.h | 4 +- gtk/gtkprogressbar.c | 16 +- gtk/gtkprogressbar.h | 8 +- gtk/gtkprogresstracker.c | 30 ++-- gtk/gtkprogresstrackerprivate.h | 12 +- gtk/gtkrange.c | 142 +++++++++--------- gtk/gtkrange.h | 20 +-- gtk/gtkrangeprivate.h | 2 +- gtk/gtkrender.c | 104 ++++++------- gtk/gtkrender.h | 96 ++++++------ gtk/gtkrenderborder.c | 2 +- gtk/gtkrevealer.c | 14 +- gtk/gtkroundedbox.c | 4 +- gtk/gtkscale.c | 24 +-- gtk/gtkscale.h | 8 +- gtk/gtkscalebutton.c | 32 ++-- gtk/gtkscalebutton.h | 12 +- gtk/gtkscrolledwindow.c | 100 ++++++------ gtk/gtksettings.c | 2 +- gtk/gtkshortcutssection.c | 4 +- gtk/gtksnapshot.c | 28 ++-- gtk/gtksnapshot.h | 32 ++-- gtk/gtkspinbutton.c | 74 ++++----- gtk/gtkspinbutton.h | 32 ++-- gtk/gtkstack.c | 6 +- gtk/gtkstylecontext.c | 18 +-- gtk/gtkstylecontext.h | 4 +- gtk/gtkswitch.c | 14 +- gtk/gtktextattributes.h | 2 +- gtk/gtktexthandle.c | 14 +- gtk/gtktextview.c | 100 ++++++------ gtk/gtktextview.h | 12 +- gtk/gtktooltip.c | 4 +- gtk/gtktreedatalist.c | 2 +- gtk/gtktreedatalist.h | 2 +- gtk/gtktreeview.c | 108 ++++++------- gtk/gtktreeviewcolumn.c | 16 +- gtk/gtkviewport.c | 4 +- gtk/gtkvolumebutton.c | 6 +- gtk/gtkwidget.c | 22 +-- gtk/gtkwidget.h | 12 +- gtk/gtkwindow.c | 8 +- gtk/gtkwindowprivate.h | 4 +- gtk/inspector/visual.c | 18 +-- gtk/tools/gdkpixbufutils.c | 4 +- .../printbackends/gtkprintbackendcloudprint.c | 10 +- modules/printbackends/gtkprintbackendcups.c | 40 ++--- modules/printbackends/gtkprintbackendfile.c | 10 +- modules/printbackends/gtkprintbackendlpr.c | 8 +- tests/motion-compression.c | 4 +- tests/rendernode-create-tests.c | 10 +- tests/scrolling-performance.c | 10 +- tests/testassistant.c | 2 +- tests/testframe.c | 6 +- tests/testgrid.c | 4 +- tests/testgtk.c | 22 +-- tests/testiconview.c | 4 +- tests/testlevelbar.c | 2 +- tests/testscale.c | 8 +- tests/testscrolledwindow.c | 4 +- tests/testtreemodel.c | 2 +- tests/testtreepos.c | 4 +- tests/testvolumebutton.c | 2 +- tests/testwidgetfocus.c | 4 +- tests/video-timer.c | 2 +- testsuite/a11y/accessibility-dump.c | 2 +- testsuite/a11y/tree-performance.c | 8 +- testsuite/a11y/value.c | 4 +- testsuite/gtk/builder.c | 2 +- testsuite/gtk/gestures.c | 6 +- testsuite/gtk/notify.c | 6 +- 234 files changed, 1763 insertions(+), 1765 deletions(-) diff --git a/demos/gtk-demo/assistant.c b/demos/gtk-demo/assistant.c index d3f3780a6b..58405f6cc9 100644 --- a/demos/gtk-demo/assistant.c +++ b/demos/gtk-demo/assistant.c @@ -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)); diff --git a/demos/gtk-demo/drawingarea.c b/demos/gtk-demo/drawingarea.c index d36b6aa6d2..f7b567d382 100644 --- a/demos/gtk-demo/drawingarea.c +++ b/demos/gtk-demo/drawingarea.c @@ -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; diff --git a/demos/gtk-demo/font_features.c b/demos/gtk-demo/font_features.c index 0e7a3cf333..6174b27f9b 100644 --- a/demos/gtk-demo/font_features.c +++ b/demos/gtk-demo/font_features.c @@ -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]; diff --git a/demos/gtk-demo/fontplane.c b/demos/gtk-demo/fontplane.c index 3836799293..b8c4f8c87d 100644 --- a/demos/gtk-demo/fontplane.c +++ b/demos/gtk-demo/fontplane.c @@ -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); diff --git a/demos/gtk-demo/gestures.c b/demos/gtk-demo/gestures.c index 99dccaa9a5..690d4ea355 100644 --- a/demos/gtk-demo/gestures.c +++ b/demos/gtk-demo/gestures.c @@ -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); diff --git a/demos/gtk-demo/hypertext.c b/demos/gtk-demo/hypertext.c index ad753c1756..95c5a3ea31 100644 --- a/demos/gtk-demo/hypertext.c +++ b/demos/gtk-demo/hypertext.c @@ -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); diff --git a/demos/gtk-demo/listview_colors.c b/demos/gtk-demo/listview_colors.c index b735fd2a1c..edbdb75c4d 100644 --- a/demos/gtk-demo/listview_colors.c +++ b/demos/gtk-demo/listview_colors.c @@ -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; diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c index 889b539dc1..722ae6fa08 100644 --- a/demos/gtk-demo/main.c +++ b/demos/gtk-demo/main.c @@ -270,8 +270,6 @@ static const char *types[] = "gshort", "gushort", "gulong", - "gdouble", - "gldouble", "gpointer", "NULL", "GList", diff --git a/demos/gtk-demo/paint.c b/demos/gtk-demo/paint.c index d3e6c59cf1..e95e25a5a1 100644 --- a/demos/gtk-demo/paint.c +++ b/demos/gtk-demo/paint.c @@ -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); diff --git a/demos/gtk-demo/printing.c b/demos/gtk-demo/printing.c index 5dd0ed493b..f095c59575 100644 --- a/demos/gtk-demo/printing.c +++ b/demos/gtk-demo/printing.c @@ -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; diff --git a/demos/gtk-demo/spinbutton.c b/demos/gtk-demo/spinbutton.c index da41f04407..8fd93ddb0f 100644 --- a/demos/gtk-demo/spinbutton.c +++ b/demos/gtk-demo/spinbutton.c @@ -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); diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c index 90915f6b70..1ca731eb2c 100644 --- a/demos/widget-factory/widget-factory.c +++ b/demos/widget-factory/widget-factory.c @@ -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); diff --git a/docs/reference/gtk/getting_started.md b/docs/reference/gtk/getting_started.md index d3b62b437c..d12d35ff30 100644 --- a/docs/reference/gtk/getting_started.md +++ b/docs/reference/gtk/getting_started.md @@ -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; diff --git a/examples/drawing.c b/examples/drawing.c index 4986f69539..9bc05e5fdb 100644 --- a/examples/drawing.c +++ b/examples/drawing.c @@ -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; diff --git a/gdk/broadway/gdkdevice-broadway.c b/gdk/broadway/gdkdevice-broadway.c index 23fc5fd8dd..8fe6eab346 100644 --- a/gdk/broadway/gdkdevice-broadway.c +++ b/gdk/broadway/gdkdevice-broadway.c @@ -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; diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c index 5b5abdb6b3..87a0642630 100644 --- a/gdk/broadway/gdksurface-broadway.c +++ b/gdk/broadway/gdksurface-broadway.c @@ -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; diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c index 908fc75af8..d28b7e5b97 100644 --- a/gdk/gdkcairo.c +++ b/gdk/gdkcairo.c @@ -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; diff --git a/gdk/gdkcairo.h b/gdk/gdkcairo.h index 49b4117eb0..e2dc85c41c 100644 --- a/gdk/gdkcairo.h +++ b/gdk/gdkcairo.h @@ -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, diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c index ae6cd79e6b..745b8910a0 100644 --- a/gdk/gdkdevice.c +++ b/gdk/gdkdevice.c @@ -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) { GDK_DEVICE_GET_CLASS (device)->query_state (device, @@ -1272,8 +1272,8 @@ _gdk_device_query_state (GdkDevice *device, GdkSurface * _gdk_device_surface_at_position (GdkDevice *device, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask) { return GDK_DEVICE_GET_CLASS (device)->surface_at_position (device, diff --git a/gdk/gdkdevice.h b/gdk/gdkdevice.h index 09286c6119..7fe2aebb84 100644 --- a/gdk/gdkdevice.h +++ b/gdk/gdkdevice.h @@ -116,7 +116,7 @@ GdkAxisUse gdk_device_get_axis_use (GdkDevice *device, GDK_AVAILABLE_IN_ALL void gdk_device_get_state (GdkDevice *device, GdkSurface *surface, - gdouble *axes, + double *axes, GdkModifierType *mask); GDK_AVAILABLE_IN_ALL 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); GDK_AVAILABLE_IN_ALL gboolean gdk_device_get_axis (GdkDevice *device, - gdouble *axes, + double *axes, GdkAxisUse use, - gdouble *value); + double *value); GDK_AVAILABLE_IN_ALL GdkDisplay * gdk_device_get_display (GdkDevice *device); diff --git a/gdk/gdkdeviceprivate.h b/gdk/gdkdeviceprivate.h index 1bd00c4241..07184a3abe 100644 --- a/gdk/gdkdeviceprivate.h +++ b/gdk/gdkdeviceprivate.h @@ -63,7 +63,7 @@ struct _GdkDeviceClass void (* get_state) (GdkDevice *device, GdkSurface *surface, - gdouble *axes, + double *axes, GdkModifierType *mask); void (* set_surface_cursor)(GdkDevice *device, @@ -73,8 +73,8 @@ struct _GdkDeviceClass void (* query_state) (GdkDevice *device, GdkSurface *surface, GdkSurface **child_surface, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask); GdkGrabStatus (* grab) (GdkDevice *device, GdkSurface *surface, @@ -98,36 +98,36 @@ void _gdk_device_set_associated_device (GdkDevice *device, void _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); 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); gboolean _gdk_device_translate_surface_coord (GdkDevice *device, GdkSurface *surface, guint index, - gdouble value, - gdouble *axis_value); + double value, + double *axis_value); 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); gboolean _gdk_device_translate_axis (GdkDevice *device, guint index, - gdouble value, - gdouble *axis_value); + double value, + double *axis_value); GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device, int n_events); @@ -140,12 +140,12 @@ void _gdk_device_remove_physical_device (GdkDevice *device, 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); GdkSurface * _gdk_device_surface_at_position (GdkDevice *device, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask); void gdk_device_set_seat (GdkDevice *device, diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c index 5651bd1300..92f1de8a18 100644 --- a/gdk/gdkdisplay.c +++ b/gdk/gdkdisplay.c @@ -584,7 +584,7 @@ get_current_toplevel (GdkDisplay *display, GdkModifierType *state_out) { GdkSurface *pointer_surface; - gdouble x, y; + double x, y; GdkModifierType state; pointer_surface = _gdk_device_surface_at_position (device, &x, &y, &state); diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h index 2ddc6d81cf..13decb82be 100644 --- a/gdk/gdkdisplayprivate.h +++ b/gdk/gdkdisplayprivate.h @@ -62,7 +62,7 @@ typedef struct typedef struct { 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 button; GdkDevice *last_physical_device; diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index 2248b94208..8131d54d59 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -993,12 +993,12 @@ gdk_event_triggers_context_menu (GdkEvent *event) static gboolean gdk_events_get_axis_distances (GdkEvent *event1, GdkEvent *event2, - gdouble *x_distance, - gdouble *y_distance, - gdouble *distance) + double *x_distance, + double *y_distance, + double *distance) { - gdouble x1, x2, y1, y2; - gdouble xd, yd; + double x1, x2, y1, y2; + double xd, yd; if (!gdk_event_get_position (event1, &x1, &y1) || !gdk_event_get_position (event2, &x2, &y2)) @@ -1033,7 +1033,7 @@ gdk_events_get_axis_distances (GdkEvent *event1, gboolean gdk_events_get_distance (GdkEvent *event1, GdkEvent *event2, - gdouble *distance) + double *distance) { return gdk_events_get_axis_distances (event1, event2, NULL, NULL, @@ -1056,9 +1056,9 @@ gdk_events_get_distance (GdkEvent *event1, gboolean gdk_events_get_angle (GdkEvent *event1, 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, &x_distance, &y_distance, @@ -1097,10 +1097,10 @@ gdk_events_get_angle (GdkEvent *event1, gboolean gdk_events_get_center (GdkEvent *event1, GdkEvent *event2, - gdouble *x, - gdouble *y) + double *x, + double *y) { - gdouble x1, x2, y1, y2; + double x1, x2, y1, y2; if (!gdk_event_get_position (event1, &x1, &y1) || !gdk_event_get_position (event2, &x2, &y2)) diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index a4d85365fd..0a70e407d1 100644 --- a/gdk/gdkinternals.h +++ b/gdk/gdkinternals.h @@ -188,8 +188,8 @@ void _gdk_synthesize_crossing_events (GdkDisplay *display, GdkDevice *device, GdkDevice *source_device, GdkCrossingMode mode, - gdouble toplevel_x, - gdouble toplevel_y, + double toplevel_x, + double toplevel_y, GdkModifierType mask, guint32 time_, GdkEvent *event_in_queue, @@ -331,8 +331,8 @@ struct _GdkGeometry int base_height; int width_inc; int height_inc; - gdouble min_aspect; - gdouble max_aspect; + double min_aspect; + double max_aspect; GdkGravity win_gravity; }; diff --git a/gdk/gdkrgba.c b/gdk/gdkrgba.c index 80c4349572..20940db9d3 100644 --- a/gdk/gdkrgba.c +++ b/gdk/gdkrgba.c @@ -132,7 +132,7 @@ gdk_rgba_is_opaque (const GdkRGBA *rgba) static gboolean parse_rgb_value (const char *str, char **endp, - gdouble *number) + double *number) { const char *p; @@ -186,7 +186,7 @@ gdk_rgba_parse (GdkRGBA *rgba, const char *spec) { gboolean has_alpha; - gdouble r, g, b, a; + double r, g, b, a; char *str = (char *) spec; char *p; diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index eb2776b164..6b58c1f027 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -1705,7 +1705,7 @@ gdk_surface_get_device_position (GdkSurface *surface, double *y, GdkModifierType *mask) { - gdouble tmp_x, tmp_y; + double tmp_x, tmp_y; GdkModifierType tmp_mask; g_return_if_fail (GDK_IS_SURFACE (surface)); diff --git a/gdk/gdksurfaceprivate.h b/gdk/gdksurfaceprivate.h index b3a8457a58..5d750bfe2e 100644 --- a/gdk/gdksurfaceprivate.h +++ b/gdk/gdksurfaceprivate.h @@ -125,8 +125,8 @@ struct _GdkSurfaceClass int *root_y); gboolean (* get_device_state) (GdkSurface *surface, GdkDevice *device, - gdouble *x, - gdouble *y, + double *x, + double *y, GdkModifierType *mask); void (* set_input_region) (GdkSurface *surface, diff --git a/gdk/macos/gdkmacosdevice.c b/gdk/macos/gdkmacosdevice.c index 3b77c7a7d0..8dbbe1ac61 100644 --- a/gdk/macos/gdkmacosdevice.c +++ b/gdk/macos/gdkmacosdevice.c @@ -65,8 +65,8 @@ gdk_macos_device_set_surface_cursor (GdkDevice *device, static GdkSurface * gdk_macos_device_surface_at_position (GdkDevice *device, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *state) { GdkMacosDisplay *display; @@ -129,10 +129,10 @@ gdk_macos_device_ungrab (GdkDevice *device, static void gdk_macos_device_get_state (GdkDevice *device, GdkSurface *surface, - gdouble *axes, + double *axes, GdkModifierType *mask) { - gdouble x_pos, y_pos; + double x_pos, y_pos; g_assert (GDK_IS_MACOS_DEVICE (device)); g_assert (GDK_IS_MACOS_SURFACE (surface)); @@ -150,8 +150,8 @@ static void gdk_macos_device_query_state (GdkDevice *device, GdkSurface *surface, GdkSurface **child_surface, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask) { GdkDisplay *display; diff --git a/gdk/macos/gdkmacosdisplay-translate.c b/gdk/macos/gdkmacosdisplay-translate.c index 8e86459987..799031e3ef 100644 --- a/gdk/macos/gdkmacosdisplay-translate.c +++ b/gdk/macos/gdkmacosdisplay-translate.c @@ -433,7 +433,7 @@ fill_pinch_event (GdkMacosDisplay *display, } last_state = FP_STATE_IDLE; GdkSeat *seat; GdkTouchpadGesturePhase phase; - gdouble angle_delta = 0.0; + double angle_delta = 0.0; g_assert (GDK_IS_MACOS_DISPLAY (display)); g_assert (GDK_IS_MACOS_SURFACE (surface)); @@ -590,8 +590,8 @@ fill_scroll_event (GdkMacosDisplay *self, GdkDevice *pointer; GdkEvent *ret = NULL; GdkSeat *seat; - gdouble dx; - gdouble dy; + double dx; + double dy; g_assert (GDK_IS_MACOS_SURFACE (surface)); g_assert (nsevent != NULL); @@ -606,8 +606,8 @@ fill_scroll_event (GdkMacosDisplay *self, if ([nsevent hasPreciseScrollingDeltas]) { - gdouble sx; - gdouble sy; + double sx; + double sy; /* * TODO: We probably need another event type for the diff --git a/gdk/macos/gdkmacosdrag.c b/gdk/macos/gdkmacosdrag.c index 7cc70d921e..32c4a4ac74 100644 --- a/gdk/macos/gdkmacosdrag.c +++ b/gdk/macos/gdkmacosdrag.c @@ -305,8 +305,8 @@ gdk_drag_get_current_actions (GdkModifierType state, static void gdk_drag_update (GdkDrag *drag, - gdouble x_root, - gdouble y_root, + double x_root, + double y_root, GdkModifierType mods, guint32 evtime) { diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c index a5bc4098b9..1c0cdc12e9 100644 --- a/gdk/macos/gdkmacossurface.c +++ b/gdk/macos/gdkmacossurface.c @@ -230,8 +230,8 @@ gdk_macos_surface_get_root_coords (GdkSurface *surface, static gboolean gdk_macos_surface_get_device_state (GdkSurface *surface, GdkDevice *device, - gdouble *x, - gdouble *y, + double *x, + double *y, GdkModifierType *mask) { GdkDisplay *display; diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index e9fc839e83..0715bdeea5 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -73,8 +73,8 @@ typedef struct _GdkWaylandTabletPadData GdkWaylandTabletPadData; struct _GdkWaylandTouchData { uint32_t id; - gdouble x; - gdouble y; + double x; + double y; GdkSurface *surface; uint32_t touch_down_serial; guint initial_touch : 1; @@ -85,7 +85,7 @@ struct _GdkWaylandPointerFrameData GdkEvent *event; /* Specific to the scroll event */ - gdouble delta_x, delta_y; + double delta_x, delta_y; int32_t discrete_x, discrete_y; gint8 is_scroll_stop; enum wl_pointer_axis_source source; @@ -147,7 +147,7 @@ struct _GdkWaylandTabletPadGroupData struct { guint source; gboolean is_stop; - gdouble value; + double value; } axis_tmp_info; }; @@ -186,7 +186,7 @@ struct _GdkWaylandTabletData GdkWaylandTabletToolData *current_tool; int axis_indices[GDK_AXIS_LAST]; - gdouble *axes; + double *axes; }; struct _GdkWaylandSeat @@ -253,7 +253,7 @@ struct _GdkWaylandSeat /* Some tracking on gesture events */ guint gesture_n_fingers; - gdouble gesture_scale; + double gesture_scale; GdkCursor *grab_cursor; }; @@ -310,10 +310,10 @@ static void deliver_key_event (GdkWaylandSeat *seat, static void gdk_wayland_device_get_state (GdkDevice *device, GdkSurface *surface, - gdouble *axes, + double *axes, GdkModifierType *mask) { - gdouble x, y; + double x, y; gdk_surface_get_device_position (surface, device, &x, &y, mask); @@ -538,8 +538,8 @@ static void gdk_wayland_device_query_state (GdkDevice *device, GdkSurface *surface, GdkSurface **child_surface, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask) { GdkWaylandPointerData *pointer; @@ -788,8 +788,8 @@ gdk_wayland_device_ungrab (GdkDevice *device, static GdkSurface * gdk_wayland_device_surface_at_position (GdkDevice *device, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask) { GdkWaylandPointerData *pointer; @@ -1357,8 +1357,8 @@ flush_discrete_scroll_event (GdkWaylandSeat *seat, static void flush_smooth_scroll_event (GdkWaylandSeat *seat, - gdouble delta_x, - gdouble delta_y, + double delta_x, + double delta_y, gboolean is_stop) { GdkEvent *event; @@ -2543,8 +2543,8 @@ emit_gesture_swipe_event (GdkWaylandSeat *seat, GdkTouchpadGesturePhase phase, guint32 _time, guint32 n_fingers, - gdouble dx, - gdouble dy) + double dx, + double dy) { GdkEvent *event; @@ -2638,10 +2638,10 @@ emit_gesture_pinch_event (GdkWaylandSeat *seat, GdkTouchpadGesturePhase phase, guint32 _time, guint n_fingers, - gdouble dx, - gdouble dy, - gdouble scale, - gdouble angle_delta) + double dx, + double dy, + double scale, + double angle_delta) { GdkEvent *event; @@ -3393,7 +3393,7 @@ gdk_wayland_device_tablet_clone_tool_axes (GdkWaylandTabletData *tablet, g_free (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)); } @@ -3402,7 +3402,7 @@ static void gdk_wayland_mimic_device_axes (GdkDevice *logical, GdkDevice *physical) { - gdouble axis_min, axis_max, axis_resolution; + double axis_min, axis_max, axis_resolution; GdkAxisUse axis_use; int axis_count; int i; @@ -3510,7 +3510,7 @@ static double * tablet_copy_axes (GdkWaylandTabletData *tablet) { 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 @@ -3917,7 +3917,7 @@ tablet_pad_strip_handle_position (void *data, g_message ("tablet pad strip handle position, strip = %p position = %d", wp_tablet_pad_strip, position)); - group->axis_tmp_info.value = (gdouble) position / 65535; + group->axis_tmp_info.value = (double) position / 65535; } static void diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index d0e6298e56..03a00a14fb 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -1445,11 +1445,11 @@ get_order (const char *s) return 0; } -static gdouble +static double get_dpi_from_gsettings (GdkWaylandDisplay *display_wayland) { GSettings *settings; - gdouble factor; + double factor; settings = g_hash_table_lookup (display_wayland->settings, "org.gnome.desktop.interface"); diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index b6e60a40fe..2883b61947 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -3105,8 +3105,8 @@ gdk_wayland_surface_get_root_coords (GdkSurface *surface, static gboolean gdk_wayland_surface_get_device_state (GdkSurface *surface, GdkDevice *device, - gdouble *x, - gdouble *y, + double *x, + double *y, GdkModifierType *mask) { gboolean return_val; diff --git a/gdk/win32/gdkclipdrop-win32.c b/gdk/win32/gdkclipdrop-win32.c index 4a7fac2bd2..4de03fec42 100644 --- a/gdk/win32/gdkclipdrop-win32.c +++ b/gdk/win32/gdkclipdrop-win32.c @@ -2477,7 +2477,7 @@ transmute_cf_dib_to_image_bmp (const guchar *data, { 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[1] = p[1] * inverse_alpha + 0.5; diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c index 9bfdd2c443..a7a6464d75 100644 --- a/gdk/win32/gdkcursor-win32.c +++ b/gdk/win32/gdkcursor-win32.c @@ -1003,8 +1003,8 @@ _gdk_win32_display_update_cursors (GdkWin32Display *display) GdkPixbuf * gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon, - gdouble *x_hot, - gdouble *y_hot) + double *x_hot, + double *y_hot) { GdkPixbuf *pixbuf = NULL; ICONINFO ii; diff --git a/gdk/win32/gdkdevice-virtual.c b/gdk/win32/gdkdevice-virtual.c index c6460c5f22..c63bb7fa9a 100644 --- a/gdk/win32/gdkdevice-virtual.c +++ b/gdk/win32/gdkdevice-virtual.c @@ -37,7 +37,7 @@ _gdk_device_virtual_set_active (GdkDevice *device, GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device); int n_axes, i; GdkAxisUse use; - gdouble min_value, max_value, resolution; + double min_value, max_value, resolution; if (virtual->active_device == new_active) return; @@ -62,7 +62,7 @@ _gdk_device_virtual_set_active (GdkDevice *device, static void gdk_device_virtual_get_state (GdkDevice *device, GdkSurface *window, - gdouble *axes, + double *axes, GdkModifierType *mask) { GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device); @@ -100,8 +100,8 @@ static void gdk_device_virtual_query_state (GdkDevice *device, GdkSurface *window, GdkSurface **child_window, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask) { GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device); diff --git a/gdk/win32/gdkdevice-win32.c b/gdk/win32/gdkdevice-win32.c index 0f83610952..67b16bd51f 100644 --- a/gdk/win32/gdkdevice-win32.c +++ b/gdk/win32/gdkdevice-win32.c @@ -32,7 +32,7 @@ G_DEFINE_TYPE (GdkDeviceWin32, gdk_device_win32, GDK_TYPE_DEVICE) static void gdk_device_win32_get_state (GdkDevice *device, GdkSurface *window, - gdouble *axes, + double *axes, GdkModifierType *mask) { double x, y; @@ -166,8 +166,8 @@ screen_to_client (HWND hwnd, POINT screen_pt, POINT *client_pt) GdkSurface * _gdk_device_win32_surface_at_position (GdkDevice *device, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask) { GdkSurface *window = NULL; diff --git a/gdk/win32/gdkdevice-win32.h b/gdk/win32/gdkdevice-win32.h index b59d775f99..2559412426 100644 --- a/gdk/win32/gdkdevice-win32.h +++ b/gdk/win32/gdkdevice-win32.h @@ -45,8 +45,8 @@ struct _GdkDeviceWin32Class GType gdk_device_win32_get_type (void) G_GNUC_CONST; GdkSurface *_gdk_device_win32_surface_at_position (GdkDevice *device, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask); G_END_DECLS diff --git a/gdk/win32/gdkdevice-wintab.c b/gdk/win32/gdkdevice-wintab.c index 124fcef2e7..04acb571fd 100644 --- a/gdk/win32/gdkdevice-wintab.c +++ b/gdk/win32/gdkdevice-wintab.c @@ -57,7 +57,7 @@ get_current_mask (void) static void gdk_device_wintab_get_state (GdkDevice *device, GdkSurface *window, - gdouble *axes, + double *axes, GdkModifierType *mask) { GdkDeviceWintab *device_wintab; @@ -177,8 +177,8 @@ gdk_device_wintab_ungrab (GdkDevice *device, static GdkSurface * gdk_device_wintab_surface_at_position (GdkDevice *device, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask) { return NULL; @@ -187,14 +187,14 @@ gdk_device_wintab_surface_at_position (GdkDevice *device, void _gdk_device_wintab_translate_axes (GdkDeviceWintab *device_wintab, GdkSurface *window, - gdouble *axes, - gdouble *x, - gdouble *y) + double *axes, + double *x, + double *y) { GdkDevice *device; GdkSurface *impl_surface; int root_x, root_y; - gdouble temp_x, temp_y; + double temp_x, temp_y; int i; device = GDK_DEVICE (device_wintab); diff --git a/gdk/win32/gdkdevice-wintab.h b/gdk/win32/gdkdevice-wintab.h index 2679d73b80..088a84e7f4 100644 --- a/gdk/win32/gdkdevice-wintab.h +++ b/gdk/win32/gdkdevice-wintab.h @@ -62,9 +62,9 @@ GType gdk_device_wintab_get_type (void) G_GNUC_CONST; void _gdk_device_wintab_translate_axes (GdkDeviceWintab *device, GdkSurface *window, - gdouble *axes, - gdouble *x, - gdouble *y); + double *axes, + double *x, + double *y); G_END_DECLS diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c index df456c29fd..fcdf5b13da 100644 --- a/gdk/win32/gdkdevicemanager-win32.c +++ b/gdk/win32/gdkdevicemanager-win32.c @@ -1044,7 +1044,7 @@ gdk_input_other_event (GdkDisplay *display, if (event_type == GDK_BUTTON_PRESS || event_type == GDK_BUTTON_RELEASE) { - axes = g_new (gdouble, num_axes); + axes = g_new (double, num_axes); _gdk_device_wintab_translate_axes (source_device, window, @@ -1080,7 +1080,7 @@ gdk_input_other_event (GdkDisplay *display, } else { - axes = g_new (gdouble, num_axes); + axes = g_new (double, num_axes); _gdk_device_wintab_translate_axes (source_device, window, axes, diff --git a/gdk/win32/gdkdrag-win32.c b/gdk/win32/gdkdrag-win32.c index 8d6caa9ae3..4720804de6 100644 --- a/gdk/win32/gdkdrag-win32.c +++ b/gdk/win32/gdkdrag-win32.c @@ -2307,8 +2307,8 @@ gdk_win32_drag_drop_performed (GdkDrag *drag, static void gdk_local_drag_update (GdkDrag *drag, - gdouble x_root, - gdouble y_root, + double x_root, + double y_root, DWORD grfKeyState, guint32 evtime) { diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index a2ff0d952e..cd7fea354c 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -2755,9 +2755,9 @@ gdk_event_translate (MSG *msg, delta_x = delta_y = 0.0; 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) - 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, see API documentation for WM_MOUSEWHEEL message. */ @@ -3291,7 +3291,7 @@ gdk_event_translate (MSG *msg, RECT decorated_rect; RECT undecorated_drag; int decoration_width, decoration_height; - gdouble drag_aspect; + double drag_aspect; int drag_width, drag_height, new_width, new_height; GetClientRect (GDK_SURFACE_HWND (window), &rect); @@ -3313,7 +3313,7 @@ gdk_event_translate (MSG *msg, drag_width = undecorated_drag.right - undecorated_drag.left; 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)", impl->hints.min_aspect, impl->hints.max_aspect, drag_aspect)); diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c index 06af6e8303..ad96754187 100644 --- a/gdk/win32/gdksurface-win32.c +++ b/gdk/win32/gdksurface-win32.c @@ -249,8 +249,8 @@ gdk_win32_impl_frame_clock_after_paint (GdkFrameClock *clock, if (SUCCEEDED (hr)) { - timings->refresh_interval = timing_info.qpcRefreshPeriod * (gdouble)G_USEC_PER_SEC / tick_frequency.QuadPart; - timings->presentation_time = timing_info.qpcCompose * (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 * (double)G_USEC_PER_SEC / tick_frequency.QuadPart; } } @@ -1804,8 +1804,8 @@ gdk_win32_surface_get_root_coords (GdkSurface *window, static gboolean gdk_surface_win32_get_device_state (GdkSurface *window, GdkDevice *device, - gdouble *x, - gdouble *y, + double *x, + double *y, GdkModifierType *mask) { GdkSurface *child; @@ -2249,9 +2249,9 @@ unsnap (GdkSurface *window, /* If the window fits into new work area without resizing it, * place it into new work area without resizing it. */ - gdouble left, right, up, down, hratio, vratio; - gdouble hscale, vscale; - gdouble new_left, new_up; + double left, right, up, down, hratio, vratio; + double hscale, vscale; + double new_left, new_up; left = impl->snap_stash->x; right = 1.0 - (impl->snap_stash->x + impl->snap_stash->width); @@ -2265,7 +2265,7 @@ unsnap (GdkSurface *window, 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; @@ -2275,7 +2275,7 @@ unsnap (GdkSurface *window, 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.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; wheight = (hmonitor_info.rcWork.bottom - hmonitor_info.rcWork.top) / impl->surface_scale; - impl->snap_stash->x = (gdouble) (x) / (gdouble) (wwidth); - impl->snap_stash->y = (gdouble) (y) / (gdouble) (wheight); - impl->snap_stash->width = (gdouble) width / (gdouble) (wwidth); - impl->snap_stash->height = (gdouble) height / (gdouble) (wheight); + impl->snap_stash->x = (double) (x) / (double) (wwidth); + impl->snap_stash->y = (double) (y) / (double) (wheight); + impl->snap_stash->width = (double) width / (double) (wwidth); + impl->snap_stash->height = (double) height / (double) (wheight); impl->snap_stash_int->x = x; impl->snap_stash_int->y = y; @@ -2730,7 +2730,7 @@ static void adjust_indicator_rectangle (GdkRectangle *rect, gboolean inward) { - gdouble inverter; + double inverter; const int gap = AEROSNAP_INDICATOR_EDGE_GAP; #if defined(MORE_AEROSNAP_DEBUGGING) GdkRectangle cache = *rect; @@ -2759,12 +2759,12 @@ rounded_rectangle (cairo_t *cr, int y, int width, int height, - gdouble radius, - gdouble line_width, + double radius, + double line_width, GdkRGBA *fill, GdkRGBA *outline) { - gdouble degrees = M_PI / 180.0; + double degrees = M_PI / 180.0; if (fill == NULL && outline == NULL) return; @@ -2798,8 +2798,8 @@ rounded_rectangle (cairo_t *cr, } /* Translates linear animation scale into some kind of curve */ -static gdouble -curve (gdouble val) +static double +curve (double val) { /* TODO: try different curves. For now it's just linear */ return val; @@ -2814,10 +2814,10 @@ draw_indicator (GdkW32DragMoveResizeContext *context, GdkRGBA fill = {0, 0, 1.0, 0.8}; GdkRectangle current_rect; gint64 current_time = g_get_monotonic_time (); - gdouble animation_progress; + double animation_progress; gboolean last_draw; - gdouble line_width; - gdouble corner_radius; + double line_width; + double corner_radius; gint64 animation_duration; GdkWin32Surface *impl = GDK_WIN32_SURFACE (context->window); @@ -2836,7 +2836,7 @@ draw_indicator (GdkW32DragMoveResizeContext *context, if (timestamp != 0) 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) animation_progress = 1.0; @@ -2919,7 +2919,7 @@ redraw_indicator (gpointer user_data) HDC hdc; POINT source_point = { 0, 0 }; gboolean last_draw; - gdouble indicator_opacity; + double indicator_opacity; GdkWin32Surface *impl; gboolean do_source_remove = FALSE; diff --git a/gdk/win32/gdksurface-win32.h b/gdk/win32/gdksurface-win32.h index 84e7dbaee0..649e29c869 100644 --- a/gdk/win32/gdksurface-win32.h +++ b/gdk/win32/gdksurface-win32.h @@ -79,10 +79,10 @@ typedef enum _GdkWin32AeroSnapState GdkWin32AeroSnapState; struct _GdkRectangleDouble { - gdouble x; - gdouble y; - gdouble width; - gdouble height; + double x; + double y; + double width; + double height; }; typedef struct _GdkRectangleDouble GdkRectangleDouble; @@ -311,7 +311,7 @@ struct _GdkWin32Surface * we remember the opacity value here and apply it * during UpdateLayredWindow() call, for layered windows. */ - gdouble layered_opacity; + double layered_opacity; HDC hdc; int hdc_count; diff --git a/gdk/win32/gdkwin32misc.h b/gdk/win32/gdkwin32misc.h index dcd9471dc9..3582e81572 100644 --- a/gdk/win32/gdkwin32misc.h +++ b/gdk/win32/gdkwin32misc.h @@ -90,8 +90,8 @@ GdkSurface * gdk_win32_surface_lookup_for_display (GdkDisplay *display, /* For internal GTK use only */ GDK_AVAILABLE_IN_ALL GdkPixbuf *gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon, - gdouble *x_hot, - gdouble *y_hot); + double *x_hot, + double *y_hot); GDK_AVAILABLE_IN_ALL HICON gdk_win32_pixbuf_to_hicon_libgtk_only (GdkPixbuf *pixbuf); GDK_AVAILABLE_IN_ALL diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c index 01736e6821..62507c1a3b 100644 --- a/gdk/x11/gdkdevice-xi2.c +++ b/gdk/x11/gdkdevice-xi2.c @@ -39,8 +39,8 @@ struct _ScrollValuator guint n_valuator : 4; guint direction : 4; guint last_value_valid : 1; - gdouble last_value; - gdouble increment; + double last_value; + double increment; }; struct _GdkX11DeviceXI2 @@ -49,7 +49,7 @@ struct _GdkX11DeviceXI2 int device_id; GArray *scroll_valuators; - gdouble *last_axes; + double *last_axes; }; 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, GdkSurface *surface, - gdouble *axes, + double *axes, GdkModifierType *mask); static void gdk_x11_device_xi2_set_surface_cursor (GdkDevice *device, 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, GdkSurface *surface, GdkSurface **child_surface, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask); static GdkGrabStatus gdk_x11_device_xi2_grab (GdkDevice *device, @@ -95,8 +95,8 @@ static void gdk_x11_device_xi2_ungrab (GdkDevice *device, guint32 time_); static GdkSurface * gdk_x11_device_xi2_surface_at_position (GdkDevice *device, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask); @@ -190,7 +190,7 @@ gdk_x11_device_xi2_set_property (GObject *object, static void gdk_x11_device_xi2_get_state (GdkDevice *device, GdkSurface *surface, - gdouble *axes, + double *axes, GdkModifierType *mask) { 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]; GdkAxisUse use; - gdouble value; + double value; if (class_info->type != XIValuatorClass) continue; @@ -285,15 +285,15 @@ static void gdk_x11_device_xi2_query_state (GdkDevice *device, GdkSurface *surface, GdkSurface **child_surface, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask) { GdkX11DeviceXI2 *device_xi2 = GDK_X11_DEVICE_XI2 (device); GdkDisplay *display; GdkX11Screen *default_screen; 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; XIModifierState mod_state; XIGroupState group_state; @@ -447,8 +447,8 @@ gdk_x11_device_xi2_ungrab (GdkDevice *device, static GdkSurface * gdk_x11_device_xi2_surface_at_position (GdkDevice *device, - gdouble *win_x, - gdouble *win_y, + double *win_x, + double *win_y, GdkModifierType *mask) { GdkX11Surface *impl; @@ -458,7 +458,7 @@ gdk_x11_device_xi2_surface_at_position (GdkDevice *device, Display *xdisplay; GdkSurface *surface; 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 }; XIModifierState mod_state; XIGroupState group_state; @@ -744,7 +744,7 @@ void _gdk_x11_device_xi2_add_scroll_valuator (GdkX11DeviceXI2 *device, guint n_valuator, GdkScrollDirection direction, - gdouble increment) + double increment) { ScrollValuator scroll; @@ -762,9 +762,9 @@ _gdk_x11_device_xi2_add_scroll_valuator (GdkX11DeviceXI2 *device, gboolean _gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device, guint n_valuator, - gdouble valuator_value, + double valuator_value, GdkScrollDirection *direction_ret, - gdouble *delta_ret) + double *delta_ret) { guint i; @@ -835,7 +835,7 @@ _gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device) return device->device_id; } -gdouble +double gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device, int n_axis) { @@ -850,13 +850,13 @@ gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device, void gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device, - gdouble *axes, + double *axes, int n_axes) { g_free (device->last_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 device->last_axes = NULL; } diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c index 51cd98a2a5..67dccb5b87 100644 --- a/gdk/x11/gdkdevicemanager-xi2.c +++ b/gdk/x11/gdkdevicemanager-xi2.c @@ -204,9 +204,9 @@ static void translate_valuator_class (GdkDisplay *display, GdkDevice *device, Atom valuator_label, - gdouble min, - gdouble max, - gdouble resolution) + double min, + double max, + double resolution) { static gboolean initialized = FALSE; 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); } -static gdouble * +static double * translate_axes (GdkDevice *device, - gdouble x, - gdouble y, + double x, + double y, GdkSurface *surface, XIValuatorState *valuators) { guint n_axes, i; - gdouble *axes; - gdouble *vals; + double *axes; + double *vals; n_axes = gdk_device_get_n_axes (device); - axes = g_new0 (gdouble, n_axes); + axes = g_new0 (double, n_axes); vals = valuators->values; for (i = 0; i < MIN (valuators->mask_len * 8, n_axes); i++) { GdkAxisUse use; - gdouble val; + double val; if (!XIMaskIsSet (valuators->mask, i)) { @@ -1313,13 +1313,13 @@ get_event_surface (GdkEventTranslator *translator, static gboolean scroll_valuators_changed (GdkX11DeviceXI2 *device, XIValuatorState *valuators, - gdouble *dx, - gdouble *dy) + double *dx, + double *dy) { gboolean has_scroll_valuators = FALSE; GdkScrollDirection direction; guint n_axes, i, n_val; - gdouble *vals; + double *vals; n_axes = gdk_device_get_n_axes (GDK_DEVICE (device)); vals = valuators->values; @@ -1328,7 +1328,7 @@ scroll_valuators_changed (GdkX11DeviceXI2 *device, for (i = 0; i < MIN (valuators->mask_len * 8, n_axes); i++) { - gdouble delta; + double delta; if (!XIMaskIsSet (valuators->mask, i)) continue; @@ -1704,7 +1704,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, case XI_Motion: { XIDeviceEvent *xev = (XIDeviceEvent *) ev; - gdouble delta_x, delta_y; + double delta_x, delta_y; double x, y; double *axes; diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c index 291a892156..ba119a45b8 100644 --- a/gdk/x11/gdkdrag-x11.c +++ b/gdk/x11/gdkdrag-x11.c @@ -2163,8 +2163,8 @@ gdk_drag_get_current_actions (GdkModifierType state, static void gdk_drag_update (GdkDrag *drag, - gdouble x_root, - gdouble y_root, + double x_root, + double y_root, GdkModifierType mods, guint32 evtime) { diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c index a5d17e232c..810202614d 100644 --- a/gdk/x11/gdkeventsource.c +++ b/gdk/x11/gdkeventsource.c @@ -130,7 +130,7 @@ create_synth_crossing_event (GdkEventType evtype, GdkEvent *real_event) { GdkEvent *event; - gdouble x, y; + double x, y; g_assert (evtype == GDK_ENTER_NOTIFY || evtype == GDK_LEAVE_NOTIFY); diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h index eeae4abbe5..97155106a5 100644 --- a/gdk/x11/gdkprivate-x11.h +++ b/gdk/x11/gdkprivate-x11.h @@ -152,19 +152,19 @@ GdkDevice * _gdk_x11_device_manager_xi2_lookup (GdkX11DeviceManagerXI2 *devic void _gdk_x11_device_xi2_add_scroll_valuator (GdkX11DeviceXI2 *device, guint n_valuator, GdkScrollDirection direction, - gdouble increment); + double increment); gboolean _gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device, guint n_valuator, - gdouble valuator_value, + double valuator_value, GdkScrollDirection *direction_ret, - gdouble *delta_ret); + double *delta_ret); 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); void gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device, - gdouble *axes, + double *axes, int n_axes); gboolean _gdk_x11_display_supports_cursor_alpha (GdkDisplay *display); diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index 261b123940..95f340bc70 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -2292,8 +2292,8 @@ gdk_surface_get_geometry_hints (GdkSurface *surface, { *geom_mask |= GDK_HINT_ASPECT; - geometry->min_aspect = (gdouble) size_hints->min_aspect.x / (gdouble) size_hints->min_aspect.y; - geometry->max_aspect = (gdouble) size_hints->max_aspect.x / (gdouble) size_hints->max_aspect.y; + geometry->min_aspect = (double) size_hints->min_aspect.x / (double) size_hints->min_aspect.y; + geometry->max_aspect = (double) size_hints->max_aspect.x / (double) size_hints->max_aspect.y; } if (size_hints->flags & PWinGravity) @@ -2711,8 +2711,8 @@ gdk_x11_surface_get_frame_extents (GdkSurface *surface, static gboolean gdk_x11_surface_get_device_state (GdkSurface *surface, GdkDevice *device, - gdouble *x, - gdouble *y, + double *x, + double *y, GdkModifierType *mask) { GdkSurface *child; @@ -3841,8 +3841,8 @@ get_move_resize_data (GdkDisplay *display, static void check_maximize (MoveResizeData *mv_resize, - gdouble x_root, - gdouble y_root) + double x_root, + double y_root) { GdkSurfaceState state; int y; @@ -3863,8 +3863,8 @@ check_maximize (MoveResizeData *mv_resize, static void check_unmaximize (MoveResizeData *mv_resize, - gdouble x_root, - gdouble y_root) + double x_root, + double y_root) { GdkSurfaceState state; int dx, dy; diff --git a/gdk/x11/gdkxftdefaults.c b/gdk/x11/gdkxftdefaults.c index 226bbcd985..a3a548227c 100644 --- a/gdk/x11/gdkxftdefaults.c +++ b/gdk/x11/gdkxftdefaults.c @@ -109,7 +109,7 @@ get_boolean_default (GdkX11Screen *x11_screen, static gboolean get_double_default (GdkX11Screen *x11_screen, const char *option, - gdouble *value) + double *value) { Display *dpy = GDK_SCREEN_XDISPLAY (x11_screen); char *v, *e; diff --git a/gsk/gskcairoblur.c b/gsk/gskcairoblur.c index 6e9266c70d..71d2cf4e74 100644 --- a/gsk/gskcairoblur.c +++ b/gsk/gskcairoblur.c @@ -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; cairo_surface_t *surface; cairo_t *blur_cr; - gdouble clip_radius; - gdouble x_scale, y_scale; + double clip_radius; + double x_scale, y_scale; gboolean blur_x = (blur_flags & GSK_BLUR_X) != 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_surface_t *surface; - gdouble x_scale; + double x_scale; if (!needs_blur (radius, blur_flags)) return cr; diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 1013972bcf..05430bea8d 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c @@ -985,7 +985,7 @@ draw_shadow_side (cairo_t *cr, cairo_rectangle_int_t *drawn_rect) { GskBlurFlags blur_flags = GSK_BLUR_REPEAT; - gdouble clip_radius; + double clip_radius; int x1, x2, y1, y2; clip_radius = gsk_cairo_blur_compute_pixels (radius); diff --git a/gtk/a11y/gtklevelbaraccessible.c b/gtk/a11y/gtklevelbaraccessible.c index a8054c204d..cb25428710 100644 --- a/gtk/a11y/gtklevelbaraccessible.c +++ b/gtk/a11y/gtklevelbaraccessible.c @@ -124,7 +124,7 @@ gtk_level_bar_accessible_set_current_value (AtkValue *obj, static void gtk_level_bar_accessible_get_value_and_text (AtkValue *obj, - gdouble *value, + double *value, char **text) { GtkWidget *widget; @@ -153,7 +153,7 @@ gtk_level_bar_accessible_get_range (AtkValue *obj) static void gtk_level_bar_accessible_set_value (AtkValue *obj, - const gdouble value) + const double value) { GtkWidget *widget; GtkLevelBar *level_bar; diff --git a/gtk/a11y/gtkpanedaccessible.c b/gtk/a11y/gtkpanedaccessible.c index 475b65b626..97793626ab 100644 --- a/gtk/a11y/gtkpanedaccessible.c +++ b/gtk/a11y/gtkpanedaccessible.c @@ -143,7 +143,7 @@ gtk_paned_accessible_set_current_value (AtkValue *obj, static void gtk_paned_accessible_get_value_and_text (AtkValue *obj, - gdouble *value, + double *value, char **text) { GtkWidget *widget; @@ -175,7 +175,7 @@ gtk_paned_accessible_get_range (AtkValue *obj) static void gtk_paned_accessible_set_value (AtkValue *obj, - const gdouble value) + const double value) { GtkWidget *widget; GtkPaned *paned; diff --git a/gtk/a11y/gtkprogressbaraccessible.c b/gtk/a11y/gtkprogressbaraccessible.c index 517f845184..cf91831305 100644 --- a/gtk/a11y/gtkprogressbaraccessible.c +++ b/gtk/a11y/gtkprogressbaraccessible.c @@ -78,7 +78,7 @@ gtk_progress_bar_accessible_get_minimum_value (AtkValue *obj, static void gtk_progress_bar_accessible_get_value_and_text (AtkValue *obj, - gdouble *value, + double *value, char **text) { GtkWidget *widget; diff --git a/gtk/a11y/gtkrangeaccessible.c b/gtk/a11y/gtkrangeaccessible.c index 8650f7c452..a004979143 100644 --- a/gtk/a11y/gtkrangeaccessible.c +++ b/gtk/a11y/gtkrangeaccessible.c @@ -152,7 +152,7 @@ gtk_range_accessible_get_maximum_value (AtkValue *obj, { GtkWidget *widget; GtkAdjustment *adjustment; - gdouble max; + double max; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); adjustment = gtk_range_get_adjustment (GTK_RANGE (widget)); @@ -223,7 +223,7 @@ gtk_range_accessible_set_current_value (AtkValue *obj, static void gtk_range_accessible_get_value_and_text (AtkValue *obj, - gdouble *value, + double *value, char **text) { GtkWidget *widget; @@ -243,7 +243,7 @@ gtk_range_accessible_get_range (AtkValue *obj) { GtkWidget *widget; GtkAdjustment *adjustment; - gdouble min, max; + double min, max; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); adjustment = gtk_range_get_adjustment (GTK_RANGE (widget)); @@ -262,7 +262,7 @@ gtk_range_accessible_get_range (AtkValue *obj) static void gtk_range_accessible_set_value (AtkValue *obj, - const gdouble value) + const double value) { GtkWidget *widget; GtkAdjustment *adjustment; @@ -275,7 +275,7 @@ gtk_range_accessible_set_value (AtkValue *obj, gtk_adjustment_set_value (adjustment, value); } -static gdouble +static double gtk_range_accessible_get_increment (AtkValue *obj) { GtkWidget *widget; diff --git a/gtk/a11y/gtkscalebuttonaccessible.c b/gtk/a11y/gtkscalebuttonaccessible.c index 7c31735a21..e569fc4dcd 100644 --- a/gtk/a11y/gtkscalebuttonaccessible.c +++ b/gtk/a11y/gtkscalebuttonaccessible.c @@ -300,7 +300,7 @@ gtk_scale_button_accessible_set_current_value (AtkValue *obj, static void gtk_scale_button_accessible_get_value_and_text (AtkValue *obj, - gdouble *value, + double *value, char **text) { GtkWidget *widget; @@ -333,7 +333,7 @@ gtk_scale_button_accessible_get_range (AtkValue *obj) static void gtk_scale_button_accessible_set_value (AtkValue *obj, - const gdouble value) + const double value) { GtkWidget *widget; GtkAdjustment *adjustment; @@ -346,7 +346,7 @@ gtk_scale_button_accessible_set_value (AtkValue *obj, gtk_adjustment_set_value (adjustment, value); } -static gdouble +static double gtk_scale_button_accessible_get_increment (AtkValue *obj) { GtkWidget *widget; diff --git a/gtk/a11y/gtkspinbuttonaccessible.c b/gtk/a11y/gtkspinbuttonaccessible.c index 879a1eb132..0791b4e9e4 100644 --- a/gtk/a11y/gtkspinbuttonaccessible.c +++ b/gtk/a11y/gtkspinbuttonaccessible.c @@ -201,7 +201,7 @@ gtk_spin_button_accessible_set_current_value (AtkValue *obj, static void gtk_spin_button_accessible_get_value_and_text (AtkValue *obj, - gdouble *value, + double *value, char **text) { GtkWidget *widget; @@ -234,7 +234,7 @@ gtk_spin_button_accessible_get_range (AtkValue *obj) static void gtk_spin_button_accessible_set_value (AtkValue *obj, - const gdouble value) + const double value) { GtkWidget *widget; GtkAdjustment *adjustment; @@ -247,7 +247,7 @@ gtk_spin_button_accessible_set_value (AtkValue *obj, gtk_adjustment_set_value (adjustment, value); } -static gdouble +static double gtk_spin_button_accessible_get_increment (AtkValue *obj) { GtkWidget *widget; diff --git a/gtk/a11y/gtktextcellaccessible.c b/gtk/a11y/gtktextcellaccessible.c index 369da981b9..7af56d9696 100644 --- a/gtk/a11y/gtktextcellaccessible.c +++ b/gtk/a11y/gtktextcellaccessible.c @@ -377,7 +377,7 @@ create_pango_layout (GtkTextCellAccessible *text) gboolean foreground_set, strikethrough_set, strikethrough; gboolean scale_set, underline_set, rise_set; char *renderer_text; - gdouble scale; + double scale; int rise; GtkRendererCellAccessible *gail_renderer; GtkCellRendererText *gtk_renderer; diff --git a/gtk/a11y/gtktextviewaccessible.c b/gtk/a11y/gtktextviewaccessible.c index f6cf38fc48..3de00eec92 100644 --- a/gtk/a11y/gtktextviewaccessible.c +++ b/gtk/a11y/gtktextviewaccessible.c @@ -557,7 +557,7 @@ gtk_text_view_accessible_get_run_attributes (AtkText *text, GtkTextIter iter; AtkAttributeSet *attrib_set = NULL; GSList *tags, *temp_tags; - gdouble scale = 1; + double scale = 1; gboolean val_set = FALSE; 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); if (scale_set) { - gdouble font_scale; + double font_scale; g_object_get (tag, "scale", &font_scale, NULL); val_set = TRUE; scale *= font_scale; diff --git a/gtk/gen-paper-names.c b/gtk/gen-paper-names.c index 8d9ea390b5..3f23c87d34 100644 --- a/gtk/gen-paper-names.c +++ b/gtk/gen-paper-names.c @@ -71,12 +71,12 @@ find_name (const char *name) static gboolean parse_media_size (const char *size, - gdouble *width_mm, - gdouble *height_mm) + double *width_mm, + double *height_mm) { const char *p; char *e; - gdouble short_dim, long_dim; + double short_dim, long_dim; p = size; @@ -114,7 +114,7 @@ int main (int argc, char *argv[]) { int i, j, offset; - gdouble width, height; + double width, height; names = (NameInfo *) malloc (sizeof (NameInfo) * (4 + n_infos + 2 * n_extra)); n_names = 0; diff --git a/gtk/gsettings-mapping.c b/gtk/gsettings-mapping.c index 7eadca3d27..8e22e1397f 100644 --- a/gtk/gsettings-mapping.c +++ b/gtk/gsettings-mapping.c @@ -71,7 +71,7 @@ g_settings_set_mapping_int (const GValue *value, variant = g_variant_new_handle ((guint) l); } 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; } @@ -81,7 +81,7 @@ g_settings_set_mapping_float (const GValue *value, const GVariantType *expected_type) { GVariant *variant = NULL; - gdouble d; + double d; gint64 l; 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); } 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; } @@ -180,7 +180,7 @@ g_settings_set_mapping_unsigned_int (const GValue *value, variant = g_variant_new_handle ((guint) u); } 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; } @@ -237,7 +237,7 @@ g_settings_get_mapping_float (GValue *value, GVariant *variant) { const GVariantType *type; - gdouble d; + double d; gint64 l; type = g_variant_get_type (variant); diff --git a/gtk/gskpango.c b/gtk/gskpango.c index 8f54c9cc94..1e1baee43c 100644 --- a/gtk/gskpango.c +++ b/gtk/gskpango.c @@ -140,7 +140,7 @@ gsk_pango_renderer_draw_trapezoid (PangoRenderer *renderer, { GskPangoRenderer *crenderer = (GskPangoRenderer *) (renderer); cairo_t *cr; - gdouble x, y; + double x, y; cr = gtk_snapshot_append_cairo (crenderer->snapshot, &crenderer->bounds); diff --git a/gtk/gtkadjustment.c b/gtk/gtkadjustment.c index 097a7bac14..d4bf1ca8a1 100644 --- a/gtk/gtkadjustment.c +++ b/gtk/gtkadjustment.c @@ -46,15 +46,15 @@ struct _GtkAdjustmentPrivate { - gdouble lower; - gdouble upper; - gdouble value; - gdouble step_increment; - gdouble page_increment; - gdouble page_size; + double lower; + double upper; + double value; + double step_increment; + double page_increment; + double page_size; - gdouble source; - gdouble target; + double source; + double target; guint duration; gint64 start_time; @@ -294,7 +294,7 @@ gtk_adjustment_set_property (GObject *object, GParamSpec *pspec) { GtkAdjustment *adjustment = GTK_ADJUSTMENT (object); - gdouble double_value = g_value_get_double (value); + double double_value = g_value_get_double (value); switch (prop_id) { @@ -373,12 +373,12 @@ gtk_adjustment_dispatch_properties_changed (GObject *object, * Returns: a new #GtkAdjustment */ GtkAdjustment * -gtk_adjustment_new (gdouble value, - gdouble lower, - gdouble upper, - gdouble step_increment, - gdouble page_increment, - gdouble page_size) +gtk_adjustment_new (double value, + double lower, + double upper, + double step_increment, + double page_increment, + double page_size) { return g_object_new (GTK_TYPE_ADJUSTMENT, "lower", lower, @@ -399,7 +399,7 @@ gtk_adjustment_new (gdouble value, * * Returns: The current value of the adjustment **/ -gdouble +double gtk_adjustment_get_value (GtkAdjustment *adjustment) { GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); @@ -408,7 +408,7 @@ gtk_adjustment_get_value (GtkAdjustment *adjustment) return priv->value; } -gdouble +double gtk_adjustment_get_target_value (GtkAdjustment *adjustment) { GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); @@ -423,7 +423,7 @@ gtk_adjustment_get_target_value (GtkAdjustment *adjustment) static void adjustment_set_value (GtkAdjustment *adjustment, - gdouble value) + double value) { 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 * infamous easing equations, MIT license. */ -static gdouble -ease_out_cubic (gdouble t) +static double +ease_out_cubic (double t) { - gdouble p = t - 1; + double p = t - 1; return p * p * p + 1; } @@ -485,9 +485,9 @@ gtk_adjustment_on_frame_clock_update (GdkFrameClock *clock, 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); 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 gtk_adjustment_set_value_internal (GtkAdjustment *adjustment, - gdouble value, + double value, gboolean animate) { GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); @@ -543,7 +543,7 @@ gtk_adjustment_set_value_internal (GtkAdjustment *adjustment, */ void gtk_adjustment_set_value (GtkAdjustment *adjustment, - gdouble value) + double value) { g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); @@ -552,7 +552,7 @@ gtk_adjustment_set_value (GtkAdjustment *adjustment, void gtk_adjustment_animate_to_value (GtkAdjustment *adjustment, - gdouble value) + double value) { 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 **/ -gdouble +double gtk_adjustment_get_lower (GtkAdjustment *adjustment) { GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); @@ -598,7 +598,7 @@ gtk_adjustment_get_lower (GtkAdjustment *adjustment) **/ void gtk_adjustment_set_lower (GtkAdjustment *adjustment, - gdouble lower) + double lower) { 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 **/ -gdouble +double gtk_adjustment_get_upper (GtkAdjustment *adjustment) { GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); @@ -645,7 +645,7 @@ gtk_adjustment_get_upper (GtkAdjustment *adjustment) **/ void gtk_adjustment_set_upper (GtkAdjustment *adjustment, - gdouble upper) + double upper) { 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. **/ -gdouble +double gtk_adjustment_get_step_increment (GtkAdjustment *adjustment) { GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); @@ -689,7 +689,7 @@ gtk_adjustment_get_step_increment (GtkAdjustment *adjustment) **/ void gtk_adjustment_set_step_increment (GtkAdjustment *adjustment, - gdouble step_increment) + double step_increment) { 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 **/ -gdouble +double gtk_adjustment_get_page_increment (GtkAdjustment *adjustment) { GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); @@ -733,7 +733,7 @@ gtk_adjustment_get_page_increment (GtkAdjustment *adjustment) **/ void gtk_adjustment_set_page_increment (GtkAdjustment *adjustment, - gdouble page_increment) + double page_increment) { 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 **/ -gdouble +double gtk_adjustment_get_page_size (GtkAdjustment *adjustment) { GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); @@ -777,7 +777,7 @@ gtk_adjustment_get_page_size (GtkAdjustment *adjustment) **/ void gtk_adjustment_set_page_size (GtkAdjustment *adjustment, - gdouble page_size) + double page_size) { GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); @@ -809,12 +809,12 @@ gtk_adjustment_set_page_size (GtkAdjustment *adjustment, **/ void gtk_adjustment_configure (GtkAdjustment *adjustment, - gdouble value, - gdouble lower, - gdouble upper, - gdouble step_increment, - gdouble page_increment, - gdouble page_size) + double value, + double lower, + double upper, + double step_increment, + double page_increment, + double page_size) { GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); gboolean value_changed = FALSE; @@ -867,8 +867,8 @@ gtk_adjustment_configure (GtkAdjustment *adjustment, */ void gtk_adjustment_clamp_page (GtkAdjustment *adjustment, - gdouble lower, - gdouble upper) + double lower, + double upper) { GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment); gboolean need_emission; @@ -903,11 +903,11 @@ gtk_adjustment_clamp_page (GtkAdjustment *adjustment, * * Returns: the minimum increment of @adjustment */ -gdouble +double gtk_adjustment_get_minimum_increment (GtkAdjustment *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); diff --git a/gtk/gtkadjustment.h b/gtk/gtkadjustment.h index 3c4bf7c6d6..997c2b4df4 100644 --- a/gtk/gtkadjustment.h +++ b/gtk/gtkadjustment.h @@ -73,59 +73,59 @@ struct _GtkAdjustmentClass GDK_AVAILABLE_IN_ALL GType gtk_adjustment_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkAdjustment* gtk_adjustment_new (gdouble value, - gdouble lower, - gdouble upper, - gdouble step_increment, - gdouble page_increment, - gdouble page_size); +GtkAdjustment* gtk_adjustment_new (double value, + double lower, + double upper, + double step_increment, + double page_increment, + double page_size); GDK_AVAILABLE_IN_ALL void gtk_adjustment_clamp_page (GtkAdjustment *adjustment, - gdouble lower, - gdouble upper); + double lower, + double upper); GDK_AVAILABLE_IN_ALL -gdouble gtk_adjustment_get_value (GtkAdjustment *adjustment); +double gtk_adjustment_get_value (GtkAdjustment *adjustment); GDK_AVAILABLE_IN_ALL void gtk_adjustment_set_value (GtkAdjustment *adjustment, - gdouble value); + double value); GDK_AVAILABLE_IN_ALL -gdouble gtk_adjustment_get_lower (GtkAdjustment *adjustment); +double gtk_adjustment_get_lower (GtkAdjustment *adjustment); GDK_AVAILABLE_IN_ALL void gtk_adjustment_set_lower (GtkAdjustment *adjustment, - gdouble lower); + double lower); GDK_AVAILABLE_IN_ALL -gdouble gtk_adjustment_get_upper (GtkAdjustment *adjustment); +double gtk_adjustment_get_upper (GtkAdjustment *adjustment); GDK_AVAILABLE_IN_ALL void gtk_adjustment_set_upper (GtkAdjustment *adjustment, - gdouble upper); + double upper); GDK_AVAILABLE_IN_ALL -gdouble gtk_adjustment_get_step_increment (GtkAdjustment *adjustment); +double gtk_adjustment_get_step_increment (GtkAdjustment *adjustment); GDK_AVAILABLE_IN_ALL void gtk_adjustment_set_step_increment (GtkAdjustment *adjustment, - gdouble step_increment); + double step_increment); GDK_AVAILABLE_IN_ALL -gdouble gtk_adjustment_get_page_increment (GtkAdjustment *adjustment); +double gtk_adjustment_get_page_increment (GtkAdjustment *adjustment); GDK_AVAILABLE_IN_ALL void gtk_adjustment_set_page_increment (GtkAdjustment *adjustment, - gdouble page_increment); + double page_increment); GDK_AVAILABLE_IN_ALL -gdouble gtk_adjustment_get_page_size (GtkAdjustment *adjustment); +double gtk_adjustment_get_page_size (GtkAdjustment *adjustment); GDK_AVAILABLE_IN_ALL void gtk_adjustment_set_page_size (GtkAdjustment *adjustment, - gdouble page_size); + double page_size); GDK_AVAILABLE_IN_ALL void gtk_adjustment_configure (GtkAdjustment *adjustment, - gdouble value, - gdouble lower, - gdouble upper, - gdouble step_increment, - gdouble page_increment, - gdouble page_size); + double value, + double lower, + double upper, + double step_increment, + double page_increment, + double page_size); GDK_AVAILABLE_IN_ALL -gdouble gtk_adjustment_get_minimum_increment (GtkAdjustment *adjustment); +double gtk_adjustment_get_minimum_increment (GtkAdjustment *adjustment); G_END_DECLS diff --git a/gtk/gtkadjustmentprivate.h b/gtk/gtkadjustmentprivate.h index c0884448a7..2b42705f76 100644 --- a/gtk/gtkadjustmentprivate.h +++ b/gtk/gtkadjustmentprivate.h @@ -29,8 +29,8 @@ void gtk_adjustment_enable_animation (GtkAdjustment *adjustment, guint duration); guint gtk_adjustment_get_animation_duration (GtkAdjustment *adjustment); void gtk_adjustment_animate_to_value (GtkAdjustment *adjustment, - gdouble value); -gdouble gtk_adjustment_get_target_value (GtkAdjustment *adjustment); + double value); +double gtk_adjustment_get_target_value (GtkAdjustment *adjustment); gboolean gtk_adjustment_is_animating (GtkAdjustment *adjustment); diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index 7dd1035442..a3ee15dfde 100644 --- a/gtk/gtkbuilder.c +++ b/gtk/gtkbuilder.c @@ -2132,7 +2132,7 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, case G_TYPE_FLOAT: case G_TYPE_DOUBLE: { - gdouble d; + double d; char *endptr = NULL; errno = 0; d = g_ascii_strtod (string, &endptr); diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index a5c1700017..7ed25e1699 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -310,8 +310,8 @@ gtk_button_class_init (GtkButtonClass *klass) static void click_pressed_cb (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkWidget *widget) { GtkButton *button = GTK_BUTTON (widget); @@ -353,8 +353,8 @@ touch_release_in_button (GtkGestureClick *gesture, static void click_released_cb (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkWidget *widget) { GtkButton *button = GTK_BUTTON (widget); diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 353d8358f7..0decdf544d 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -270,8 +270,8 @@ static void calendar_invalidate_day_num (GtkCalendar *widget, int day); static gboolean gtk_calendar_scroll_controller_scroll (GtkEventControllerScroll *scroll, - gdouble dx, - gdouble dy, + double dx, + double dy, GtkWidget *widget); static void calendar_set_month_prev (GtkCalendar *calendar); @@ -1139,8 +1139,8 @@ gtk_calendar_button_press (GtkGestureClick *gesture, static gboolean gtk_calendar_scroll_controller_scroll (GtkEventControllerScroll *scroll, - gdouble dx, - gdouble dy, + double dx, + double dy, GtkWidget *widget) { GtkCalendar *calendar = GTK_CALENDAR (widget); diff --git a/gtk/gtkcellrendererspin.c b/gtk/gtkcellrendererspin.c index 2c5caa0724..b8f0864263 100644 --- a/gtk/gtkcellrendererspin.c +++ b/gtk/gtkcellrendererspin.c @@ -68,7 +68,7 @@ struct _GtkCellRendererSpinPrivate { GtkWidget *spin; GtkAdjustment *adjustment; - gdouble climb_rate; + double climb_rate; guint digits; }; diff --git a/gtk/gtkcellrendererspinner.c b/gtk/gtkcellrendererspinner.c index eefb1f7093..2cacbf477e 100644 --- a/gtk/gtkcellrendererspinner.c +++ b/gtk/gtkcellrendererspinner.c @@ -288,7 +288,7 @@ gtk_cell_renderer_spinner_get_size (GtkCellRenderer *cellr, { GtkCellRendererSpinner *cell = GTK_CELL_RENDERER_SPINNER (cellr); GtkCellRendererSpinnerPrivate *priv = gtk_cell_renderer_spinner_get_instance_private (cell); - gdouble align; + double align; int w, h; int xpad, ypad; float xalign, yalign; @@ -346,9 +346,9 @@ gtk_paint_spinner (GtkStyleContext *context, { GdkRGBA color; guint num_steps; - gdouble dx, dy; - gdouble radius; - gdouble half; + double dx, dy; + double radius; + double half; int i; guint real_step; @@ -375,7 +375,7 @@ gtk_paint_spinner (GtkStyleContext *context, int inset = 0.7 * radius; /* 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; cairo_save (cr); diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index 5f1a2af590..e11e5c5fe6 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -181,7 +181,7 @@ struct _GtkCellRendererTextPrivate char *text; char *placeholder_text; - gdouble font_scale; + double font_scale; int rise; int fixed_height_rows; diff --git a/gtk/gtkcolorchooserwidget.c b/gtk/gtkcolorchooserwidget.c index 0b7f36d0db..7727e40157 100644 --- a/gtk/gtkcolorchooserwidget.c +++ b/gtk/gtkcolorchooserwidget.c @@ -266,7 +266,7 @@ update_from_editor (GtkColorEditor *editor, /* UI construction {{{1 */ static guint -scale_round (gdouble value, gdouble scale) +scale_round (double value, double scale) { value = floor (value * scale + 0.5); value = MAX (value, 0); diff --git a/gtk/gtkcoloreditor.c b/gtk/gtkcoloreditor.c index 46c89ca4ef..85a0c3df0e 100644 --- a/gtk/gtkcoloreditor.c +++ b/gtk/gtkcoloreditor.c @@ -95,7 +95,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkColorEditor, gtk_color_editor, GTK_TYPE_BOX, gtk_color_editor_iface_init)) static guint -scale_round (gdouble value, gdouble scale) +scale_round (double value, double scale) { value = floor (value * scale + 0.5); value = MAX (value, 0); @@ -161,7 +161,7 @@ static void hsv_changed (GtkColorEditor *editor) { GdkRGBA color; - gdouble h, s, v, a; + double h, s, v, a; h = gtk_adjustment_get_value (editor->h_adj); s = gtk_adjustment_get_value (editor->s_adj); @@ -333,7 +333,7 @@ static void value_changed (GtkAdjustment *a, GtkAdjustment *as) { - gdouble scale; + double scale; scale = gtk_adjustment_get_upper (as) / gtk_adjustment_get_upper (a); g_signal_handlers_block_by_func (as, value_changed, a); @@ -343,7 +343,7 @@ value_changed (GtkAdjustment *a, static GtkAdjustment * scaled_adjustment (GtkAdjustment *a, - gdouble scale) + double scale) { GtkAdjustment *as; diff --git a/gtk/gtkcolorplane.c b/gtk/gtkcolorplane.c index 90ad66347d..8aefd66fb8 100644 --- a/gtk/gtkcolorplane.c +++ b/gtk/gtkcolorplane.c @@ -56,7 +56,7 @@ sv_to_xy (GtkColorPlane *plane, int *x, int *y) { - gdouble s, v; + double s, v; int width, height; width = gtk_widget_get_width (GTK_WIDGET (plane)); @@ -124,7 +124,7 @@ create_texture (GtkColorPlane *plane) guint32 *data, *p; float h, s, v; float r, g, b; - gdouble sf, vf; + double sf, vf; int x, y; if (!gtk_widget_get_realized (widget)) @@ -234,7 +234,7 @@ update_color (GtkColorPlane *plane, int y) { GtkWidget *widget = GTK_WIDGET (plane); - gdouble s, v; + double s, v; 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); @@ -246,8 +246,8 @@ update_color (GtkColorPlane *plane, static void hold_action (GtkGestureLongPress *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkWidget *plane) { gtk_widget_activate_action (plane, @@ -257,10 +257,10 @@ hold_action (GtkGestureLongPress *gesture, static void sv_move (GtkColorPlane *plane, - gdouble ds, - gdouble dv) + double ds, + double dv) { - gdouble s, v; + double s, v; s = gtk_adjustment_get_value (plane->priv->s_adj); v = gtk_adjustment_get_value (plane->priv->v_adj); @@ -319,7 +319,7 @@ key_controller_key_pressed (GtkEventControllerKey *controller, GtkWidget *widget) { GtkColorPlane *plane = GTK_COLOR_PLANE (widget); - gdouble step; + double step; if ((state & GDK_ALT_MASK) != 0) step = 0.1; @@ -346,8 +346,8 @@ key_controller_key_pressed (GtkEventControllerKey *controller, static void plane_drag_gesture_begin (GtkGestureDrag *gesture, - gdouble start_x, - gdouble start_y, + double start_x, + double start_y, GtkWidget *plane) { guint button; @@ -375,11 +375,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, GtkColorPlane *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); @@ -388,8 +388,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, GtkColorPlane *plane) { set_cross_cursor (GTK_WIDGET (plane), FALSE); diff --git a/gtk/gtkcolorscale.c b/gtk/gtkcolorscale.c index 496a96a3ce..ec5d2c5367 100644 --- a/gtk/gtkcolorscale.c +++ b/gtk/gtkcolorscale.c @@ -50,8 +50,8 @@ enum }; static void hold_action (GtkGestureLongPress *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkWidget *scale); static void click_action (GtkGestureClick *gesture, @@ -87,9 +87,9 @@ gtk_color_scale_snapshot_trough (GtkColorScale *scale, int stride; GBytes *bytes; guchar *data, *p; - gdouble h; + double h; float r, g, b; - gdouble f; + double f; int hue_x, hue_y; stride = width * 3; @@ -260,8 +260,8 @@ scale_set_property (GObject *object, static void hold_action (GtkGestureLongPress *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkWidget *scale) { gtk_widget_activate_action (scale, diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c index ad6ef4deb6..475067a6b9 100644 --- a/gtk/gtkcolorswatch.c +++ b/gtk/gtkcolorswatch.c @@ -59,7 +59,7 @@ struct _GtkColorSwatch GtkWidget parent_instance; GdkRGBA color; - gdouble radius[4]; + double radius[4]; char *icon; guint has_color : 1; guint use_alpha : 1; @@ -270,8 +270,8 @@ swatch_primary_action (GtkColorSwatch *swatch) static void hold_action (GtkGestureLongPress *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkColorSwatch *swatch) { do_popup (swatch); @@ -281,8 +281,8 @@ hold_action (GtkGestureLongPress *gesture, static void tap_action (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkColorSwatch *swatch) { guint button; diff --git a/gtk/gtkcolorswatchprivate.h b/gtk/gtkcolorswatchprivate.h index fa8bac76f6..87031a6b32 100644 --- a/gtk/gtkcolorswatchprivate.h +++ b/gtk/gtkcolorswatchprivate.h @@ -36,10 +36,10 @@ void gtk_color_swatch_set_rgba (GtkColorSwatch *swatch, gboolean gtk_color_swatch_get_rgba (GtkColorSwatch *swatch, GdkRGBA *color); void gtk_color_swatch_set_hsva (GtkColorSwatch *swatch, - gdouble h, - gdouble s, - gdouble v, - gdouble a); + double h, + double s, + double v, + double a); void gtk_color_swatch_set_can_drop (GtkColorSwatch *swatch, gboolean can_drop); void gtk_color_swatch_set_icon (GtkColorSwatch *swatch, diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 0874726b17..6c66f0a521 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -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_scroll_controller_scroll (GtkEventControllerScroll *scroll, - gdouble dx, - gdouble dy, + double dx, + double dy, GtkComboBox *combo_box); /* listening to the model */ @@ -522,7 +522,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass) * { * GtkTreeIter iter; * GtkTreeModel model; - * gdouble value; + * double value; * * model = gtk_combo_box_get_model (combo); * @@ -1664,8 +1664,8 @@ tree_first (GtkComboBox *combo, static gboolean gtk_combo_box_scroll_controller_scroll (GtkEventControllerScroll *scroll, - gdouble dx, - gdouble dy, + double dx, + double dy, GtkComboBox *combo_box) { GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box); diff --git a/gtk/gtkcssboxesimplprivate.h b/gtk/gtkcssboxesimplprivate.h index a250de6212..01b046ee4e 100644 --- a/gtk/gtkcssboxesimplprivate.h +++ b/gtk/gtkcssboxesimplprivate.h @@ -311,8 +311,8 @@ gtk_css_boxes_get_outline_rect (GtkCssBoxes *boxes) static inline void gtk_css_boxes_clamp_border_radius (GskRoundedRect *box) { - gdouble factor = 1.0; - gdouble corners; + double factor = 1.0; + double corners; corners = box->corner[GSK_CORNER_TOP_LEFT].width + box->corner[GSK_CORNER_TOP_RIGHT].width; if (corners != 0) diff --git a/gtk/gtkcsscolorvalue.c b/gtk/gtkcsscolorvalue.c index cf38ca11fd..cbd8988c01 100644 --- a/gtk/gtkcsscolorvalue.c +++ b/gtk/gtkcsscolorvalue.c @@ -49,14 +49,14 @@ struct _GtkCssValue struct { GtkCssValue *color; - gdouble factor; + double factor; } shade, alpha; struct { GtkCssValue *color1; GtkCssValue *color2; - gdouble factor; + double factor; } mix; } sym_col; }; @@ -537,7 +537,7 @@ _gtk_css_color_value_new_name (const char *name) GtkCssValue * _gtk_css_color_value_new_shade (GtkCssValue *color, - gdouble factor) + double factor) { GtkCssValue *value; @@ -562,7 +562,7 @@ _gtk_css_color_value_new_shade (GtkCssValue *color, GtkCssValue * _gtk_css_color_value_new_alpha (GtkCssValue *color, - gdouble factor) + double factor) { GtkCssValue *value; @@ -588,7 +588,7 @@ _gtk_css_color_value_new_alpha (GtkCssValue *color, GtkCssValue * _gtk_css_color_value_new_mix (GtkCssValue *color1, GtkCssValue *color2, - gdouble factor) + double factor) { GtkCssValue *value; diff --git a/gtk/gtkcsscolorvalueprivate.h b/gtk/gtkcsscolorvalueprivate.h index 793b3d8978..49387d2c43 100644 --- a/gtk/gtkcsscolorvalueprivate.h +++ b/gtk/gtkcsscolorvalueprivate.h @@ -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_name (const char *name) G_GNUC_PURE; 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, - gdouble factor) G_GNUC_PURE; + double factor) G_GNUC_PURE; GtkCssValue * _gtk_css_color_value_new_mix (GtkCssValue *color1, GtkCssValue *color2, - gdouble factor) G_GNUC_PURE; + double factor) G_GNUC_PURE; GtkCssValue * _gtk_css_color_value_new_current_color (void) G_GNUC_PURE; gboolean gtk_css_color_value_can_parse (GtkCssParser *parser); diff --git a/gtk/gtkcustompaperunixdialog.c b/gtk/gtkcustompaperunixdialog.c index 4bd995546f..6940fdf12a 100644 --- a/gtk/gtkcustompaperunixdialog.c +++ b/gtk/gtkcustompaperunixdialog.c @@ -490,7 +490,7 @@ unit_widget_get (GtkWidget *unit_widget) static void unit_widget_set (GtkWidget *unit_widget, - gdouble value) + double value) { UnitWidget *data; diff --git a/gtk/gtkdragsource.c b/gtk/gtkdragsource.c index 73787607f4..35d107d996 100644 --- a/gtk/gtkdragsource.c +++ b/gtk/gtkdragsource.c @@ -86,8 +86,8 @@ struct _GtkDragSource int hot_x; int hot_y; - gdouble start_x; - gdouble start_y; + double start_x; + double start_y; GdkDrag *drag; }; diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 2f228182dd..d95c5f3b72 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -1504,8 +1504,8 @@ get_icon_position_from_controller (GtkEntry *entry, static void icon_pressed_cb (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkEntry *entry) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); @@ -1524,8 +1524,8 @@ icon_pressed_cb (GtkGestureClick *gesture, static void icon_released_cb (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkEntry *entry) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); @@ -1541,12 +1541,12 @@ icon_released_cb (GtkGestureClick *gesture, static void icon_drag_update_cb (GtkGestureDrag *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkEntry *entry) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); - gdouble start_x, start_y; + double start_x, start_y; GtkEntryIconPosition pos; EntryIconInfo *icon_info; @@ -3254,10 +3254,10 @@ gtk_entry_ensure_progress_widget (GtkEntry *entry) */ void gtk_entry_set_progress_fraction (GtkEntry *entry, - gdouble fraction) + double fraction) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); - gdouble old_fraction; + double old_fraction; 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 */ -gdouble +double gtk_entry_get_progress_fraction (GtkEntry *entry) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); @@ -3306,7 +3306,7 @@ gtk_entry_get_progress_fraction (GtkEntry *entry) */ void gtk_entry_set_progress_pulse_step (GtkEntry *entry, - gdouble fraction) + double fraction) { 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 */ -gdouble +double gtk_entry_get_progress_pulse_step (GtkEntry *entry) { GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry); diff --git a/gtk/gtkentry.h b/gtk/gtkentry.h index 66f8c67f00..c256fb24bf 100644 --- a/gtk/gtkentry.h +++ b/gtk/gtkentry.h @@ -167,15 +167,15 @@ GtkEntryCompletion *gtk_entry_get_completion (GtkEntry *entry); */ GDK_AVAILABLE_IN_ALL void gtk_entry_set_progress_fraction (GtkEntry *entry, - gdouble fraction); + double fraction); GDK_AVAILABLE_IN_ALL -gdouble gtk_entry_get_progress_fraction (GtkEntry *entry); +double gtk_entry_get_progress_fraction (GtkEntry *entry); GDK_AVAILABLE_IN_ALL void gtk_entry_set_progress_pulse_step (GtkEntry *entry, - gdouble fraction); + double fraction); 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 void gtk_entry_progress_pulse (GtkEntry *entry); diff --git a/gtk/gtkeventcontrollerscroll.c b/gtk/gtkeventcontrollerscroll.c index 5f4084a38f..b466bb74ee 100644 --- a/gtk/gtkeventcontrollerscroll.c +++ b/gtk/gtkeventcontrollerscroll.c @@ -70,8 +70,8 @@ typedef struct { - gdouble dx; - gdouble dy; + double dx; + double dy; guint32 evtime; } ScrollHistoryElem; @@ -82,8 +82,8 @@ struct _GtkEventControllerScroll GArray *scroll_history; /* For discrete event coalescing */ - gdouble cur_dx; - gdouble cur_dy; + double cur_dx; + double cur_dy; guint active : 1; }; @@ -115,8 +115,8 @@ G_DEFINE_TYPE (GtkEventControllerScroll, gtk_event_controller_scroll, static void scroll_history_push (GtkEventControllerScroll *scroll, - gdouble delta_x, - gdouble delta_y, + double delta_x, + double delta_y, guint32 evtime) { ScrollHistoryElem new_item; @@ -153,10 +153,10 @@ scroll_history_reset (GtkEventControllerScroll *scroll) static void scroll_history_finish (GtkEventControllerScroll *scroll, - gdouble *velocity_x, - gdouble *velocity_y) + double *velocity_x, + double *velocity_y) { - gdouble accum_dx = 0, accum_dy = 0; + double accum_dx = 0, accum_dy = 0; guint32 first = 0, last = 0; guint i; @@ -244,7 +244,7 @@ gtk_event_controller_scroll_handle_event (GtkEventController *controller, { GtkEventControllerScroll *scroll = GTK_EVENT_CONTROLLER_SCROLL (controller); GdkScrollDirection direction = GDK_SCROLL_SMOOTH; - gdouble dx = 0, dy = 0; + double dx = 0, dy = 0; gboolean handled = GDK_EVENT_PROPAGATE; 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) { - gdouble vel_x, vel_y; + double vel_x, vel_y; scroll_history_finish (scroll, &vel_x, &vel_y); g_signal_emit (controller, signals[DECELERATE], 0, vel_x, vel_y); diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c index b50f0a477d..a5864d5f47 100644 --- a/gtk/gtkexpander.c +++ b/gtk/gtkexpander.c @@ -212,8 +212,8 @@ static void gtk_expander_measure (GtkWidget *widget, /* Gestures */ static void gesture_click_released_cb (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkExpander *expander); G_DEFINE_TYPE_WITH_CODE (GtkExpander, gtk_expander, GTK_TYPE_WIDGET, @@ -566,8 +566,8 @@ gtk_expander_size_allocate (GtkWidget *widget, static void gesture_click_released_cb (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkExpander *expander) { gtk_widget_activate (GTK_WIDGET (expander)); diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index e0c817f820..44d6e85653 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -1914,8 +1914,8 @@ file_list_update_popover (GtkFileChooserWidget *impl) static void file_list_show_popover (GtkFileChooserWidget *impl, - gdouble x, - gdouble y) + double x, + double y) { GdkRectangle rect; GtkTreeSelection *selection; @@ -2062,8 +2062,8 @@ click_cb (GtkGesture *gesture, static void long_press_cb (GtkGesture *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkFileChooserWidget *impl) { file_list_show_popover (impl, x, y); diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c index 75df8e2a0f..169e18d4a7 100644 --- a/gtk/gtkflowbox.c +++ b/gtk/gtkflowbox.c @@ -2600,9 +2600,9 @@ autoscroll_cb (GtkWidget *widget, GtkFlowBox *box = GTK_FLOW_BOX (data); GtkFlowBoxPrivate *priv = BOX_PRIV (box); GtkAdjustment *adjustment; - gdouble factor; - gdouble increment; - gdouble value; + double factor; + double increment; + double value; if (priv->orientation == GTK_ORIENTATION_HORIZONTAL) adjustment = priv->vadjustment; @@ -2649,7 +2649,7 @@ autoscroll_cb (GtkWidget *widget, if (priv->rubberband_select) { GdkEventSequence *sequence; - gdouble x, y; + double x, y; GtkFlowBoxChild *child; sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (priv->drag_gesture)); @@ -2744,12 +2744,12 @@ update_autoscroll_mode (GtkFlowBox *box, static void gtk_flow_box_drag_gesture_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkFlowBox *box) { GtkFlowBoxPrivate *priv = BOX_PRIV (box); - gdouble start_x, start_y; + double start_x, start_y; GtkFlowBoxChild *child; GtkCssNode *widget_node; @@ -2796,8 +2796,8 @@ gtk_flow_box_drag_gesture_update (GtkGestureDrag *gesture, static void gtk_flow_box_click_gesture_pressed (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkFlowBox *box) { GtkFlowBoxPrivate *priv = BOX_PRIV (box); @@ -2825,8 +2825,8 @@ gtk_flow_box_click_gesture_pressed (GtkGestureClick *gesture, static void gtk_flow_box_click_unpaired_release (GtkGestureClick *gesture, - gdouble x, - gdouble y, + double x, + double y, guint button, GdkEventSequence *sequence, GtkFlowBox *box) @@ -2846,8 +2846,8 @@ gtk_flow_box_click_unpaired_release (GtkGestureClick *gesture, static void gtk_flow_box_click_gesture_released (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkFlowBox *box) { GtkFlowBoxPrivate *priv = BOX_PRIV (box); @@ -2902,8 +2902,8 @@ gtk_flow_box_click_gesture_stopped (GtkGestureClick *gesture, static void gtk_flow_box_drag_gesture_begin (GtkGestureDrag *gesture, - gdouble start_x, - gdouble start_y, + double start_x, + double start_y, GtkWidget *widget) { GtkFlowBoxPrivate *priv = BOX_PRIV (widget); @@ -2943,8 +2943,8 @@ gtk_flow_box_stop_rubberband (GtkFlowBox *box) static void gtk_flow_box_drag_gesture_end (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkFlowBox *box) { GtkFlowBoxPrivate *priv = BOX_PRIV (box); diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index f255849f77..e56b13ad42 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -293,7 +293,7 @@ size_change_cb (GtkAdjustment *adjustment, { GtkFontChooserWidget *fontchooser = user_data; PangoFontDescription *font_desc; - gdouble size = gtk_adjustment_get_value (adjustment); + double size = gtk_adjustment_get_value (adjustment); font_desc = pango_font_description_new (); if (pango_font_description_get_size_is_absolute (fontchooser->font_desc)) @@ -310,7 +310,7 @@ output_cb (GtkSpinButton *spin, { GtkAdjustment *adjustment; char *text; - gdouble value; + double value; adjustment = gtk_spin_button_get_adjustment (spin); value = gtk_adjustment_get_value (adjustment); @@ -328,7 +328,7 @@ gtk_font_chooser_widget_update_marks (GtkFontChooserWidget *self) const int *sizes; int *font_sizes; int i, n_sizes; - gdouble value, spin_value; + double value, spin_value; gpointer item; 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); if (spin_value < sizes[0]) - value = (gdouble) sizes[0]; + value = (double) sizes[0]; else if (spin_value > sizes[n_sizes - 1]) - value = (gdouble)sizes[n_sizes - 1]; + value = (double)sizes[n_sizes - 1]; else - value = (gdouble)spin_value; + value = (double)spin_value; /* ensure clamping doesn't callback into font resizing code */ 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 */ 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)), - (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))); g_signal_connect (self->tweak_action, "change-state", G_CALLBACK (change_tweak), self); diff --git a/gtk/gtkgesture.c b/gtk/gtkgesture.c index a30365d15b..84944da8e3 100644 --- a/gtk/gtkgesture.c +++ b/gtk/gtkgesture.c @@ -146,12 +146,12 @@ struct _PointData { GdkEvent *event; GtkWidget *target; - gdouble widget_x; - gdouble widget_y; + double widget_x; + double widget_y; /* Acummulators for touchpad events */ - gdouble accum_dx; - gdouble accum_dy; + double accum_dx; + double accum_dy; guint press_handled : 1; guint state : 2; @@ -1209,8 +1209,8 @@ gtk_gesture_get_last_target (GtkGesture *gesture, gboolean gtk_gesture_get_point (GtkGesture *gesture, GdkEventSequence *sequence, - gdouble *x, - gdouble *y) + double *x, + double *y) { GtkGesturePrivate *priv; PointData *data; @@ -1276,7 +1276,7 @@ gtk_gesture_get_bounding_box (GtkGesture *gesture, GdkRectangle *rect) { GtkGesturePrivate *priv; - gdouble x1, y1, x2, y2; + double x1, y1, x2, y2; GHashTableIter iter; guint n_points = 0; PointData *data; @@ -1336,8 +1336,8 @@ gtk_gesture_get_bounding_box (GtkGesture *gesture, **/ gboolean gtk_gesture_get_bounding_box_center (GtkGesture *gesture, - gdouble *x, - gdouble *y) + double *x, + double *y) { GdkEvent *last_event; GdkRectangle rect; diff --git a/gtk/gtkgesture.h b/gtk/gtkgesture.h index 026d37023f..9f7f454e6e 100644 --- a/gtk/gtkgesture.h +++ b/gtk/gtkgesture.h @@ -73,16 +73,16 @@ GdkEvent * GDK_AVAILABLE_IN_ALL gboolean gtk_gesture_get_point (GtkGesture *gesture, GdkEventSequence *sequence, - gdouble *x, - gdouble *y); + double *x, + double *y); GDK_AVAILABLE_IN_ALL gboolean gtk_gesture_get_bounding_box (GtkGesture *gesture, GdkRectangle *rect); GDK_AVAILABLE_IN_ALL gboolean gtk_gesture_get_bounding_box_center (GtkGesture *gesture, - gdouble *x, - gdouble *y); + double *x, + double *y); GDK_AVAILABLE_IN_ALL gboolean gtk_gesture_is_active (GtkGesture *gesture); diff --git a/gtk/gtkgestureclick.c b/gtk/gtkgestureclick.c index 48968e4ab8..15039ab767 100644 --- a/gtk/gtkgestureclick.c +++ b/gtk/gtkgestureclick.c @@ -47,8 +47,8 @@ typedef struct _GtkGestureClickPrivate GtkGestureClickPrivate; struct _GtkGestureClickPrivate { GdkDevice *current_device; - gdouble initial_press_x; - gdouble initial_press_y; + double initial_press_x; + double initial_press_y; guint double_click_timeout_id; guint n_presses; guint n_release; @@ -193,7 +193,7 @@ gtk_gesture_click_begin (GtkGesture *gesture, GdkEvent *event; GdkEventType event_type; GdkDevice *device; - gdouble x, y; + double x, y; if (!gtk_gesture_handles_sequence (gesture, sequence)) return; @@ -250,7 +250,7 @@ gtk_gesture_click_update (GtkGesture *gesture, { GtkGestureClick *click; GdkEventSequence *current; - gdouble x, y; + double x, y; click = GTK_GESTURE_CLICK (gesture); current = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture)); @@ -267,7 +267,7 @@ gtk_gesture_click_end (GtkGesture *gesture, GtkGestureClick *click; GtkGestureClickPrivate *priv; GdkEventSequence *current; - gdouble x, y; + double x, y; gboolean interpreted; GtkEventSequenceState state; diff --git a/gtk/gtkgestureclickprivate.h b/gtk/gtkgestureclickprivate.h index 64d04f780f..87d7da635e 100644 --- a/gtk/gtkgestureclickprivate.h +++ b/gtk/gtkgestureclickprivate.h @@ -33,12 +33,12 @@ struct _GtkGestureClickClass void (* pressed) (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y); + double x, + double y); void (* released) (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y); + double x, + double y); void (* stopped) (GtkGestureClick *gesture); /**/ diff --git a/gtk/gtkgesturedrag.c b/gtk/gtkgesturedrag.c index be03a7a291..f0939136bb 100644 --- a/gtk/gtkgesturedrag.c +++ b/gtk/gtkgesturedrag.c @@ -41,10 +41,10 @@ typedef struct _EventData EventData; struct _GtkGestureDragPrivate { - gdouble start_x; - gdouble start_y; - gdouble last_x; - gdouble last_y; + double start_x; + double start_y; + double last_x; + double last_y; }; enum { @@ -102,7 +102,7 @@ gtk_gesture_drag_update (GtkGesture *gesture, GdkEventSequence *sequence) { GtkGestureDragPrivate *priv; - gdouble x, y; + double x, y; priv = gtk_gesture_drag_get_instance_private (GTK_GESTURE_DRAG (gesture)); gtk_gesture_get_point (gesture, sequence, &priv->last_x, &priv->last_y); @@ -118,7 +118,7 @@ gtk_gesture_drag_end (GtkGesture *gesture, { GtkGestureDragPrivate *priv; GdkEventSequence *current; - gdouble x, y; + double x, y; current = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture)); @@ -234,8 +234,8 @@ gtk_gesture_drag_new (void) **/ gboolean gtk_gesture_drag_get_start_point (GtkGestureDrag *gesture, - gdouble *x, - gdouble *y) + double *x, + double *y) { GtkGestureDragPrivate *priv; GdkEventSequence *sequence; @@ -272,8 +272,8 @@ gtk_gesture_drag_get_start_point (GtkGestureDrag *gesture, **/ gboolean gtk_gesture_drag_get_offset (GtkGestureDrag *gesture, - gdouble *x, - gdouble *y) + double *x, + double *y) { GtkGestureDragPrivate *priv; GdkEventSequence *sequence; diff --git a/gtk/gtkgesturedrag.h b/gtk/gtkgesturedrag.h index 2493e65de4..fca25d1802 100644 --- a/gtk/gtkgesturedrag.h +++ b/gtk/gtkgesturedrag.h @@ -46,12 +46,12 @@ GtkGesture * gtk_gesture_drag_new (void); GDK_AVAILABLE_IN_ALL gboolean gtk_gesture_drag_get_start_point (GtkGestureDrag *gesture, - gdouble *x, - gdouble *y); + double *x, + double *y); GDK_AVAILABLE_IN_ALL gboolean gtk_gesture_drag_get_offset (GtkGestureDrag *gesture, - gdouble *x, - gdouble *y); + double *x, + double *y); G_END_DECLS diff --git a/gtk/gtkgesturedragprivate.h b/gtk/gtkgesturedragprivate.h index 63edc7e265..f29eaeb78b 100644 --- a/gtk/gtkgesturedragprivate.h +++ b/gtk/gtkgesturedragprivate.h @@ -32,14 +32,14 @@ struct _GtkGestureDragClass GtkGestureSingleClass parent_class; void (* drag_begin) (GtkGestureDrag *gesture, - gdouble start_x, - gdouble start_y); + double start_x, + double start_y); void (* drag_update) (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y); + double offset_x, + double offset_y); void (* drag_end) (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y); + double offset_x, + double offset_y); /**/ gpointer padding[10]; }; diff --git a/gtk/gtkgesturelongpress.c b/gtk/gtkgesturelongpress.c index 777debc9aa..06e254417b 100644 --- a/gtk/gtkgesturelongpress.c +++ b/gtk/gtkgesturelongpress.c @@ -56,10 +56,10 @@ enum { struct _GtkGestureLongPressPrivate { - gdouble initial_x; - gdouble initial_y; + double initial_x; + double initial_y; - gdouble delay_factor; + double delay_factor; guint timeout_id; guint delay; guint cancelled : 1; @@ -98,7 +98,7 @@ _gtk_gesture_long_press_timeout (gpointer user_data) GtkGestureLongPress *gesture = user_data; GtkGestureLongPressPrivate *priv; GdkEventSequence *sequence; - gdouble x, y; + double x, y; priv = gtk_gesture_long_press_get_instance_private (gesture); sequence = gtk_gesture_get_last_updated_sequence (GTK_GESTURE (gesture)); @@ -153,7 +153,7 @@ gtk_gesture_long_press_update (GtkGesture *gesture, { GtkGestureLongPressPrivate *priv; GtkWidget *widget; - gdouble x, y; + double x, y; widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture)); priv = gtk_gesture_long_press_get_instance_private (GTK_GESTURE_LONG_PRESS (gesture)); diff --git a/gtk/gtkgesturelongpressprivate.h b/gtk/gtkgesturelongpressprivate.h index 5b9aa88f4c..67dc4ef985 100644 --- a/gtk/gtkgesturelongpressprivate.h +++ b/gtk/gtkgesturelongpressprivate.h @@ -33,8 +33,8 @@ struct _GtkGestureLongPressClass GtkGestureSingleClass parent_class; void (* pressed) (GtkGestureLongPress *gesture, - gdouble x, - gdouble y); + double x, + double y); void (* cancelled) (GtkGestureLongPress *gesture); /*< private >*/ diff --git a/gtk/gtkgesturepan.c b/gtk/gtkgesturepan.c index fa656084c1..32c223fee5 100644 --- a/gtk/gtkgesturepan.c +++ b/gtk/gtkgesturepan.c @@ -105,8 +105,8 @@ gtk_gesture_pan_set_property (GObject *object, } static void -direction_from_offset (gdouble offset_x, - gdouble offset_y, +direction_from_offset (double offset_x, + double offset_y, GtkOrientation orientation, GtkPanDirection *direction) { @@ -130,11 +130,11 @@ direction_from_offset (gdouble offset_x, static gboolean guess_direction (GtkGesturePan *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkPanDirection *direction) { - gdouble abs_x, abs_y; + double abs_x, abs_y; abs_x = ABS (offset_x); abs_y = ABS (offset_y); @@ -169,13 +169,13 @@ check_orientation_matches (GtkGesturePan *gesture, static void gtk_gesture_pan_drag_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y) + double offset_x, + double offset_y) { GtkGesturePanPrivate *priv; GtkPanDirection direction; GtkGesturePan *pan; - gdouble offset; + double offset; pan = GTK_GESTURE_PAN (gesture); priv = gtk_gesture_pan_get_instance_private (pan); @@ -204,8 +204,8 @@ gtk_gesture_pan_drag_update (GtkGestureDrag *gesture, static void gtk_gesture_pan_drag_end (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y) + double offset_x, + double offset_y) { GtkGesturePanPrivate *priv; diff --git a/gtk/gtkgesturepanprivate.h b/gtk/gtkgesturepanprivate.h index 7090caa4f2..723c3f2696 100644 --- a/gtk/gtkgesturepanprivate.h +++ b/gtk/gtkgesturepanprivate.h @@ -33,7 +33,7 @@ struct _GtkGesturePanClass void (* pan) (GtkGesturePan *gesture, GtkPanDirection direction, - gdouble offset); + double offset); /*< private >*/ gpointer padding[10]; diff --git a/gtk/gtkgesturerotate.c b/gtk/gtkgesturerotate.c index 5498244d77..0ee3dd15a1 100644 --- a/gtk/gtkgesturerotate.c +++ b/gtk/gtkgesturerotate.c @@ -45,8 +45,8 @@ enum { struct _GtkGestureRotatePrivate { - gdouble initial_angle; - gdouble accum_touchpad_angle; + double initial_angle; + double accum_touchpad_angle; }; static guint signals[LAST_SIGNAL] = { 0 }; @@ -75,13 +75,13 @@ gtk_gesture_rotate_constructor (GType type, static gboolean _gtk_gesture_rotate_get_angle (GtkGestureRotate *rotate, - gdouble *angle) + double *angle) { GtkGestureRotatePrivate *priv; GdkEvent *last_event; - gdouble x1, y1, x2, y2; + double x1, y1, x2, y2; GtkGesture *gesture; - gdouble dx, dy; + double dx, dy; GList *sequences = NULL; GdkTouchpadGesturePhase phase; gboolean retval = FALSE; @@ -137,7 +137,7 @@ static gboolean _gtk_gesture_rotate_check_emit (GtkGestureRotate *gesture) { GtkGestureRotatePrivate *priv; - gdouble angle, delta; + double angle, delta; if (!_gtk_gesture_rotate_get_angle (gesture, &angle)) return FALSE; @@ -279,11 +279,11 @@ gtk_gesture_rotate_new (void) * * Returns: the angle delta in radians **/ -gdouble +double gtk_gesture_rotate_get_angle_delta (GtkGestureRotate *gesture) { GtkGestureRotatePrivate *priv; - gdouble angle; + double angle; g_return_val_if_fail (GTK_IS_GESTURE_ROTATE (gesture), 0.0); diff --git a/gtk/gtkgesturerotate.h b/gtk/gtkgesturerotate.h index 1c7529bd4a..248eb07893 100644 --- a/gtk/gtkgesturerotate.h +++ b/gtk/gtkgesturerotate.h @@ -46,7 +46,7 @@ GDK_AVAILABLE_IN_ALL GtkGesture * gtk_gesture_rotate_new (void); GDK_AVAILABLE_IN_ALL -gdouble gtk_gesture_rotate_get_angle_delta (GtkGestureRotate *gesture); +double gtk_gesture_rotate_get_angle_delta (GtkGestureRotate *gesture); G_END_DECLS diff --git a/gtk/gtkgesturerotateprivate.h b/gtk/gtkgesturerotateprivate.h index 12c98705ad..c3805a43b1 100644 --- a/gtk/gtkgesturerotateprivate.h +++ b/gtk/gtkgesturerotateprivate.h @@ -33,8 +33,8 @@ struct _GtkGestureRotateClass GtkGestureClass parent_class; void (* angle_changed) (GtkGestureRotate *gesture, - gdouble angle, - gdouble delta); + double angle, + double delta); /*< private >*/ gpointer padding[10]; }; diff --git a/gtk/gtkgesturestylus.c b/gtk/gtkgesturestylus.c index 0db2bb7837..2341fb5a9a 100644 --- a/gtk/gtkgesturestylus.c +++ b/gtk/gtkgesturestylus.c @@ -188,7 +188,7 @@ gesture_get_current_event (GtkGestureStylus *gesture) gboolean gtk_gesture_stylus_get_axis (GtkGestureStylus *gesture, GdkAxisUse axis, - gdouble *value) + double *value) { GdkEvent *event; @@ -219,7 +219,7 @@ gtk_gesture_stylus_get_axis (GtkGestureStylus *gesture, gboolean gtk_gesture_stylus_get_axes (GtkGestureStylus *gesture, GdkAxisUse axes[], - gdouble **values) + double **values) { GdkEvent *event; GArray *array; @@ -232,11 +232,11 @@ gtk_gesture_stylus_get_axes (GtkGestureStylus *gesture, if (!event) return FALSE; - array = g_array_new (TRUE, FALSE, sizeof (gdouble)); + array = g_array_new (TRUE, FALSE, sizeof (double)); while (axes[i] != GDK_AXIS_IGNORE) { - gdouble value; + double value; if (axes[i] >= GDK_AXIS_LAST) { @@ -252,7 +252,7 @@ gtk_gesture_stylus_get_axes (GtkGestureStylus *gesture, i++; } - *values = (gdouble *) g_array_free (array, FALSE); + *values = (double *) g_array_free (array, FALSE); return TRUE; } diff --git a/gtk/gtkgesturestylus.h b/gtk/gtkgesturestylus.h index cb4c13efb6..df31f5277a 100644 --- a/gtk/gtkgesturestylus.h +++ b/gtk/gtkgesturestylus.h @@ -46,11 +46,11 @@ GtkGesture * gtk_gesture_stylus_new (void); GDK_AVAILABLE_IN_ALL gboolean gtk_gesture_stylus_get_axis (GtkGestureStylus *gesture, GdkAxisUse axis, - gdouble *value); + double *value); GDK_AVAILABLE_IN_ALL gboolean gtk_gesture_stylus_get_axes (GtkGestureStylus *gesture, GdkAxisUse axes[], - gdouble **values); + double **values); GDK_AVAILABLE_IN_ALL gboolean gtk_gesture_stylus_get_backlog (GtkGestureStylus *gesture, GdkTimeCoord **backlog, diff --git a/gtk/gtkgesturestylusprivate.h b/gtk/gtkgesturestylusprivate.h index 9869b528a5..c37e638339 100644 --- a/gtk/gtkgesturestylusprivate.h +++ b/gtk/gtkgesturestylusprivate.h @@ -32,17 +32,17 @@ struct _GtkGestureStylusClass GtkGestureSingleClass parent_class; void (*proximity) (GtkGestureStylus *gesture, - gdouble x, - gdouble y); + double x, + double y); void (*down) (GtkGestureStylus *gesture, - gdouble x, - gdouble y); + double x, + double y); void (*motion) (GtkGestureStylus *gesture, - gdouble x, - gdouble y); + double x, + double y); void (*up) (GtkGestureStylus *gesture, - gdouble x, - gdouble y); + double x, + double y); /*< private >*/ gpointer padding[10]; diff --git a/gtk/gtkgestureswipe.c b/gtk/gtkgestureswipe.c index 4105384004..59c7aba807 100644 --- a/gtk/gtkgestureswipe.c +++ b/gtk/gtkgestureswipe.c @@ -136,7 +136,7 @@ gtk_gesture_swipe_update (GtkGesture *gesture, GtkGestureSwipe *swipe = GTK_GESTURE_SWIPE (gesture); GtkGestureSwipePrivate *priv; EventData new; - gdouble x, y; + double x, y; priv = gtk_gesture_swipe_get_instance_private (swipe); _gtk_gesture_get_last_update_time (gesture, sequence, &new.evtime); @@ -151,14 +151,14 @@ gtk_gesture_swipe_update (GtkGesture *gesture, static void _gtk_gesture_swipe_calculate_velocity (GtkGestureSwipe *gesture, - gdouble *velocity_x, - gdouble *velocity_y) + double *velocity_x, + double *velocity_y) { GtkGestureSwipePrivate *priv; GdkEventSequence *sequence; guint32 evtime, diff_time; EventData *start, *end; - gdouble diff_x, diff_y; + double diff_x, diff_y; priv = gtk_gesture_swipe_get_instance_private (gesture); *velocity_x = *velocity_y = 0; @@ -191,7 +191,7 @@ gtk_gesture_swipe_end (GtkGesture *gesture, { GtkGestureSwipe *swipe = GTK_GESTURE_SWIPE (gesture); GtkGestureSwipePrivate *priv; - gdouble velocity_x, velocity_y; + double velocity_x, velocity_y; GdkEventSequence *seq; seq = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture)); @@ -283,10 +283,10 @@ gtk_gesture_swipe_new (void) **/ gboolean gtk_gesture_swipe_get_velocity (GtkGestureSwipe *gesture, - gdouble *velocity_x, - gdouble *velocity_y) + double *velocity_x, + double *velocity_y) { - gdouble vel_x, vel_y; + double vel_x, vel_y; g_return_val_if_fail (GTK_IS_GESTURE (gesture), FALSE); diff --git a/gtk/gtkgestureswipe.h b/gtk/gtkgestureswipe.h index 330ae7eb69..a85df6c3fc 100644 --- a/gtk/gtkgestureswipe.h +++ b/gtk/gtkgestureswipe.h @@ -47,8 +47,8 @@ GtkGesture * gtk_gesture_swipe_new (void); GDK_AVAILABLE_IN_ALL gboolean gtk_gesture_swipe_get_velocity (GtkGestureSwipe *gesture, - gdouble *velocity_x, - gdouble *velocity_y); + double *velocity_x, + double *velocity_y); G_END_DECLS diff --git a/gtk/gtkgestureswipeprivate.h b/gtk/gtkgestureswipeprivate.h index 660ee3a3a0..6e41f2a691 100644 --- a/gtk/gtkgestureswipeprivate.h +++ b/gtk/gtkgestureswipeprivate.h @@ -33,8 +33,8 @@ struct _GtkGestureSwipeClass GtkGestureSingleClass parent_class; void (* swipe) (GtkGestureSwipe *gesture, - gdouble velocity_x, - gdouble velocity_y); + double velocity_x, + double velocity_y); /*< private >*/ gpointer padding[10]; diff --git a/gtk/gtkgesturezoom.c b/gtk/gtkgesturezoom.c index d706b502f3..20b67c237b 100644 --- a/gtk/gtkgesturezoom.c +++ b/gtk/gtkgesturezoom.c @@ -45,7 +45,7 @@ enum { struct _GtkGestureZoomPrivate { - gdouble initial_distance; + double initial_distance; }; static guint signals[LAST_SIGNAL] = { 0 }; @@ -74,13 +74,13 @@ gtk_gesture_zoom_constructor (GType type, static gboolean _gtk_gesture_zoom_get_distance (GtkGestureZoom *zoom, - gdouble *distance) + double *distance) { GdkEvent *last_event; - gdouble x1, y1, x2, y2; + double x1, y1, x2, y2; GtkGesture *gesture; GList *sequences = NULL; - gdouble dx, dy; + double dx, dy; GdkTouchpadGesturePhase phase; gboolean retval = FALSE; @@ -131,7 +131,7 @@ static gboolean _gtk_gesture_zoom_check_emit (GtkGestureZoom *gesture) { GtkGestureZoomPrivate *priv; - gdouble distance, zoom; + double distance, zoom; if (!_gtk_gesture_zoom_get_distance (gesture, &distance)) return FALSE; @@ -241,11 +241,11 @@ gtk_gesture_zoom_new (void) * * Returns: the scale delta **/ -gdouble +double gtk_gesture_zoom_get_scale_delta (GtkGestureZoom *gesture) { GtkGestureZoomPrivate *priv; - gdouble distance; + double distance; g_return_val_if_fail (GTK_IS_GESTURE_ZOOM (gesture), 1.0); diff --git a/gtk/gtkgesturezoom.h b/gtk/gtkgesturezoom.h index 0a02852c58..8c01affe6d 100644 --- a/gtk/gtkgesturezoom.h +++ b/gtk/gtkgesturezoom.h @@ -46,7 +46,7 @@ GDK_AVAILABLE_IN_ALL GtkGesture * gtk_gesture_zoom_new (void); GDK_AVAILABLE_IN_ALL -gdouble gtk_gesture_zoom_get_scale_delta (GtkGestureZoom *gesture); +double gtk_gesture_zoom_get_scale_delta (GtkGestureZoom *gesture); G_END_DECLS diff --git a/gtk/gtkgesturezoomprivate.h b/gtk/gtkgesturezoomprivate.h index 9935c097a7..3c7e9da331 100644 --- a/gtk/gtkgesturezoomprivate.h +++ b/gtk/gtkgesturezoomprivate.h @@ -33,7 +33,7 @@ struct _GtkGestureZoomClass GtkGestureClass parent_class; void (* scale_changed) (GtkGestureZoom *gesture, - gdouble scale); + double scale); /*< private >*/ gpointer padding[10]; }; diff --git a/gtk/gtkhsla.c b/gtk/gtkhsla.c index 78ccaec19f..abb4aaf689 100644 --- a/gtk/gtkhsla.c +++ b/gtk/gtkhsla.c @@ -43,12 +43,12 @@ void _gtk_hsla_init_from_rgba (GtkHSLA *hsla, const GdkRGBA *rgba) { - gdouble min; - gdouble max; - gdouble red; - gdouble green; - gdouble blue; - gdouble delta; + double min; + double max; + double red; + double green; + double blue; + double delta; g_return_if_fail (hsla != NULL); g_return_if_fail (rgba != NULL); @@ -112,10 +112,10 @@ void _gdk_rgba_init_from_hsla (GdkRGBA *rgba, const GtkHSLA *hsla) { - gdouble hue; - gdouble lightness; - gdouble saturation; - gdouble m1, m2; + double hue; + double lightness; + double saturation; + double m1, m2; lightness = hsla->lightness; saturation = hsla->saturation; diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 58993600c9..c80c43fe22 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -2562,11 +2562,11 @@ gtk_icon_view_set_hadjustment_values (GtkIconView *icon_view) { int width; GtkAdjustment *adj = icon_view->priv->hadjustment; - gdouble old_page_size; - gdouble old_upper; - gdouble old_value; - gdouble new_value; - gdouble new_upper; + double old_page_size; + double old_upper; + double old_value; + double new_value; + double new_upper; width = gtk_widget_get_width (GTK_WIDGET (icon_view)); diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c index 9b0b48898c..70b46e317f 100644 --- a/gtk/gtkimcontextwayland.c +++ b/gtk/gtkimcontextwayland.c @@ -71,8 +71,8 @@ struct _GtkIMContextWayland GtkWidget *widget; GtkGesture *gesture; - gdouble press_x; - gdouble press_y; + double press_x; + double press_y; struct { char *text; @@ -493,8 +493,8 @@ gtk_im_context_wayland_finalize (GObject *object) static void pressed_cb (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkIMContextWayland *context) { if (n_press == 1) @@ -507,8 +507,8 @@ pressed_cb (GtkGestureClick *gesture, static void released_cb (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkIMContextWayland *context) { GtkIMContextWaylandGlobal *global; diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c index db65bd0926..aa4f6f0726 100644 --- a/gtk/gtkinfobar.c +++ b/gtk/gtkinfobar.c @@ -439,8 +439,8 @@ close_button_clicked_cb (GtkWidget *button, static void click_released_cb (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkInfoBar *info_bar) { if (info_bar->default_response && info_bar->default_response_sensitive) diff --git a/gtk/gtkkineticscrolling.c b/gtk/gtkkineticscrolling.c index 212319b933..830fbe7dae 100644 --- a/gtk/gtkkineticscrolling.c +++ b/gtk/gtkkineticscrolling.c @@ -60,34 +60,34 @@ typedef enum { struct _GtkKineticScrolling { GtkKineticScrollingPhase phase; - gdouble lower; - gdouble upper; - gdouble overshoot_width; - gdouble decel_friction; - gdouble overshoot_friction; + double lower; + double upper; + double overshoot_width; + double decel_friction; + double overshoot_friction; - gdouble c1; - gdouble c2; - gdouble equilibrium_position; + double c1; + double c2; + double equilibrium_position; - gdouble t; - gdouble position; - gdouble velocity; + double t; + double position; + double velocity; }; static void gtk_kinetic_scrolling_init_overshoot (GtkKineticScrolling *data, - gdouble equilibrium_position, - gdouble initial_position, - gdouble initial_velocity); + double equilibrium_position, + double initial_position, + double initial_velocity); GtkKineticScrolling * -gtk_kinetic_scrolling_new (gdouble lower, - gdouble upper, - gdouble overshoot_width, - gdouble decel_friction, - gdouble overshoot_friction, - gdouble initial_position, - gdouble initial_velocity) +gtk_kinetic_scrolling_new (double lower, + double upper, + double overshoot_width, + double decel_friction, + double overshoot_friction, + double initial_position, + double initial_velocity) { GtkKineticScrolling *data; @@ -131,9 +131,9 @@ gtk_kinetic_scrolling_free (GtkKineticScrolling *kinetic) static void gtk_kinetic_scrolling_init_overshoot (GtkKineticScrolling *data, - gdouble equilibrium_position, - gdouble initial_position, - gdouble initial_velocity) + double equilibrium_position, + double initial_position, + double initial_velocity) { data->phase = GTK_KINETIC_SCROLLING_PHASE_OVERSHOOTING; data->equilibrium_position = equilibrium_position; @@ -144,16 +144,16 @@ gtk_kinetic_scrolling_init_overshoot (GtkKineticScrolling *data, gboolean gtk_kinetic_scrolling_tick (GtkKineticScrolling *data, - gdouble time_delta, - gdouble *position) + double time_delta, + double *position) { switch(data->phase) { case GTK_KINETIC_SCROLLING_PHASE_DECELERATING: { - gdouble last_position = data->position; - gdouble last_time = data->t; - gdouble exp_part; + double last_position = data->position; + double last_time = data->t; + double exp_part; data->t += time_delta; @@ -181,7 +181,7 @@ gtk_kinetic_scrolling_tick (GtkKineticScrolling *data, case GTK_KINETIC_SCROLLING_PHASE_OVERSHOOTING: { - gdouble exp_part, pos; + double exp_part, pos; data->t += time_delta; exp_part = exp(-data->overshoot_friction / 2 * data->t); diff --git a/gtk/gtkkineticscrollingprivate.h b/gtk/gtkkineticscrollingprivate.h index 92883b8c1c..29f3eae228 100644 --- a/gtk/gtkkineticscrollingprivate.h +++ b/gtk/gtkkineticscrollingprivate.h @@ -25,18 +25,18 @@ G_BEGIN_DECLS typedef struct _GtkKineticScrolling GtkKineticScrolling; -GtkKineticScrolling * gtk_kinetic_scrolling_new (gdouble lower, - gdouble upper, - gdouble overshoot_width, - gdouble decel_friction, - gdouble overshoot_friction, - gdouble initial_position, - gdouble initial_velocity); +GtkKineticScrolling * gtk_kinetic_scrolling_new (double lower, + double upper, + double overshoot_width, + double decel_friction, + double overshoot_friction, + double initial_position, + double initial_velocity); void gtk_kinetic_scrolling_free (GtkKineticScrolling *kinetic); gboolean gtk_kinetic_scrolling_tick (GtkKineticScrolling *data, - gdouble time_delta, - gdouble *position); + double time_delta, + double *position); G_END_DECLS diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 2d353ee681..b1926f45c6 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -475,8 +475,8 @@ static void gtk_label_select_region_index (GtkLabel *self, int end_index); static void gtk_label_update_active_link (GtkWidget *widget, - gdouble x, - gdouble y); + double x, + double y); static gboolean gtk_label_mnemonic_activate (GtkWidget *widget, gboolean group_cycling); @@ -519,21 +519,21 @@ static void emit_activate_link (GtkLabel *self, /* Event controller callbacks */ static void gtk_label_click_gesture_pressed (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkLabel *self); static void gtk_label_click_gesture_released (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkLabel *self); static void gtk_label_drag_gesture_begin (GtkGestureDrag *gesture, - gdouble start_x, - gdouble start_y, + double start_x, + double start_y, GtkLabel *self); static void gtk_label_drag_gesture_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkLabel *self); /* Actions */ @@ -3912,8 +3912,8 @@ out: static void gtk_label_click_gesture_pressed (GtkGestureClick *gesture, int n_press, - gdouble widget_x, - gdouble widget_y, + double widget_x, + double widget_y, GtkLabel *self) { GtkLabelSelectionInfo *info = self->select_info; @@ -3989,8 +3989,8 @@ gtk_label_click_gesture_pressed (GtkGestureClick *gesture, static void gtk_label_click_gesture_released (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkLabel *self) { GtkLabelSelectionInfo *info = self->select_info; @@ -4054,8 +4054,8 @@ get_selection_paintable (GtkLabel *self) static void gtk_label_drag_gesture_begin (GtkGestureDrag *gesture, - gdouble start_x, - gdouble start_y, + double start_x, + double start_y, GtkLabel *self) { GtkLabelSelectionInfo *info = self->select_info; @@ -4122,14 +4122,14 @@ gtk_label_drag_gesture_begin (GtkGestureDrag *gesture, static void gtk_label_drag_gesture_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkLabel *self) { GtkLabelSelectionInfo *info = self->select_info; GtkWidget *widget = GTK_WIDGET (self); GdkEventSequence *sequence; - gdouble x, y; + double x, y; int index; if (info == NULL || !info->selectable) @@ -4215,8 +4215,8 @@ gtk_label_drag_gesture_update (GtkGestureDrag *gesture, static void gtk_label_update_active_link (GtkWidget *widget, - gdouble x, - gdouble y) + double x, + double y) { GtkLabel *self = GTK_LABEL (widget); GtkLabelSelectionInfo *info = self->select_info; diff --git a/gtk/gtklevelbar.c b/gtk/gtklevelbar.c index 19942b55e8..ace50c2202 100644 --- a/gtk/gtklevelbar.c +++ b/gtk/gtklevelbar.c @@ -160,7 +160,7 @@ typedef struct _GtkLevelBarClass GtkLevelBarClass; typedef struct { char *name; - gdouble value; + double value; } GtkLevelBarOffset; struct _GtkLevelBar { @@ -170,9 +170,9 @@ struct _GtkLevelBar { GtkLevelBarMode bar_mode; - gdouble min_value; - gdouble max_value; - gdouble cur_value; + double min_value; + double max_value; + double cur_value; GList *offsets; @@ -191,7 +191,7 @@ struct _GtkLevelBarClass { }; static void gtk_level_bar_set_value_internal (GtkLevelBar *self, - gdouble value); + double value); static void gtk_level_bar_buildable_init (GtkBuildableIface *iface); @@ -202,7 +202,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkLevelBar, gtk_level_bar, GTK_TYPE_WIDGET, static GtkLevelBarOffset * gtk_level_bar_offset_new (const char *name, - gdouble value) + double value) { GtkLevelBarOffset *offset = g_slice_new0 (GtkLevelBarOffset); @@ -242,7 +242,7 @@ offset_sort_func (gconstpointer a, static gboolean gtk_level_bar_ensure_offset (GtkLevelBar *self, const char *name, - gdouble value) + double value) { GList *existing; GtkLevelBarOffset *offset = NULL; @@ -271,7 +271,7 @@ gtk_level_bar_ensure_offset (GtkLevelBar *self, #ifndef G_DISABLE_CHECKS static gboolean gtk_level_bar_value_in_interval (GtkLevelBar *self, - gdouble value) + double value) { return ((value >= self->min_value) && (value <= self->max_value)); @@ -411,7 +411,7 @@ gtk_level_bar_allocate_trough_continuous (GtkLevelBar *self, int baseline) { GtkAllocation block_area; - gdouble fill_percentage; + double fill_percentage; gboolean inverted; int block_min; @@ -569,7 +569,7 @@ update_mode_style_classes (GtkLevelBar *self) static void update_level_style_classes (GtkLevelBar *self) { - gdouble value; + double value; const char *value_class = NULL; GtkLevelBarOffset *offset, *prev_offset; GList *l; @@ -1070,8 +1070,8 @@ gtk_level_bar_new (void) * Returns: a #GtkLevelBar */ GtkWidget * -gtk_level_bar_new_for_interval (gdouble min_value, - gdouble max_value) +gtk_level_bar_new_for_interval (double min_value, + double max_value) { return g_object_new (GTK_TYPE_LEVEL_BAR, "min-value", min_value, @@ -1087,7 +1087,7 @@ gtk_level_bar_new_for_interval (gdouble min_value, * * Returns: a positive value */ -gdouble +double gtk_level_bar_get_min_value (GtkLevelBar *self) { g_return_val_if_fail (GTK_IS_LEVEL_BAR (self), 0.0); @@ -1103,7 +1103,7 @@ gtk_level_bar_get_min_value (GtkLevelBar *self) * * Returns: a positive value */ -gdouble +double gtk_level_bar_get_max_value (GtkLevelBar *self) { g_return_val_if_fail (GTK_IS_LEVEL_BAR (self), 0.0); @@ -1120,7 +1120,7 @@ gtk_level_bar_get_max_value (GtkLevelBar *self) * Returns: a value in the interval between * #GtkLevelBar:min-value and #GtkLevelBar:max-value */ -gdouble +double gtk_level_bar_get_value (GtkLevelBar *self) { g_return_val_if_fail (GTK_IS_LEVEL_BAR (self), 0.0); @@ -1130,7 +1130,7 @@ gtk_level_bar_get_value (GtkLevelBar *self) static void gtk_level_bar_set_value_internal (GtkLevelBar *self, - gdouble value) + double value) { self->cur_value = value; @@ -1151,7 +1151,7 @@ gtk_level_bar_set_value_internal (GtkLevelBar *self, */ void gtk_level_bar_set_min_value (GtkLevelBar *self, - gdouble value) + double value) { g_return_if_fail (GTK_IS_LEVEL_BAR (self)); g_return_if_fail (value >= 0.0); @@ -1181,7 +1181,7 @@ gtk_level_bar_set_min_value (GtkLevelBar *self, */ void gtk_level_bar_set_max_value (GtkLevelBar *self, - gdouble value) + double value) { g_return_if_fail (GTK_IS_LEVEL_BAR (self)); g_return_if_fail (value >= 0.0); @@ -1210,7 +1210,7 @@ gtk_level_bar_set_max_value (GtkLevelBar *self, */ void gtk_level_bar_set_value (GtkLevelBar *self, - gdouble value) + double value) { g_return_if_fail (GTK_IS_LEVEL_BAR (self)); @@ -1344,7 +1344,7 @@ gtk_level_bar_remove_offset_value (GtkLevelBar *self, void gtk_level_bar_add_offset_value (GtkLevelBar *self, const char *name, - gdouble value) + double value) { GQuark name_quark; @@ -1373,7 +1373,7 @@ gtk_level_bar_add_offset_value (GtkLevelBar *self, gboolean gtk_level_bar_get_offset_value (GtkLevelBar *self, const char *name, - gdouble *value) + double *value) { GList *existing; GtkLevelBarOffset *offset = NULL; diff --git a/gtk/gtklevelbar.h b/gtk/gtklevelbar.h index 33a03c4c7c..4444eadfb5 100644 --- a/gtk/gtklevelbar.h +++ b/gtk/gtklevelbar.h @@ -64,8 +64,8 @@ GDK_AVAILABLE_IN_ALL GtkWidget *gtk_level_bar_new (void); GDK_AVAILABLE_IN_ALL -GtkWidget *gtk_level_bar_new_for_interval (gdouble min_value, - gdouble max_value); +GtkWidget *gtk_level_bar_new_for_interval (double min_value, + double max_value); GDK_AVAILABLE_IN_ALL void gtk_level_bar_set_mode (GtkLevelBar *self, @@ -75,21 +75,21 @@ GtkLevelBarMode gtk_level_bar_get_mode (GtkLevelBar *self); GDK_AVAILABLE_IN_ALL void gtk_level_bar_set_value (GtkLevelBar *self, - gdouble value); + double value); GDK_AVAILABLE_IN_ALL -gdouble gtk_level_bar_get_value (GtkLevelBar *self); +double gtk_level_bar_get_value (GtkLevelBar *self); GDK_AVAILABLE_IN_ALL void gtk_level_bar_set_min_value (GtkLevelBar *self, - gdouble value); + double value); GDK_AVAILABLE_IN_ALL -gdouble gtk_level_bar_get_min_value (GtkLevelBar *self); +double gtk_level_bar_get_min_value (GtkLevelBar *self); GDK_AVAILABLE_IN_ALL void gtk_level_bar_set_max_value (GtkLevelBar *self, - gdouble value); + double value); GDK_AVAILABLE_IN_ALL -gdouble gtk_level_bar_get_max_value (GtkLevelBar *self); +double gtk_level_bar_get_max_value (GtkLevelBar *self); GDK_AVAILABLE_IN_ALL void gtk_level_bar_set_inverted (GtkLevelBar *self, @@ -101,14 +101,14 @@ gboolean gtk_level_bar_get_inverted (GtkLevelBar *self); GDK_AVAILABLE_IN_ALL void gtk_level_bar_add_offset_value (GtkLevelBar *self, const char *name, - gdouble value); + double value); GDK_AVAILABLE_IN_ALL void gtk_level_bar_remove_offset_value (GtkLevelBar *self, const char *name); GDK_AVAILABLE_IN_ALL gboolean gtk_level_bar_get_offset_value (GtkLevelBar *self, const char *name, - gdouble *value); + double *value); G_END_DECLS diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c index 7b9affd94e..3d3a1a720a 100644 --- a/gtk/gtklistbox.c +++ b/gtk/gtklistbox.c @@ -281,17 +281,17 @@ static void gtk_list_box_set_accept_unpaired_release (GtkList static void gtk_list_box_click_gesture_pressed (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkListBox *box); static void gtk_list_box_click_gesture_released (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkListBox *box); static void gtk_list_box_click_unpaired_release (GtkGestureClick *gesture, - gdouble x, - gdouble y, + double x, + double y, guint button, GdkEventSequence *sequence, GtkListBox *box); @@ -1782,8 +1782,8 @@ gtk_list_box_select_and_activate_full (GtkListBox *box, static void gtk_list_box_click_gesture_pressed (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkListBox *box) { GtkListBoxRow *row; @@ -1802,8 +1802,8 @@ gtk_list_box_click_gesture_pressed (GtkGestureClick *gesture, static void gtk_list_box_click_unpaired_release (GtkGestureClick *gesture, - gdouble x, - gdouble y, + double x, + double y, guint button, GdkEventSequence *sequence, GtkListBox *box) @@ -1822,8 +1822,8 @@ gtk_list_box_click_unpaired_release (GtkGestureClick *gesture, static void gtk_list_box_click_gesture_released (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkListBox *box) { /* Take a ref to protect against reentrancy diff --git a/gtk/gtkmagnifier.c b/gtk/gtkmagnifier.c index 358690fea8..d38a82ff57 100644 --- a/gtk/gtkmagnifier.c +++ b/gtk/gtkmagnifier.c @@ -33,7 +33,7 @@ typedef struct _GtkMagnifierPrivate GtkMagnifierPrivate; struct _GtkMagnifierPrivate { GdkPaintable *paintable; - gdouble magnification; + double magnification; int x; int y; gboolean resize; @@ -253,8 +253,8 @@ _gtk_magnifier_set_inspected (GtkMagnifier *magnifier, void _gtk_magnifier_set_coords (GtkMagnifier *magnifier, - gdouble x, - gdouble y) + double x, + double y) { GtkMagnifierPrivate *priv; @@ -274,8 +274,8 @@ _gtk_magnifier_set_coords (GtkMagnifier *magnifier, void _gtk_magnifier_get_coords (GtkMagnifier *magnifier, - gdouble *x, - gdouble *y) + double *x, + double *y) { GtkMagnifierPrivate *priv; @@ -292,7 +292,7 @@ _gtk_magnifier_get_coords (GtkMagnifier *magnifier, void _gtk_magnifier_set_magnification (GtkMagnifier *magnifier, - gdouble magnification) + double magnification) { GtkMagnifierPrivate *priv; @@ -313,7 +313,7 @@ _gtk_magnifier_set_magnification (GtkMagnifier *magnifier, gtk_widget_queue_draw (GTK_WIDGET (magnifier)); } -gdouble +double _gtk_magnifier_get_magnification (GtkMagnifier *magnifier) { GtkMagnifierPrivate *priv; diff --git a/gtk/gtkmagnifierprivate.h b/gtk/gtkmagnifierprivate.h index 7ce84cc1a4..8d46cdcdd8 100644 --- a/gtk/gtkmagnifierprivate.h +++ b/gtk/gtkmagnifierprivate.h @@ -49,15 +49,15 @@ void _gtk_magnifier_set_inspected (GtkMagnifier *magnifier, GtkWidget *inspected); void _gtk_magnifier_set_coords (GtkMagnifier *magnifier, - gdouble x, - gdouble y); + double x, + double y); void _gtk_magnifier_get_coords (GtkMagnifier *magnifier, - gdouble *x, - gdouble *y); + double *x, + double *y); void _gtk_magnifier_set_magnification (GtkMagnifier *magnifier, - gdouble magnification); -gdouble _gtk_magnifier_get_magnification (GtkMagnifier *magnifier); + double magnification); +double _gtk_magnifier_get_magnification (GtkMagnifier *magnifier); void _gtk_magnifier_set_resize (GtkMagnifier *magnifier, gboolean resize); diff --git a/gtk/gtkmarshalers.list b/gtk/gtkmarshalers.list index 7334e54a71..899d1fd688 100644 --- a/gtk/gtkmarshalers.list +++ b/gtk/gtkmarshalers.list @@ -13,7 +13,7 @@ # ENUM for enumeration types (int) # FLAGS for flag enumeration types (guint) # FLOAT for single-precision float types (float) -# DOUBLE for double-precision float types (gdouble) +# DOUBLE for double-precision float types (double) # STRING for string types (char *) # BOXED for boxed (anonymous but reference counted) types (GBoxed*) # POINTER for anonymous pointer types (gpointer) diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index a96e704475..fea2d3064d 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -2430,8 +2430,8 @@ gtk_notebook_page_tab_label_is_visible (GtkNotebookPage *page) static gboolean in_tabs (GtkNotebook *notebook, - gdouble x, - gdouble y) + double x, + double y) { graphene_rect_t tabs_bounds; @@ -2444,8 +2444,8 @@ in_tabs (GtkNotebook *notebook, static GList* get_tab_at_pos (GtkNotebook *notebook, - gdouble x, - gdouble y) + double x, + double y) { GtkNotebookPage *page; GList *children; diff --git a/gtk/gtkpadcontroller.c b/gtk/gtkpadcontroller.c index 8fe2b39108..df589682ad 100644 --- a/gtk/gtkpadcontroller.c +++ b/gtk/gtkpadcontroller.c @@ -150,7 +150,7 @@ gtk_pad_controller_activate_action (GtkPadController *controller, static void gtk_pad_controller_activate_action_with_axis (GtkPadController *controller, const ActionEntryData *entry, - gdouble value) + double value) { g_action_group_activate_action (controller->action_group, entry->action_name, @@ -227,7 +227,7 @@ gtk_pad_controller_handle_event (GtkEventController *controller, const ActionEntryData *entry; GtkPadActionType type; guint index, mode, group; - gdouble value = 0; + double value = 0; gdk_pad_event_get_group_mode (event, &group, &mode); if (event_type == GDK_PAD_GROUP_MODE) diff --git a/gtk/gtkpagesetup.c b/gtk/gtkpagesetup.c index 94f7748785..0bebbab543 100644 --- a/gtk/gtkpagesetup.c +++ b/gtk/gtkpagesetup.c @@ -264,7 +264,7 @@ gtk_page_setup_set_paper_size_and_default_margins (GtkPageSetup *setup, * * Returns: the top margin */ -gdouble +double gtk_page_setup_get_top_margin (GtkPageSetup *setup, GtkUnit unit) { @@ -281,7 +281,7 @@ gtk_page_setup_get_top_margin (GtkPageSetup *setup, */ void gtk_page_setup_set_top_margin (GtkPageSetup *setup, - gdouble margin, + double margin, GtkUnit unit) { setup->top_margin = _gtk_print_convert_to_mm (margin, unit); @@ -296,7 +296,7 @@ gtk_page_setup_set_top_margin (GtkPageSetup *setup, * * Returns: the bottom margin */ -gdouble +double gtk_page_setup_get_bottom_margin (GtkPageSetup *setup, GtkUnit unit) { @@ -313,7 +313,7 @@ gtk_page_setup_get_bottom_margin (GtkPageSetup *setup, */ void gtk_page_setup_set_bottom_margin (GtkPageSetup *setup, - gdouble margin, + double margin, GtkUnit unit) { setup->bottom_margin = _gtk_print_convert_to_mm (margin, unit); @@ -328,7 +328,7 @@ gtk_page_setup_set_bottom_margin (GtkPageSetup *setup, * * Returns: the left margin */ -gdouble +double gtk_page_setup_get_left_margin (GtkPageSetup *setup, GtkUnit unit) { @@ -345,7 +345,7 @@ gtk_page_setup_get_left_margin (GtkPageSetup *setup, */ void gtk_page_setup_set_left_margin (GtkPageSetup *setup, - gdouble margin, + double margin, GtkUnit unit) { setup->left_margin = _gtk_print_convert_to_mm (margin, unit); @@ -360,7 +360,7 @@ gtk_page_setup_set_left_margin (GtkPageSetup *setup, * * Returns: the right margin */ -gdouble +double gtk_page_setup_get_right_margin (GtkPageSetup *setup, GtkUnit unit) { @@ -377,7 +377,7 @@ gtk_page_setup_get_right_margin (GtkPageSetup *setup, */ void gtk_page_setup_set_right_margin (GtkPageSetup *setup, - gdouble margin, + double margin, GtkUnit unit) { setup->right_margin = _gtk_print_convert_to_mm (margin, unit); @@ -396,7 +396,7 @@ gtk_page_setup_set_right_margin (GtkPageSetup *setup, * * Returns: the paper width. */ -gdouble +double gtk_page_setup_get_paper_width (GtkPageSetup *setup, GtkUnit unit) { @@ -420,7 +420,7 @@ gtk_page_setup_get_paper_width (GtkPageSetup *setup, * * Returns: the paper height. */ -gdouble +double gtk_page_setup_get_paper_height (GtkPageSetup *setup, GtkUnit unit) { @@ -444,11 +444,11 @@ gtk_page_setup_get_paper_height (GtkPageSetup *setup, * * Returns: the page width. */ -gdouble +double gtk_page_setup_get_page_width (GtkPageSetup *setup, GtkUnit unit) { - gdouble width; + double width; width = gtk_page_setup_get_paper_width (setup, GTK_UNIT_MM); if (setup->orientation == GTK_PAGE_ORIENTATION_PORTRAIT || @@ -473,11 +473,11 @@ gtk_page_setup_get_page_width (GtkPageSetup *setup, * * Returns: the page height. */ -gdouble +double gtk_page_setup_get_page_height (GtkPageSetup *setup, GtkUnit unit) { - gdouble height; + double height; height = gtk_page_setup_get_paper_height (setup, GTK_UNIT_MM); if (setup->orientation == GTK_PAGE_ORIENTATION_PORTRAIT || @@ -589,7 +589,7 @@ gtk_page_setup_load_key_file (GtkPageSetup *setup, GError **error) { GtkPaperSize *paper_size; - gdouble top, bottom, left, right; + double top, bottom, left, right; char *orientation = NULL, *freeme = NULL; gboolean retval = FALSE; GError *err = NULL; @@ -840,7 +840,7 @@ gtk_page_setup_new_from_gvariant (GVariant *variant) { GtkPageSetup *setup; const char *orientation; - gdouble margin; + double margin; GtkPaperSize *paper_size; g_return_val_if_fail (g_variant_is_of_type (variant, G_VARIANT_TYPE_VARDICT), NULL); diff --git a/gtk/gtkpagesetup.h b/gtk/gtkpagesetup.h index 7c081e1cd2..461861e8c9 100644 --- a/gtk/gtkpagesetup.h +++ b/gtk/gtkpagesetup.h @@ -52,32 +52,32 @@ GDK_AVAILABLE_IN_ALL void gtk_page_setup_set_paper_size (GtkPageSetup *setup, GtkPaperSize *size); GDK_AVAILABLE_IN_ALL -gdouble gtk_page_setup_get_top_margin (GtkPageSetup *setup, +double gtk_page_setup_get_top_margin (GtkPageSetup *setup, GtkUnit unit); GDK_AVAILABLE_IN_ALL void gtk_page_setup_set_top_margin (GtkPageSetup *setup, - gdouble margin, + double margin, GtkUnit unit); GDK_AVAILABLE_IN_ALL -gdouble gtk_page_setup_get_bottom_margin (GtkPageSetup *setup, +double gtk_page_setup_get_bottom_margin (GtkPageSetup *setup, GtkUnit unit); GDK_AVAILABLE_IN_ALL void gtk_page_setup_set_bottom_margin (GtkPageSetup *setup, - gdouble margin, + double margin, GtkUnit unit); GDK_AVAILABLE_IN_ALL -gdouble gtk_page_setup_get_left_margin (GtkPageSetup *setup, +double gtk_page_setup_get_left_margin (GtkPageSetup *setup, GtkUnit unit); GDK_AVAILABLE_IN_ALL void gtk_page_setup_set_left_margin (GtkPageSetup *setup, - gdouble margin, + double margin, GtkUnit unit); GDK_AVAILABLE_IN_ALL -gdouble gtk_page_setup_get_right_margin (GtkPageSetup *setup, +double gtk_page_setup_get_right_margin (GtkPageSetup *setup, GtkUnit unit); GDK_AVAILABLE_IN_ALL void gtk_page_setup_set_right_margin (GtkPageSetup *setup, - gdouble margin, + double margin, GtkUnit unit); GDK_AVAILABLE_IN_ALL @@ -86,19 +86,19 @@ void gtk_page_setup_set_paper_size_and_default_margins (GtkPageSetup *setup, /* These take orientation, but not margins into consideration */ GDK_AVAILABLE_IN_ALL -gdouble gtk_page_setup_get_paper_width (GtkPageSetup *setup, +double gtk_page_setup_get_paper_width (GtkPageSetup *setup, GtkUnit unit); GDK_AVAILABLE_IN_ALL -gdouble gtk_page_setup_get_paper_height (GtkPageSetup *setup, +double gtk_page_setup_get_paper_height (GtkPageSetup *setup, GtkUnit unit); /* These take orientation, and margins into consideration */ GDK_AVAILABLE_IN_ALL -gdouble gtk_page_setup_get_page_width (GtkPageSetup *setup, +double gtk_page_setup_get_page_width (GtkPageSetup *setup, GtkUnit unit); GDK_AVAILABLE_IN_ALL -gdouble gtk_page_setup_get_page_height (GtkPageSetup *setup, +double gtk_page_setup_get_page_height (GtkPageSetup *setup, GtkUnit unit); /* Saving and restoring page setup */ diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c index d641151b95..c0743deaee 100644 --- a/gtk/gtkpagesetupunixdialog.c +++ b/gtk/gtkpagesetupunixdialog.c @@ -602,7 +602,7 @@ printer_changed_callback (GtkDropDown *combo_box, after the decimal point, and not to many such digits if they are nonzero. I wish printf let you specify max precision for %f... */ static char * -double_to_string (gdouble d, +double_to_string (double d, GtkUnit unit) { char *val, *p; diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index a930450e64..a8873a6293 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -831,8 +831,8 @@ gtk_paned_buildable_iface_init (GtkBuildableIface *iface) static gboolean initiates_touch_drag (GtkPaned *paned, - gdouble start_x, - gdouble start_y) + double start_x, + double start_y) { int handle_size, handle_pos, drag_pos; graphene_rect_t handle_area; @@ -864,8 +864,8 @@ initiates_touch_drag (GtkPaned *paned, static void gesture_drag_begin_cb (GtkGestureDrag *gesture, - gdouble start_x, - gdouble start_y, + double start_x, + double start_y, GtkPaned *paned) { GdkEventSequence *sequence; @@ -914,11 +914,11 @@ gesture_drag_begin_cb (GtkGestureDrag *gesture, static void gesture_drag_update_cb (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkPaned *paned) { - gdouble start_x, start_y; + double start_x, start_y; gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture), &start_x, &start_y); @@ -927,8 +927,8 @@ gesture_drag_update_cb (GtkGestureDrag *gesture, static void gesture_drag_end_cb (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkPaned *paned) { if (!paned->panning) @@ -1080,7 +1080,7 @@ gtk_paned_compute_position (GtkPaned *paned, else if (!paned->resize_start_child && paned->resize_end_child) pos = start_child_req; else if (start_child_req + end_child_req != 0) - pos = allocation * ((gdouble)start_child_req / (start_child_req + end_child_req)) + 0.5; + pos = allocation * ((double)start_child_req / (start_child_req + end_child_req)) + 0.5; else pos = allocation * 0.5 + 0.5; } @@ -1094,7 +1094,7 @@ gtk_paned_compute_position (GtkPaned *paned, if (paned->resize_start_child && !paned->resize_end_child) pos = paned->start_child_size + allocation - paned->last_allocation; else if (!(!paned->resize_start_child && paned->resize_end_child)) - pos = allocation * ((gdouble) paned->start_child_size / (paned->last_allocation)) + 0.5; + pos = allocation * ((double) paned->start_child_size / (paned->last_allocation)) + 0.5; else pos = paned->start_child_size; } diff --git a/gtk/gtkpapersize.c b/gtk/gtkpapersize.c index 7dbddd65af..d076f3059c 100644 --- a/gtk/gtkpapersize.c +++ b/gtk/gtkpapersize.c @@ -68,7 +68,7 @@ struct _GtkPaperSize char *display_name; char *ppd_name; - gdouble width, height; /* Stored in mm */ + double width, height; /* Stored in mm */ gboolean is_custom; gboolean is_ipp; }; @@ -103,8 +103,8 @@ lookup_paper_info (const char *name) static gboolean parse_media_size (const char *size, - gdouble *width_mm, - gdouble *height_mm) + double *width_mm, + double *height_mm) { const char *p; char *e; @@ -145,8 +145,8 @@ parse_media_size (const char *size, static gboolean parse_full_media_size_name (const char *full_name, char **name, - gdouble *width_mm, - gdouble *height_mm) + double *width_mm, + double *height_mm) { const char *p; const char *end_of_name; @@ -313,8 +313,8 @@ improve_displayname (const char *name) GtkPaperSize * gtk_paper_size_new_from_ppd (const char *ppd_name, const char *ppd_display_name, - gdouble width, - gdouble height) + double width, + double height) { char *name; const char *lookup_ppd_name; @@ -391,8 +391,8 @@ gtk_paper_size_new_from_ppd (const char *ppd_name, */ GtkPaperSize * gtk_paper_size_new_from_ipp (const char *ipp_name, - gdouble width, - gdouble height) + double width, + double height) { GtkPaperSize *size; const char *name = NULL; @@ -479,8 +479,8 @@ gtk_paper_size_new_from_ipp (const char *ipp_name, GtkPaperSize * gtk_paper_size_new_custom (const char *name, const char *display_name, - gdouble width, - gdouble height, + double width, + double height, GtkUnit unit) { GtkPaperSize *size; @@ -681,7 +681,7 @@ gtk_paper_size_get_ppd_name (GtkPaperSize *size) * * Returns: the paper width */ -gdouble +double gtk_paper_size_get_width (GtkPaperSize *size, GtkUnit unit) { @@ -698,7 +698,7 @@ gtk_paper_size_get_width (GtkPaperSize *size, * * Returns: the paper height */ -gdouble +double gtk_paper_size_get_height (GtkPaperSize *size, GtkUnit unit) { @@ -744,8 +744,8 @@ gtk_paper_size_is_ipp (GtkPaperSize *size) */ void gtk_paper_size_set_size (GtkPaperSize *size, - gdouble width, - gdouble height, + double width, + double height, GtkUnit unit) { g_return_if_fail (size != NULL); @@ -833,11 +833,11 @@ gtk_paper_size_get_default (void) * * Returns: the default top margin */ -gdouble +double gtk_paper_size_get_default_top_margin (GtkPaperSize *size, GtkUnit unit) { - gdouble margin; + double margin; margin = _gtk_print_convert_to_mm (0.25, GTK_UNIT_INCH); return _gtk_print_convert_from_mm (margin, unit); @@ -852,11 +852,11 @@ gtk_paper_size_get_default_top_margin (GtkPaperSize *size, * * Returns: the default bottom margin */ -gdouble +double gtk_paper_size_get_default_bottom_margin (GtkPaperSize *size, GtkUnit unit) { - gdouble margin; + double margin; const char *name; margin = _gtk_print_convert_to_mm (0.25, GTK_UNIT_INCH); @@ -879,11 +879,11 @@ gtk_paper_size_get_default_bottom_margin (GtkPaperSize *size, * * Returns: the default left margin */ -gdouble +double gtk_paper_size_get_default_left_margin (GtkPaperSize *size, GtkUnit unit) { - gdouble margin; + double margin; margin = _gtk_print_convert_to_mm (0.25, GTK_UNIT_INCH); return _gtk_print_convert_from_mm (margin, unit); @@ -898,11 +898,11 @@ gtk_paper_size_get_default_left_margin (GtkPaperSize *size, * * Returns: the default right margin */ -gdouble +double gtk_paper_size_get_default_right_margin (GtkPaperSize *size, GtkUnit unit) { - gdouble margin; + double margin; margin = _gtk_print_convert_to_mm (0.25, GTK_UNIT_INCH); return _gtk_print_convert_from_mm (margin, unit); @@ -931,7 +931,7 @@ gtk_paper_size_new_from_key_file (GKeyFile *key_file, char *ppd_name = NULL; char *display_name = NULL; char *freeme = NULL; - gdouble width, height; + double width, height; GError *err = NULL; g_return_val_if_fail (key_file != NULL, NULL); @@ -1089,7 +1089,7 @@ gtk_paper_size_new_from_gvariant (GVariant *variant) const char *name; const char *ppd_name; const char *display_name; - gdouble width, height; + double width, height; g_return_val_if_fail (g_variant_is_of_type (variant, G_VARIANT_TYPE_VARDICT), NULL); diff --git a/gtk/gtkpapersize.h b/gtk/gtkpapersize.h index 04e7389fab..20e4239e8e 100644 --- a/gtk/gtkpapersize.h +++ b/gtk/gtkpapersize.h @@ -92,17 +92,17 @@ GtkPaperSize *gtk_paper_size_new (const char *name); GDK_AVAILABLE_IN_ALL GtkPaperSize *gtk_paper_size_new_from_ppd (const char *ppd_name, const char *ppd_display_name, - gdouble width, - gdouble height); + double width, + double height); GDK_AVAILABLE_IN_ALL GtkPaperSize *gtk_paper_size_new_from_ipp (const char *ipp_name, - gdouble width, - gdouble height); + double width, + double height); GDK_AVAILABLE_IN_ALL GtkPaperSize *gtk_paper_size_new_custom (const char *name, const char *display_name, - gdouble width, - gdouble height, + double width, + double height, GtkUnit unit); GDK_AVAILABLE_IN_ALL GtkPaperSize *gtk_paper_size_copy (GtkPaperSize *other); @@ -124,9 +124,9 @@ GDK_AVAILABLE_IN_ALL const char *gtk_paper_size_get_ppd_name (GtkPaperSize *size); GDK_AVAILABLE_IN_ALL -gdouble gtk_paper_size_get_width (GtkPaperSize *size, GtkUnit unit); +double gtk_paper_size_get_width (GtkPaperSize *size, GtkUnit unit); GDK_AVAILABLE_IN_ALL -gdouble gtk_paper_size_get_height (GtkPaperSize *size, GtkUnit unit); +double gtk_paper_size_get_height (GtkPaperSize *size, GtkUnit unit); GDK_AVAILABLE_IN_ALL gboolean gtk_paper_size_is_custom (GtkPaperSize *size); GDK_AVAILABLE_IN_ALL @@ -135,21 +135,21 @@ gboolean gtk_paper_size_is_ipp (GtkPaperSize *size); /* Only for custom sizes: */ GDK_AVAILABLE_IN_ALL void gtk_paper_size_set_size (GtkPaperSize *size, - gdouble width, - gdouble height, + double width, + double height, GtkUnit unit); GDK_AVAILABLE_IN_ALL -gdouble gtk_paper_size_get_default_top_margin (GtkPaperSize *size, +double gtk_paper_size_get_default_top_margin (GtkPaperSize *size, GtkUnit unit); GDK_AVAILABLE_IN_ALL -gdouble gtk_paper_size_get_default_bottom_margin (GtkPaperSize *size, +double gtk_paper_size_get_default_bottom_margin (GtkPaperSize *size, GtkUnit unit); GDK_AVAILABLE_IN_ALL -gdouble gtk_paper_size_get_default_left_margin (GtkPaperSize *size, +double gtk_paper_size_get_default_left_margin (GtkPaperSize *size, GtkUnit unit); GDK_AVAILABLE_IN_ALL -gdouble gtk_paper_size_get_default_right_margin (GtkPaperSize *size, +double gtk_paper_size_get_default_right_margin (GtkPaperSize *size, GtkUnit unit); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index c24b931e02..e3e0b284b4 100644 --- a/gtk/gtkpathbar.c +++ b/gtk/gtkpathbar.c @@ -153,8 +153,8 @@ static void gtk_path_bar_update_button_appearance (GtkPathBar *path_bar, gboolean current_dir); static gboolean gtk_path_bar_scroll_controller_scroll (GtkEventControllerScroll *scroll, - gdouble dx, - gdouble dy, + double dx, + double dy, GtkPathBar *path_bar); static void @@ -671,8 +671,8 @@ gtk_path_bar_size_allocate (GtkWidget *widget, static gboolean gtk_path_bar_scroll_controller_scroll (GtkEventControllerScroll *scroll, - gdouble dx, - gdouble dy, + double dx, + double dy, GtkPathBar *path_bar) { if (dy > 0) diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index a0f3a9c070..f66bb0a265 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -271,23 +271,23 @@ static void check_unmount_and_eject (GMount *mount, gboolean *show_eject); static void on_row_pressed (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkSidebarRow *row); static void on_row_released (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkSidebarRow *row); static void on_row_dragged (GtkGestureDrag *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkSidebarRow *row); static void popup_menu_cb (GtkSidebarRow *row); static void long_press_cb (GtkGesture *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkPlacesSidebar *sidebar); static void stop_drop_feedback (GtkPlacesSidebar *sidebar); static GMountOperation * get_mount_operation (GtkPlacesSidebar *sidebar); @@ -3383,8 +3383,8 @@ on_row_activated (GtkListBox *list_box, static void on_row_pressed (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkSidebarRow *row) { GtkPlacesSidebar *sidebar; @@ -3410,8 +3410,8 @@ on_row_pressed (GtkGestureClick *gesture, static void on_row_released (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkSidebarRow *row) { GtkPlacesSidebar *sidebar; @@ -3452,8 +3452,8 @@ on_row_released (GtkGestureClick *gesture, static void on_row_dragged (GtkGestureDrag *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkSidebarRow *row) { GtkPlacesSidebar *sidebar; @@ -3532,8 +3532,8 @@ popup_menu_cb (GtkSidebarRow *row) static void long_press_cb (GtkGesture *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkPlacesSidebar *sidebar) { GtkWidget *row; diff --git a/gtk/gtkpointerfocus.c b/gtk/gtkpointerfocus.c index c24243d718..3ad4418bdd 100644 --- a/gtk/gtkpointerfocus.c +++ b/gtk/gtkpointerfocus.c @@ -35,8 +35,8 @@ gtk_pointer_focus_new (GtkWindow *toplevel, GtkWidget *widget, GdkDevice *device, GdkEventSequence *sequence, - gdouble x, - gdouble y) + double x, + double y) { GtkPointerFocus *focus; @@ -108,8 +108,8 @@ gtk_pointer_focus_get_implicit_grab (GtkPointerFocus *focus) void gtk_pointer_focus_set_coordinates (GtkPointerFocus *focus, - gdouble x, - gdouble y) + double x, + double y) { focus->x = x; focus->y = y; diff --git a/gtk/gtkpointerfocusprivate.h b/gtk/gtkpointerfocusprivate.h index afbf55bedd..7cd192902a 100644 --- a/gtk/gtkpointerfocusprivate.h +++ b/gtk/gtkpointerfocusprivate.h @@ -30,21 +30,21 @@ struct _GtkPointerFocus GtkWindow *toplevel; GtkWidget *target; /* Unaffected by the implicit grab */ GtkWidget *grab_widget; - gdouble x, y; /* In toplevel coordinates */ + double x, y; /* In toplevel coordinates */ }; GtkPointerFocus * gtk_pointer_focus_new (GtkWindow *toplevel, GtkWidget *widget, GdkDevice *device, GdkEventSequence *sequence, - gdouble x, - gdouble y); + double x, + double y); GtkPointerFocus * gtk_pointer_focus_ref (GtkPointerFocus *focus); void gtk_pointer_focus_unref (GtkPointerFocus *focus); void gtk_pointer_focus_set_coordinates (GtkPointerFocus *focus, - gdouble x, - gdouble y); + double x, + double y); void gtk_pointer_focus_set_target (GtkPointerFocus *focus, GtkWidget *target); GtkWidget * gtk_pointer_focus_get_target (GtkPointerFocus *focus); diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c index 0dd6d5ddc7..5cab6e6998 100644 --- a/gtk/gtkprintbackend.c +++ b/gtk/gtkprintbackend.c @@ -183,16 +183,16 @@ static void fallback_printer_request_details (GtkPrinter static gboolean fallback_printer_mark_conflicts (GtkPrinter *printer, GtkPrinterOptionSet *options); static gboolean fallback_printer_get_hard_margins (GtkPrinter *printer, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right); + double *top, + double *bottom, + double *left, + double *right); static gboolean fallback_printer_get_hard_margins_for_paper_size (GtkPrinter *printer, GtkPaperSize *paper_size, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right); + double *top, + double *bottom, + double *left, + double *right); static GList * fallback_printer_list_papers (GtkPrinter *printer); static GtkPageSetup * fallback_printer_get_default_page_size (GtkPrinter *printer); static GtkPrintCapabilities fallback_printer_get_capabilities (GtkPrinter *printer); @@ -380,10 +380,10 @@ fallback_printer_mark_conflicts (GtkPrinter *printer, static gboolean fallback_printer_get_hard_margins (GtkPrinter *printer, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right) + double *top, + double *bottom, + double *left, + double *right) { return FALSE; } @@ -391,10 +391,10 @@ fallback_printer_get_hard_margins (GtkPrinter *printer, static gboolean fallback_printer_get_hard_margins_for_paper_size (GtkPrinter *printer, GtkPaperSize *paper_size, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right) + double *top, + double *bottom, + double *left, + double *right) { return FALSE; } diff --git a/gtk/gtkprintbackendprivate.h b/gtk/gtkprintbackendprivate.h index 60bf250949..c31a693482 100644 --- a/gtk/gtkprintbackendprivate.h +++ b/gtk/gtkprintbackendprivate.h @@ -85,8 +85,8 @@ struct _GtkPrintBackendClass void (*printer_request_details) (GtkPrinter *printer); cairo_surface_t * (*printer_create_cairo_surface) (GtkPrinter *printer, GtkPrintSettings *settings, - gdouble height, - gdouble width, + double height, + double width, GIOChannel *cache_io); GtkPrinterOptionSet * (*printer_get_options) (GtkPrinter *printer, GtkPrintSettings *settings, @@ -104,10 +104,10 @@ struct _GtkPrintBackendClass GList * (*printer_list_papers) (GtkPrinter *printer); GtkPageSetup * (*printer_get_default_page_size) (GtkPrinter *printer); gboolean (*printer_get_hard_margins) (GtkPrinter *printer, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right); + double *top, + double *bottom, + double *left, + double *right); GtkPrintCapabilities (*printer_get_capabilities) (GtkPrinter *printer); /* Signals */ @@ -135,10 +135,10 @@ struct _GtkPrintBackendClass gboolean (*printer_get_hard_margins_for_paper_size) (GtkPrinter *printer, GtkPaperSize *paper_size, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right); + double *top, + double *bottom, + double *left, + double *right); }; #define GTK_PRINT_BACKEND_EXTENSION_POINT_NAME "gtk-print-backend" diff --git a/gtk/gtkprintcontext.c b/gtk/gtkprintcontext.c index f01b9648bc..d3c730d707 100644 --- a/gtk/gtkprintcontext.c +++ b/gtk/gtkprintcontext.c @@ -112,17 +112,17 @@ struct _GtkPrintContext cairo_t *cr; GtkPageSetup *page_setup; - gdouble surface_dpi_x; - gdouble surface_dpi_y; + double surface_dpi_x; + double surface_dpi_y; - gdouble pixels_per_unit_x; - gdouble pixels_per_unit_y; + double pixels_per_unit_x; + double pixels_per_unit_y; gboolean has_hard_margins; - gdouble hard_margin_top; - gdouble hard_margin_bottom; - gdouble hard_margin_left; - gdouble hard_margin_right; + double hard_margin_top; + double hard_margin_bottom; + double hard_margin_left; + double hard_margin_right; }; @@ -241,7 +241,7 @@ _gtk_print_context_rotate_according_to_orientation (GtkPrintContext *context) cairo_t *cr = context->cr; cairo_matrix_t matrix; GtkPaperSize *paper_size; - gdouble width, height; + double width, height; paper_size = gtk_page_setup_get_paper_size (context->page_setup); @@ -287,7 +287,7 @@ _gtk_print_context_reverse_according_to_orientation (GtkPrintContext *context) { cairo_t *cr = context->cr; cairo_matrix_t matrix; - gdouble width, height; + double width, height; width = gtk_page_setup_get_paper_width (context->page_setup, GTK_UNIT_INCH); width = width * context->surface_dpi_x / context->pixels_per_unit_x; @@ -315,7 +315,7 @@ _gtk_print_context_reverse_according_to_orientation (GtkPrintContext *context) void _gtk_print_context_translate_into_margin (GtkPrintContext *context) { - gdouble dx, dy; + double dx, dy; g_return_if_fail (GTK_IS_PRINT_CONTEXT (context)); @@ -405,11 +405,11 @@ gtk_print_context_get_page_setup (GtkPrintContext *context) * * Returns: the width of @context */ -gdouble +double gtk_print_context_get_width (GtkPrintContext *context) { GtkPrintOperationPrivate *priv; - gdouble width; + double width; g_return_val_if_fail (GTK_IS_PRINT_CONTEXT (context), 0); @@ -432,11 +432,11 @@ gtk_print_context_get_width (GtkPrintContext *context) * * Returns: the height of @context */ -gdouble +double gtk_print_context_get_height (GtkPrintContext *context) { GtkPrintOperationPrivate *priv; - gdouble height; + double height; g_return_val_if_fail (GTK_IS_PRINT_CONTEXT (context), 0); @@ -460,7 +460,7 @@ gtk_print_context_get_height (GtkPrintContext *context) * * Returns: the horizontal resolution of @context */ -gdouble +double gtk_print_context_get_dpi_x (GtkPrintContext *context) { g_return_val_if_fail (GTK_IS_PRINT_CONTEXT (context), 0); @@ -477,7 +477,7 @@ gtk_print_context_get_dpi_x (GtkPrintContext *context) * * Returns: the vertical resolution of @context */ -gdouble +double gtk_print_context_get_dpi_y (GtkPrintContext *context) { g_return_val_if_fail (GTK_IS_PRINT_CONTEXT (context), 0); @@ -499,10 +499,10 @@ gtk_print_context_get_dpi_y (GtkPrintContext *context) */ gboolean gtk_print_context_get_hard_margins (GtkPrintContext *context, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right) + double *top, + double *bottom, + double *left, + double *right) { if (context->has_hard_margins) { @@ -527,10 +527,10 @@ gtk_print_context_get_hard_margins (GtkPrintContext *context, */ void _gtk_print_context_set_hard_margins (GtkPrintContext *context, - gdouble top, - gdouble bottom, - gdouble left, - gdouble right) + double top, + double bottom, + double left, + double right) { context->hard_margin_top = top; context->hard_margin_bottom = bottom; diff --git a/gtk/gtkprintcontext.h b/gtk/gtkprintcontext.h index c78be90c90..3c4ede2bbf 100644 --- a/gtk/gtkprintcontext.h +++ b/gtk/gtkprintcontext.h @@ -47,19 +47,19 @@ cairo_t *gtk_print_context_get_cairo_context (GtkPrintContext *context); GDK_AVAILABLE_IN_ALL GtkPageSetup *gtk_print_context_get_page_setup (GtkPrintContext *context); GDK_AVAILABLE_IN_ALL -gdouble gtk_print_context_get_width (GtkPrintContext *context); +double gtk_print_context_get_width (GtkPrintContext *context); GDK_AVAILABLE_IN_ALL -gdouble gtk_print_context_get_height (GtkPrintContext *context); +double gtk_print_context_get_height (GtkPrintContext *context); GDK_AVAILABLE_IN_ALL -gdouble gtk_print_context_get_dpi_x (GtkPrintContext *context); +double gtk_print_context_get_dpi_x (GtkPrintContext *context); GDK_AVAILABLE_IN_ALL -gdouble gtk_print_context_get_dpi_y (GtkPrintContext *context); +double gtk_print_context_get_dpi_y (GtkPrintContext *context); GDK_AVAILABLE_IN_ALL gboolean gtk_print_context_get_hard_margins (GtkPrintContext *context, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right); + double *top, + double *bottom, + double *left, + double *right); /* Fonts */ GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkprinter.c b/gtk/gtkprinter.c index f10b3f7043..76f2a83818 100644 --- a/gtk/gtkprinter.c +++ b/gtk/gtkprinter.c @@ -928,8 +928,8 @@ _gtk_printer_prepare_for_print (GtkPrinter *printer, cairo_surface_t * _gtk_printer_create_cairo_surface (GtkPrinter *printer, GtkPrintSettings *settings, - gdouble width, - gdouble height, + double width, + double height, GIOChannel *cache_io) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); @@ -999,10 +999,10 @@ gtk_printer_get_default_page_size (GtkPrinter *printer) */ gboolean gtk_printer_get_hard_margins (GtkPrinter *printer, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right) + double *top, + double *bottom, + double *left, + double *right) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); GtkPrintBackendClass *backend_class = GTK_PRINT_BACKEND_GET_CLASS (priv->backend); @@ -1031,10 +1031,10 @@ gtk_printer_get_hard_margins (GtkPrinter *printer, gboolean gtk_printer_get_hard_margins_for_paper_size (GtkPrinter *printer, GtkPaperSize *paper_size, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right) + double *top, + double *bottom, + double *left, + double *right) { GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer); GtkPrintBackendClass *backend_class = GTK_PRINT_BACKEND_GET_CLASS (priv->backend); diff --git a/gtk/gtkprinter.h b/gtk/gtkprinter.h index 71a55bab46..0a259d9b16 100644 --- a/gtk/gtkprinter.h +++ b/gtk/gtkprinter.h @@ -127,17 +127,17 @@ GDK_AVAILABLE_IN_ALL GtkPrintCapabilities gtk_printer_get_capabilities (GtkPrinter *printer); GDK_AVAILABLE_IN_ALL gboolean gtk_printer_get_hard_margins (GtkPrinter *printer, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right); + double *top, + double *bottom, + double *left, + double *right); GDK_AVAILABLE_IN_ALL gboolean gtk_printer_get_hard_margins_for_paper_size (GtkPrinter *printer, GtkPaperSize *paper_size, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right); + double *top, + double *bottom, + double *left, + double *right); /** * GtkPrinterFunc: diff --git a/gtk/gtkprinterprivate.h b/gtk/gtkprinterprivate.h index ed4ecc526d..a3a11b4acc 100644 --- a/gtk/gtkprinterprivate.h +++ b/gtk/gtkprinterprivate.h @@ -60,8 +60,8 @@ void _gtk_printer_prepare_for_print (GtkPrinter GtkPageSetup *page_setup); cairo_surface_t * _gtk_printer_create_cairo_surface (GtkPrinter *printer, GtkPrintSettings *settings, - gdouble width, - gdouble height, + double width, + double height, GIOChannel *cache_io); GHashTable * _gtk_printer_get_custom_widgets (GtkPrinter *printer); diff --git a/gtk/gtkprintjob.c b/gtk/gtkprintjob.c index 50f3d68db8..554036bbcc 100644 --- a/gtk/gtkprintjob.c +++ b/gtk/gtkprintjob.c @@ -78,7 +78,7 @@ struct _GtkPrintJob int num_page_ranges; GtkPageSet page_set; int num_copies; - gdouble scale; + double scale; guint number_up; GtkNumberUpLayout number_up_layout; @@ -476,7 +476,7 @@ gtk_print_job_get_surface (GtkPrintJob *job, GError **error) { char *filename = NULL; - gdouble width, height; + double width, height; GtkPaperSize *paper_size; int fd; GError *tmp_error; @@ -813,7 +813,7 @@ gtk_print_job_set_num_copies (GtkPrintJob *job, * * Returns: the scale */ -gdouble +double gtk_print_job_get_scale (GtkPrintJob *job) { @@ -829,7 +829,7 @@ gtk_print_job_get_scale (GtkPrintJob *job) */ void gtk_print_job_set_scale (GtkPrintJob *job, - gdouble scale) + double scale) { job->scale = scale; } diff --git a/gtk/gtkprintjob.h b/gtk/gtkprintjob.h index cc300aa10e..54617ee6dc 100644 --- a/gtk/gtkprintjob.h +++ b/gtk/gtkprintjob.h @@ -110,10 +110,10 @@ GDK_AVAILABLE_IN_ALL void gtk_print_job_set_num_copies (GtkPrintJob *job, int num_copies); GDK_AVAILABLE_IN_ALL -gdouble gtk_print_job_get_scale (GtkPrintJob *job); +double gtk_print_job_get_scale (GtkPrintJob *job); GDK_AVAILABLE_IN_ALL void gtk_print_job_set_scale (GtkPrintJob *job, - gdouble scale); + double scale); GDK_AVAILABLE_IN_ALL guint gtk_print_job_get_n_up (GtkPrintJob *job); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkprintoperation-portal.c b/gtk/gtkprintoperation-portal.c index 15bf35c7bc..2ec934dcc3 100644 --- a/gtk/gtkprintoperation-portal.c +++ b/gtk/gtkprintoperation-portal.c @@ -105,7 +105,7 @@ portal_start_page (GtkPrintOperation *op, GtkPrintOperationPortal *op_portal = op->priv->platform_data; GtkPaperSize *paper_size; cairo_surface_type_t type; - gdouble w, h; + double w, h; paper_size = gtk_page_setup_get_paper_size (page_setup); diff --git a/gtk/gtkprintoperation-private.h b/gtk/gtkprintoperation-private.h index 5f178fc4dc..0ac7d19e18 100644 --- a/gtk/gtkprintoperation-private.h +++ b/gtk/gtkprintoperation-private.h @@ -114,8 +114,8 @@ void _gtk_print_operation_platform_backend_launch_preview const char *filename); cairo_surface_t * _gtk_print_operation_platform_backend_create_preview_surface (GtkPrintOperation *op, GtkPageSetup *page_setup, - gdouble *dpi_x, - gdouble *dpi_y, + double *dpi_x, + double *dpi_y, char **target); void _gtk_print_operation_platform_backend_resize_preview_surface (GtkPrintOperation *op, GtkPageSetup *page_setup, @@ -140,10 +140,10 @@ void _gtk_print_context_translate_into_margin (GtkPrintCon void _gtk_print_context_rotate_according_to_orientation (GtkPrintContext *context); void _gtk_print_context_reverse_according_to_orientation (GtkPrintContext *context); void _gtk_print_context_set_hard_margins (GtkPrintContext *context, - gdouble top, - gdouble bottom, - gdouble left, - gdouble right); + double top, + double bottom, + double left, + double right); G_END_DECLS diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c index 61391de98a..6760aafcf9 100644 --- a/gtk/gtkprintoperation-unix.c +++ b/gtk/gtkprintoperation-unix.c @@ -74,7 +74,7 @@ unix_start_page (GtkPrintOperation *op, GtkPrintOperationUnix *op_unix; GtkPaperSize *paper_size; cairo_surface_type_t type; - gdouble w, h; + double w, h; op_unix = op->priv->platform_data; @@ -522,7 +522,7 @@ finish_print (PrintResponseData *rdata, GtkPrintOperation *op = rdata->op; GtkPrintOperationPrivate *priv = op->priv; GtkPrintJob *job; - gdouble top, bottom, left, right; + double top, bottom, left, right; if (rdata->do_print) { @@ -782,14 +782,14 @@ close_preview (void *data) static cairo_surface_t * gtk_print_operation_unix_create_preview_surface (GtkPrintOperation *op, GtkPageSetup *page_setup, - gdouble *dpi_x, - gdouble *dpi_y, + double *dpi_x, + double *dpi_y, char **target) { char *filename; int fd; GtkPaperSize *paper_size; - gdouble w, h; + double w, h; cairo_surface_t *surface; static cairo_user_data_key_t key; @@ -836,7 +836,7 @@ gtk_print_operation_unix_resize_preview_surface (GtkPrintOperation *op, GtkPageSetup *page_setup, cairo_surface_t *surface) { - gdouble w, h; + double w, h; w = gtk_page_setup_get_paper_width (page_setup, GTK_UNIT_POINTS); h = gtk_page_setup_get_paper_height (page_setup, GTK_UNIT_POINTS); @@ -1271,8 +1271,8 @@ _gtk_print_operation_platform_backend_launch_preview (GtkPrintOperation *op, cairo_surface_t * _gtk_print_operation_platform_backend_create_preview_surface (GtkPrintOperation *op, GtkPageSetup *page_setup, - gdouble *dpi_x, - gdouble *dpi_y, + double *dpi_x, + double *dpi_y, char **target) { return gtk_print_operation_unix_create_preview_surface (op, page_setup, dpi_x, dpi_y, target); diff --git a/gtk/gtkprintoperation-win32.c b/gtk/gtkprintoperation-win32.c index 55c0a554fd..00f1a6c381 100644 --- a/gtk/gtkprintoperation-win32.c +++ b/gtk/gtkprintoperation-win32.c @@ -2010,8 +2010,8 @@ _gtk_print_operation_platform_backend_preview_end_page (GtkPrintOperation *op, cairo_surface_t * _gtk_print_operation_platform_backend_create_preview_surface (GtkPrintOperation *op, GtkPageSetup *page_setup, - gdouble *dpi_x, - gdouble *dpi_y, + double *dpi_x, + double *dpi_y, char **target) { GtkPaperSize *paper_size; diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c index 5a43683afb..56547c2403 100644 --- a/gtk/gtkprintoperation.c +++ b/gtk/gtkprintoperation.c @@ -643,7 +643,7 @@ gtk_print_operation_preview_handler (GtkPrintOperation *op, GtkPrintContext *context, GtkWindow *parent) { - gdouble dpi_x, dpi_y; + double dpi_x, dpi_y; PreviewOp *pop; GtkPageSetup *page_setup; cairo_t *cr; @@ -870,7 +870,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class) * { * cairo_t *cr; * PangoLayout *layout; - * gdouble width, text_height; + * double width, text_height; * int layout_height; * PangoFontDescription *desc; * @@ -893,7 +893,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class) * pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER); * * pango_layout_get_size (layout, NULL, &layout_height); - * text_height = (gdouble)layout_height / PANGO_SCALE; + * text_height = (double)layout_height / PANGO_SCALE; * * cairo_move_to (cr, width / 2, (HEADER_HEIGHT - text_height) / 2); * pango_cairo_show_layout (cr, layout); @@ -1948,7 +1948,7 @@ pdf_start_page (GtkPrintOperation *op, GtkPageSetup *page_setup) { cairo_surface_t *surface = op->priv->platform_data; - gdouble w, h; + double w, h; w = gtk_page_setup_get_paper_width (page_setup, GTK_UNIT_POINTS); h = gtk_page_setup_get_paper_height (page_setup, GTK_UNIT_POINTS); @@ -1994,7 +1994,7 @@ run_pdf (GtkPrintOperation *op, GtkPageSetup *page_setup; cairo_surface_t *surface; cairo_t *cr; - gdouble width, height; + double width, height; priv->print_context = _gtk_print_context_new (op); @@ -2390,13 +2390,13 @@ common_render_page (GtkPrintOperation *op, else { GtkPageOrientation orientation; - gdouble paper_width, paper_height; - gdouble page_width, page_height; - gdouble context_width, context_height; - gdouble bottom_margin, top_margin, left_margin, right_margin; - gdouble x_step, y_step; - gdouble x_scale, y_scale, scale; - gdouble horizontal_offset = 0.0, vertical_offset = 0.0; + double paper_width, paper_height; + double page_width, page_height; + double context_width, context_height; + double bottom_margin, top_margin, left_margin, right_margin; + double x_step, y_step; + double x_scale, y_scale, scale; + double horizontal_offset = 0.0, vertical_offset = 0.0; int columns, rows, x, y, tmp_length; page_setup = gtk_print_context_get_page_setup (print_context); diff --git a/gtk/gtkprintsettings.c b/gtk/gtkprintsettings.c index 261e2c74e2..0df67a23e6 100644 --- a/gtk/gtkprintsettings.c +++ b/gtk/gtkprintsettings.c @@ -309,10 +309,10 @@ gtk_print_settings_set_bool (GtkPrintSettings *settings, * * Returns: the floating point number associated with @key */ -gdouble +double gtk_print_settings_get_double_with_default (GtkPrintSettings *settings, const char *key, - gdouble def) + double def) { const char *val; @@ -332,7 +332,7 @@ gtk_print_settings_get_double_with_default (GtkPrintSettings *settings, * * Returns: the double value of @key */ -gdouble +double gtk_print_settings_get_double (GtkPrintSettings *settings, const char *key) { @@ -350,7 +350,7 @@ gtk_print_settings_get_double (GtkPrintSettings *settings, void gtk_print_settings_set_double (GtkPrintSettings *settings, const char *key, - gdouble value) + double value) { char buf[G_ASCII_DTOSTR_BUF_SIZE]; @@ -369,12 +369,12 @@ gtk_print_settings_set_double (GtkPrintSettings *settings, * * Returns: the length value of @key, converted to @unit */ -gdouble +double gtk_print_settings_get_length (GtkPrintSettings *settings, const char *key, GtkUnit unit) { - gdouble length = gtk_print_settings_get_double (settings, key); + double length = gtk_print_settings_get_double (settings, key); return _gtk_print_convert_from_mm (length, unit); } @@ -390,7 +390,7 @@ gtk_print_settings_get_length (GtkPrintSettings *settings, void gtk_print_settings_set_length (GtkPrintSettings *settings, const char *key, - gdouble value, + double value, GtkUnit unit) { gtk_print_settings_set_double (settings, key, @@ -580,7 +580,7 @@ gtk_print_settings_get_paper_size (GtkPrintSettings *settings) { const char *val; const char *name; - gdouble w, h; + double w, h; val = gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_PAPER_FORMAT); if (val == NULL) @@ -648,7 +648,7 @@ gtk_print_settings_set_paper_size (GtkPrintSettings *settings, * * Returns: the paper width, in units of @unit */ -gdouble +double gtk_print_settings_get_paper_width (GtkPrintSettings *settings, GtkUnit unit) { @@ -665,7 +665,7 @@ gtk_print_settings_get_paper_width (GtkPrintSettings *settings, */ void gtk_print_settings_set_paper_width (GtkPrintSettings *settings, - gdouble width, + double width, GtkUnit unit) { gtk_print_settings_set_length (settings, GTK_PRINT_SETTINGS_PAPER_WIDTH, width, unit); @@ -681,7 +681,7 @@ gtk_print_settings_set_paper_width (GtkPrintSettings *settings, * * Returns: the paper height, in units of @unit */ -gdouble +double gtk_print_settings_get_paper_height (GtkPrintSettings *settings, GtkUnit unit) { @@ -700,7 +700,7 @@ gtk_print_settings_get_paper_height (GtkPrintSettings *settings, */ void gtk_print_settings_set_paper_height (GtkPrintSettings *settings, - gdouble height, + double height, GtkUnit unit) { gtk_print_settings_set_length (settings, @@ -1195,7 +1195,7 @@ gtk_print_settings_set_resolution_xy (GtkPrintSettings *settings, * * Returns: the resolution in lpi (lines per inch) */ -gdouble +double gtk_print_settings_get_printer_lpi (GtkPrintSettings *settings) { return gtk_print_settings_get_double_with_default (settings, GTK_PRINT_SETTINGS_PRINTER_LPI, 150.0); @@ -1210,7 +1210,7 @@ gtk_print_settings_get_printer_lpi (GtkPrintSettings *settings) */ void gtk_print_settings_set_printer_lpi (GtkPrintSettings *settings, - gdouble lpi) + double lpi) { gtk_print_settings_set_double (settings, GTK_PRINT_SETTINGS_PRINTER_LPI, lpi); @@ -1224,7 +1224,7 @@ gtk_print_settings_set_printer_lpi (GtkPrintSettings *settings, * * Returns: the scale in percent */ -gdouble +double gtk_print_settings_get_scale (GtkPrintSettings *settings) { return gtk_print_settings_get_double_with_default (settings, @@ -1241,7 +1241,7 @@ gtk_print_settings_get_scale (GtkPrintSettings *settings) */ void gtk_print_settings_set_scale (GtkPrintSettings *settings, - gdouble scale) + double scale) { gtk_print_settings_set_double (settings, GTK_PRINT_SETTINGS_SCALE, scale); diff --git a/gtk/gtkprintsettings.h b/gtk/gtkprintsettings.h index 2b624c06ef..3c8363d27e 100644 --- a/gtk/gtkprintsettings.h +++ b/gtk/gtkprintsettings.h @@ -108,24 +108,24 @@ void gtk_print_settings_set_bool (GtkPrintSettings const char *key, gboolean value); GDK_AVAILABLE_IN_ALL -gdouble gtk_print_settings_get_double (GtkPrintSettings *settings, +double gtk_print_settings_get_double (GtkPrintSettings *settings, const char *key); GDK_AVAILABLE_IN_ALL -gdouble gtk_print_settings_get_double_with_default (GtkPrintSettings *settings, +double gtk_print_settings_get_double_with_default (GtkPrintSettings *settings, const char *key, - gdouble def); + double def); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_double (GtkPrintSettings *settings, const char *key, - gdouble value); + double value); GDK_AVAILABLE_IN_ALL -gdouble gtk_print_settings_get_length (GtkPrintSettings *settings, +double gtk_print_settings_get_length (GtkPrintSettings *settings, const char *key, GtkUnit unit); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_length (GtkPrintSettings *settings, const char *key, - gdouble value, + double value, GtkUnit unit); GDK_AVAILABLE_IN_ALL int gtk_print_settings_get_int (GtkPrintSettings *settings, @@ -221,18 +221,18 @@ GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_paper_size (GtkPrintSettings *settings, GtkPaperSize *paper_size); GDK_AVAILABLE_IN_ALL -gdouble gtk_print_settings_get_paper_width (GtkPrintSettings *settings, +double gtk_print_settings_get_paper_width (GtkPrintSettings *settings, GtkUnit unit); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_paper_width (GtkPrintSettings *settings, - gdouble width, + double width, GtkUnit unit); GDK_AVAILABLE_IN_ALL -gdouble gtk_print_settings_get_paper_height (GtkPrintSettings *settings, +double gtk_print_settings_get_paper_height (GtkPrintSettings *settings, GtkUnit unit); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_paper_height (GtkPrintSettings *settings, - gdouble height, + double height, GtkUnit unit); GDK_AVAILABLE_IN_ALL gboolean gtk_print_settings_get_use_color (GtkPrintSettings *settings); @@ -288,15 +288,15 @@ void gtk_print_settings_set_resolution_xy (GtkPrintSettings int resolution_x, int resolution_y); GDK_AVAILABLE_IN_ALL -gdouble gtk_print_settings_get_printer_lpi (GtkPrintSettings *settings); +double gtk_print_settings_get_printer_lpi (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_printer_lpi (GtkPrintSettings *settings, - gdouble lpi); + double lpi); GDK_AVAILABLE_IN_ALL -gdouble gtk_print_settings_get_scale (GtkPrintSettings *settings); +double gtk_print_settings_get_scale (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL void gtk_print_settings_set_scale (GtkPrintSettings *settings, - gdouble scale); + double scale); GDK_AVAILABLE_IN_ALL GtkPrintPages gtk_print_settings_get_print_pages (GtkPrintSettings *settings); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index 2b1c89e346..26a25a6cfc 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -2192,7 +2192,7 @@ dialog_set_print_pages (GtkPrintUnixDialog *dialog, gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->all_pages_radio), TRUE); } -static gdouble +static double dialog_get_scale (GtkPrintUnixDialog *dialog) { if (gtk_widget_is_sensitive (dialog->scale_spin)) @@ -2203,7 +2203,7 @@ dialog_get_scale (GtkPrintUnixDialog *dialog) static void dialog_set_scale (GtkPrintUnixDialog *dialog, - gdouble val) + double val) { gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->scale_spin), val); } @@ -2359,10 +2359,10 @@ draw_page (GtkDrawingArea *da, GtkWidget *widget = GTK_WIDGET (da); GtkPrintUnixDialog *dialog = GTK_PRINT_UNIX_DIALOG (data); GtkStyleContext *context; - gdouble ratio; + double ratio; int w, h, tmp; int pages_x, pages_y, i, x, y, layout_w, layout_h; - gdouble page_width, page_height; + double page_width, page_height; GtkPageOrientation orientation; gboolean landscape; PangoLayout *layout; @@ -2374,8 +2374,8 @@ draw_page (GtkDrawingArea *da, int dx, dy; gboolean horizontal; GtkPageSetup *page_setup; - gdouble paper_width, paper_height; - gdouble pos_x, pos_y; + double paper_width, paper_height; + double pos_x, pos_y; int pages_per_sheet; gboolean ltr = TRUE; @@ -2479,8 +2479,8 @@ draw_page (GtkDrawingArea *da, i = 1; - page_width = (gdouble)w / pages_x; - page_height = (gdouble)h / pages_y; + page_width = (double)w / pages_x; + page_height = (double)h / pages_y; layout = pango_cairo_create_layout (cr); diff --git a/gtk/gtkprintutils.c b/gtk/gtkprintutils.c index a8b1d835cc..a8e2095b2b 100644 --- a/gtk/gtkprintutils.c +++ b/gtk/gtkprintutils.c @@ -19,8 +19,8 @@ #include "config.h" #include "gtkprintutils.h" -gdouble -_gtk_print_convert_to_mm (gdouble len, +double +_gtk_print_convert_to_mm (double len, GtkUnit unit) { switch (unit) @@ -39,8 +39,8 @@ _gtk_print_convert_to_mm (gdouble len, } } -gdouble -_gtk_print_convert_from_mm (gdouble len, +double +_gtk_print_convert_from_mm (double len, GtkUnit unit) { switch (unit) diff --git a/gtk/gtkprintutils.h b/gtk/gtkprintutils.h index 47678b37fd..7b4596a568 100644 --- a/gtk/gtkprintutils.h +++ b/gtk/gtkprintutils.h @@ -27,8 +27,8 @@ G_BEGIN_DECLS #define MM_PER_INCH 25.4 #define POINTS_PER_INCH 72 -gdouble _gtk_print_convert_to_mm (gdouble len, GtkUnit unit); -gdouble _gtk_print_convert_from_mm (gdouble len, GtkUnit unit); +double _gtk_print_convert_to_mm (double len, GtkUnit unit); +double _gtk_print_convert_from_mm (double len, GtkUnit unit); G_END_DECLS diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h index f3c7148b2e..9a128c3c03 100644 --- a/gtk/gtkprivate.h +++ b/gtk/gtkprivate.h @@ -96,8 +96,8 @@ guint32 gtk_get_current_event_time (void); void check_crossing_invariants (GtkWidget *widget, GtkCrossingData *crossing); -gdouble _gtk_get_slowdown (void); -void _gtk_set_slowdown (gdouble slowdown_factor); +double _gtk_get_slowdown (void); +void _gtk_set_slowdown (double slowdown_factor); char *gtk_get_portal_request_path (GDBusConnection *connection, char **token); diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c index 7f020026ed..3a1fecf23c 100644 --- a/gtk/gtkprogressbar.c +++ b/gtk/gtkprogressbar.c @@ -101,8 +101,8 @@ struct _GtkProgressBar GtkWidget *trough_widget; GtkWidget *progress_widget; - gdouble fraction; - gdouble pulse_fraction; + double fraction; + double pulse_fraction; double activity_pos; guint activity_blocks; @@ -113,7 +113,7 @@ struct _GtkProgressBar GtkProgressTracker tracker; gint64 pulse1; gint64 pulse2; - gdouble last_iteration; + double last_iteration; guint activity_dir : 1; guint activity_mode : 1; @@ -587,7 +587,7 @@ tick_cb (GtkWidget *widget, { GtkProgressBar *pbar = GTK_PROGRESS_BAR (widget); gint64 frame_time; - gdouble iteration, pulse_iterations, current_iterations, fraction; + double iteration, pulse_iterations, current_iterations, fraction; if (pbar->pulse2 == 0 && pbar->pulse1 == 0) return G_SOURCE_CONTINUE; @@ -714,7 +714,7 @@ gtk_progress_bar_set_activity_mode (GtkProgressBar *pbar, */ void gtk_progress_bar_set_fraction (GtkProgressBar *pbar, - gdouble fraction) + double fraction) { g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar)); @@ -884,7 +884,7 @@ gtk_progress_bar_get_show_text (GtkProgressBar *pbar) */ void gtk_progress_bar_set_pulse_step (GtkProgressBar *pbar, - gdouble fraction) + double fraction) { g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar)); @@ -991,7 +991,7 @@ gtk_progress_bar_get_text (GtkProgressBar *pbar) * * Returns: a fraction from 0.0 to 1.0 */ -gdouble +double gtk_progress_bar_get_fraction (GtkProgressBar *pbar) { g_return_val_if_fail (GTK_IS_PROGRESS_BAR (pbar), 0); @@ -1007,7 +1007,7 @@ gtk_progress_bar_get_fraction (GtkProgressBar *pbar) * * Returns: a fraction from 0.0 to 1.0 */ -gdouble +double gtk_progress_bar_get_pulse_step (GtkProgressBar *pbar) { g_return_val_if_fail (GTK_IS_PROGRESS_BAR (pbar), 0); diff --git a/gtk/gtkprogressbar.h b/gtk/gtkprogressbar.h index dcacd26b8a..75dc092d07 100644 --- a/gtk/gtkprogressbar.h +++ b/gtk/gtkprogressbar.h @@ -53,11 +53,11 @@ void gtk_progress_bar_set_text (GtkProgressBar *pbar, const char *text); GDK_AVAILABLE_IN_ALL void gtk_progress_bar_set_fraction (GtkProgressBar *pbar, - gdouble fraction); + double fraction); GDK_AVAILABLE_IN_ALL void gtk_progress_bar_set_pulse_step (GtkProgressBar *pbar, - gdouble fraction); + double fraction); GDK_AVAILABLE_IN_ALL void gtk_progress_bar_set_inverted (GtkProgressBar *pbar, gboolean inverted); @@ -65,9 +65,9 @@ void gtk_progress_bar_set_inverted (GtkProgressBar *pbar, GDK_AVAILABLE_IN_ALL const char * gtk_progress_bar_get_text (GtkProgressBar *pbar); GDK_AVAILABLE_IN_ALL -gdouble gtk_progress_bar_get_fraction (GtkProgressBar *pbar); +double gtk_progress_bar_get_fraction (GtkProgressBar *pbar); GDK_AVAILABLE_IN_ALL -gdouble gtk_progress_bar_get_pulse_step (GtkProgressBar *pbar); +double gtk_progress_bar_get_pulse_step (GtkProgressBar *pbar); GDK_AVAILABLE_IN_ALL gboolean gtk_progress_bar_get_inverted (GtkProgressBar *pbar); diff --git a/gtk/gtkprogresstracker.c b/gtk/gtkprogresstracker.c index 0ddcbfbe4c..e39c26c7bf 100644 --- a/gtk/gtkprogresstracker.c +++ b/gtk/gtkprogresstracker.c @@ -36,15 +36,15 @@ * the speed of animations. This can be useful for debugging. */ -static gdouble gtk_slowdown = 1.0; +static double gtk_slowdown = 1.0; void -_gtk_set_slowdown (gdouble factor) +_gtk_set_slowdown (double factor) { gtk_slowdown = factor; } -gdouble +double _gtk_get_slowdown (void) { return gtk_slowdown; @@ -77,12 +77,12 @@ void gtk_progress_tracker_start (GtkProgressTracker *tracker, guint64 duration, gint64 delay, - gdouble iteration_count) + double iteration_count) { tracker->is_running = TRUE; tracker->last_frame_time = 0; tracker->duration = duration; - tracker->iteration = - delay / (gdouble) MAX (duration, 1); + tracker->iteration = - delay / (double) MAX (duration, 1); tracker->iteration_count = iteration_count; } @@ -110,7 +110,7 @@ void gtk_progress_tracker_advance_frame (GtkProgressTracker *tracker, guint64 frame_time) { - gdouble delta; + double delta; if (!tracker->is_running) return; @@ -182,7 +182,7 @@ gtk_progress_tracker_get_state (GtkProgressTracker *tracker) * * Returns: The current iteration. **/ -gdouble +double gtk_progress_tracker_get_iteration (GtkProgressTracker *tracker) { return tracker->is_running ? CLAMP (tracker->iteration, 0.0, tracker->iteration_count) : 1.0; @@ -202,7 +202,7 @@ gtk_progress_tracker_get_iteration (GtkProgressTracker *tracker) guint64 gtk_progress_tracker_get_iteration_cycle (GtkProgressTracker *tracker) { - gdouble iteration = gtk_progress_tracker_get_iteration (tracker); + double iteration = gtk_progress_tracker_get_iteration (tracker); /* Some complexity here. We want an iteration of 0.0 to always map to 0 (start * of the first iteration), but an iteration of 1.0 to also map to 0 (end of @@ -225,11 +225,11 @@ gtk_progress_tracker_get_iteration_cycle (GtkProgressTracker *tracker) * * Returns: The progress value. **/ -gdouble +double gtk_progress_tracker_get_progress (GtkProgressTracker *tracker, gboolean reversed) { - gdouble progress, iteration; + double progress, iteration; guint64 iteration_cycle; iteration = gtk_progress_tracker_get_iteration (tracker); @@ -242,10 +242,10 @@ gtk_progress_tracker_get_progress (GtkProgressTracker *tracker, /* From clutter-easing.c, based on Robert Penner's * infamous easing equations, MIT license. */ -static gdouble -ease_out_cubic (gdouble t) +static double +ease_out_cubic (double t) { - gdouble p = t - 1; + double p = t - 1; return p * p * p + 1; } @@ -259,10 +259,10 @@ ease_out_cubic (gdouble t) * * Returns: The eased progress value. **/ -gdouble +double gtk_progress_tracker_get_ease_out_cubic (GtkProgressTracker *tracker, gboolean reversed) { - gdouble progress = gtk_progress_tracker_get_progress (tracker, reversed); + double progress = gtk_progress_tracker_get_progress (tracker, reversed); return ease_out_cubic (progress); } diff --git a/gtk/gtkprogresstrackerprivate.h b/gtk/gtkprogresstrackerprivate.h index 1355dae95b..95adfe5f4d 100644 --- a/gtk/gtkprogresstrackerprivate.h +++ b/gtk/gtkprogresstrackerprivate.h @@ -38,8 +38,8 @@ struct _GtkProgressTracker gboolean is_running; guint64 last_frame_time; guint64 duration; - gdouble iteration; - gdouble iteration_count; + double iteration; + double iteration_count; }; void gtk_progress_tracker_init_copy (GtkProgressTracker *source, @@ -48,7 +48,7 @@ void gtk_progress_tracker_init_copy (GtkProgressTracke void gtk_progress_tracker_start (GtkProgressTracker *tracker, guint64 duration, gint64 delay, - gdouble iteration_count); + double iteration_count); void gtk_progress_tracker_finish (GtkProgressTracker *tracker); @@ -60,14 +60,14 @@ void gtk_progress_tracker_skip_frame (GtkProgressTracke GtkProgressState gtk_progress_tracker_get_state (GtkProgressTracker *tracker); -gdouble gtk_progress_tracker_get_iteration (GtkProgressTracker *tracker); +double gtk_progress_tracker_get_iteration (GtkProgressTracker *tracker); guint64 gtk_progress_tracker_get_iteration_cycle (GtkProgressTracker *tracker); -gdouble gtk_progress_tracker_get_progress (GtkProgressTracker *tracker, +double gtk_progress_tracker_get_progress (GtkProgressTracker *tracker, gboolean reverse); -gdouble gtk_progress_tracker_get_ease_out_cubic (GtkProgressTracker *tracker, +double gtk_progress_tracker_get_ease_out_cubic (GtkProgressTracker *tracker, gboolean reverse); G_END_DECLS diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index e8b87a1e88..cc963ed2bc 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -89,8 +89,8 @@ struct _GtkRangePrivate GtkOrientation orientation; - gdouble fill_level; - gdouble *marks; + double fill_level; + double *marks; int *mark_pos; int n_marks; @@ -165,25 +165,25 @@ static void gtk_range_unmap (GtkWidget *widget); static void gtk_range_click_gesture_pressed (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkRange *range); static void gtk_range_click_gesture_released (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkRange *range); static void gtk_range_drag_gesture_begin (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkRange *range); static void gtk_range_drag_gesture_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkRange *range); static void gtk_range_long_press_gesture_pressed (GtkGestureLongPress *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkRange *range); @@ -201,7 +201,7 @@ static void gtk_range_move_slider (GtkRange *range, /* Internals */ static void gtk_range_compute_slider_position (GtkRange *range, - gdouble adjustment_value, + double adjustment_value, GdkRectangle *slider_rect); static gboolean gtk_range_scroll (GtkRange *range, GtkScrollType scroll); @@ -215,7 +215,7 @@ static void gtk_range_add_step_timer (GtkRange *range, static void gtk_range_remove_step_timer (GtkRange *range); static gboolean gtk_range_real_change_value (GtkRange *range, GtkScrollType scroll, - gdouble value); + double value); static gboolean gtk_range_key_controller_key_pressed (GtkEventControllerKey *controller, guint keyval, guint keycode, @@ -238,8 +238,8 @@ static void gtk_range_render_trough (GtkGizmo *gizmo, GtkSnapshot *snapshot); static gboolean gtk_range_scroll_controller_scroll (GtkEventControllerScroll *scroll, - gdouble dx, - gdouble dy, + double dx, + double dy, GtkRange *range); G_DEFINE_TYPE_WITH_CODE (GtkRange, gtk_range, GTK_TYPE_WIDGET, @@ -989,8 +989,8 @@ gtk_range_get_slider_range (GtkRange *range, **/ void gtk_range_set_increments (GtkRange *range, - gdouble step, - gdouble page) + double step, + double page) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); GtkAdjustment *adjustment; @@ -1020,12 +1020,12 @@ gtk_range_set_increments (GtkRange *range, **/ void gtk_range_set_range (GtkRange *range, - gdouble min, - gdouble max) + double min, + double max) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); GtkAdjustment *adjustment; - gdouble value; + double value; g_return_if_fail (GTK_IS_RANGE (range)); g_return_if_fail (min <= max); @@ -1058,7 +1058,7 @@ gtk_range_set_range (GtkRange *range, **/ void gtk_range_set_value (GtkRange *range, - gdouble value) + double value) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); @@ -1079,7 +1079,7 @@ gtk_range_set_value (GtkRange *range, * * Returns: current value of the range. **/ -gdouble +double gtk_range_get_value (GtkRange *range) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); @@ -1217,7 +1217,7 @@ gtk_range_get_restrict_to_fill_level (GtkRange *range) **/ void gtk_range_set_fill_level (GtkRange *range, - gdouble fill_level) + double fill_level) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); @@ -1244,7 +1244,7 @@ gtk_range_set_fill_level (GtkRange *range, * * Returns: The current fill level **/ -gdouble +double gtk_range_get_fill_level (GtkRange *range) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); @@ -1713,13 +1713,13 @@ range_get_scroll_for_grab (GtkRange *range) return GTK_SCROLL_NONE; } -static gdouble +static double coord_to_value (GtkRange *range, - gdouble coord) + double coord) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); - gdouble frac; - gdouble value; + double frac; + double value; int trough_length; int slider_length; graphene_rect_t slider_bounds; @@ -1823,8 +1823,8 @@ update_initial_slider_position (GtkRange *range, static void gtk_range_long_press_gesture_pressed (GtkGestureLongPress *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkRange *range) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); @@ -1842,8 +1842,8 @@ gtk_range_long_press_gesture_pressed (GtkGestureLongPress *gesture, static void gtk_range_click_gesture_pressed (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkRange *range) { GtkWidget *widget = GTK_WIDGET (range); @@ -1925,7 +1925,7 @@ gtk_range_click_gesture_pressed (GtkGestureClick *gesture, { /* jump by pages */ GtkScrollType scroll; - gdouble click_value; + double click_value; click_value = coord_to_value (range, priv->orientation == GTK_ORIENTATION_VERTICAL ? @@ -1941,7 +1941,7 @@ gtk_range_click_gesture_pressed (GtkGestureClick *gesture, button == GDK_BUTTON_SECONDARY) { /* autoscroll */ - gdouble click_value; + double click_value; click_value = coord_to_value (range, priv->orientation == GTK_ORIENTATION_VERTICAL ? @@ -1964,8 +1964,8 @@ gtk_range_click_gesture_pressed (GtkGestureClick *gesture, static void gtk_range_click_gesture_released (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkRange *range) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); @@ -1982,14 +1982,14 @@ update_slider_position (GtkRange *range, { GtkRangePrivate *priv = gtk_range_get_instance_private (range); graphene_rect_t trough_bounds; - gdouble delta; - gdouble c; - gdouble new_value; + double delta; + double c; + double new_value; gboolean handled; - gdouble next_value; - gdouble mark_value; - gdouble mark_delta; - gdouble zoom; + double next_value; + double mark_value; + double mark_delta; + double zoom; int i; double x, y; @@ -2086,10 +2086,10 @@ autoscroll_cb (GtkWidget *widget, GtkRange *range = GTK_RANGE (data); GtkRangePrivate *priv = gtk_range_get_instance_private (range); GtkAdjustment *adj = priv->adjustment; - gdouble increment; - gdouble value; + double increment; + double value; gboolean handled; - gdouble step, page; + double step, page; step = gtk_adjustment_get_step_increment (adj); page = gtk_adjustment_get_page_increment (adj); @@ -2111,8 +2111,8 @@ autoscroll_cb (GtkWidget *widget, case GTK_SCROLL_START: case GTK_SCROLL_END: { - gdouble x, y; - gdouble distance, t; + double x, y; + double distance, t; /* Vary scrolling speed from slow (ie step) to fast (2 * page), * based on the distance of the pointer from the widget. We start @@ -2173,12 +2173,12 @@ stop_scrolling (GtkRange *range) static gboolean gtk_range_scroll_controller_scroll (GtkEventControllerScroll *scroll, - gdouble dx, - gdouble dy, + double dx, + double dy, GtkRange *range) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); - gdouble scroll_unit, delta; + double scroll_unit, delta; gboolean handled; GtkOrientation move_orientation; @@ -2252,12 +2252,12 @@ update_autoscroll_mode (GtkRange *range, static void gtk_range_drag_gesture_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkRange *range) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); - gdouble start_x, start_y; + double start_x, start_y; if (priv->grab_location == priv->slider_widget) { @@ -2276,8 +2276,8 @@ gtk_range_drag_gesture_update (GtkGestureDrag *gesture, static void gtk_range_drag_gesture_begin (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkRange *range) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); @@ -2332,12 +2332,12 @@ gtk_range_adjustment_value_changed (GtkAdjustment *adjustment, static void apply_marks (GtkRange *range, - gdouble oldval, - gdouble *newval) + double oldval, + double *newval) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); int i; - gdouble mark; + double mark; for (i = 0; i < priv->n_marks; i++) { @@ -2355,7 +2355,7 @@ static void step_back (GtkRange *range) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); - gdouble newval; + double newval; gboolean handled; newval = gtk_adjustment_get_value (priv->adjustment) - gtk_adjustment_get_step_increment (priv->adjustment); @@ -2368,7 +2368,7 @@ static void step_forward (GtkRange *range) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); - gdouble newval; + double newval; gboolean handled; newval = gtk_adjustment_get_value (priv->adjustment) + gtk_adjustment_get_step_increment (priv->adjustment); @@ -2382,7 +2382,7 @@ static void page_back (GtkRange *range) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); - gdouble newval; + double newval; gboolean handled; newval = gtk_adjustment_get_value (priv->adjustment) - gtk_adjustment_get_page_increment (priv->adjustment); @@ -2395,7 +2395,7 @@ static void page_forward (GtkRange *range) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); - gdouble newval; + double newval; gboolean handled; newval = gtk_adjustment_get_value (priv->adjustment) + gtk_adjustment_get_page_increment (priv->adjustment); @@ -2419,7 +2419,7 @@ static void scroll_end (GtkRange *range) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); - gdouble newval; + double newval; gboolean handled; newval = gtk_adjustment_get_upper (priv->adjustment) - gtk_adjustment_get_page_size (priv->adjustment); @@ -2432,7 +2432,7 @@ gtk_range_scroll (GtkRange *range, GtkScrollType scroll) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); - gdouble old_value = gtk_adjustment_get_value (priv->adjustment); + double old_value = gtk_adjustment_get_value (priv->adjustment); switch (scroll) { @@ -2535,7 +2535,7 @@ gtk_range_move_slider (GtkRange *range, static void gtk_range_compute_slider_position (GtkRange *range, - gdouble adjustment_value, + double adjustment_value, GdkRectangle *slider_rect) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); @@ -2653,7 +2653,7 @@ gtk_range_calc_marks (GtkRange *range) static gboolean gtk_range_real_change_value (GtkRange *range, GtkScrollType scroll, - gdouble value) + double value) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); @@ -2669,7 +2669,7 @@ gtk_range_real_change_value (GtkRange *range, if (priv->round_digits >= 0) { - gdouble power; + double power; int i; i = priv->round_digits; @@ -2779,14 +2779,14 @@ _gtk_range_get_has_origin (GtkRange *range) void _gtk_range_set_stop_values (GtkRange *range, - gdouble *values, + double *values, int n_values) { GtkRangePrivate *priv = gtk_range_get_instance_private (range); int i; g_free (priv->marks); - priv->marks = g_new (gdouble, n_values); + priv->marks = g_new (double, n_values); g_free (priv->mark_pos); priv->mark_pos = g_new (int, n_values); diff --git a/gtk/gtkrange.h b/gtk/gtkrange.h index 2a256381b0..8d83a13f46 100644 --- a/gtk/gtkrange.h +++ b/gtk/gtkrange.h @@ -57,7 +57,7 @@ struct _GtkRangeClass void (* value_changed) (GtkRange *range); void (* adjust_bounds) (GtkRange *range, - gdouble new_value); + double new_value); /* action signals for keybindings */ void (* move_slider) (GtkRange *range, @@ -69,7 +69,7 @@ struct _GtkRangeClass gboolean (* change_value) (GtkRange *range, GtkScrollType scroll, - gdouble new_value); + double new_value); /*< private > */ @@ -114,17 +114,17 @@ void gtk_range_get_slider_range (GtkRange *range GDK_AVAILABLE_IN_ALL void gtk_range_set_increments (GtkRange *range, - gdouble step, - gdouble page); + double step, + double page); GDK_AVAILABLE_IN_ALL void gtk_range_set_range (GtkRange *range, - gdouble min, - gdouble max); + double min, + double max); GDK_AVAILABLE_IN_ALL void gtk_range_set_value (GtkRange *range, - gdouble value); + double value); GDK_AVAILABLE_IN_ALL -gdouble gtk_range_get_value (GtkRange *range); +double gtk_range_get_value (GtkRange *range); GDK_AVAILABLE_IN_ALL void gtk_range_set_show_fill_level (GtkRange *range, @@ -138,9 +138,9 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_range_get_restrict_to_fill_level (GtkRange *range); GDK_AVAILABLE_IN_ALL void gtk_range_set_fill_level (GtkRange *range, - gdouble fill_level); + double fill_level); GDK_AVAILABLE_IN_ALL -gdouble gtk_range_get_fill_level (GtkRange *range); +double gtk_range_get_fill_level (GtkRange *range); GDK_AVAILABLE_IN_ALL void gtk_range_set_round_digits (GtkRange *range, int round_digits); diff --git a/gtk/gtkrangeprivate.h b/gtk/gtkrangeprivate.h index d50ed52d7f..f369fec4d0 100644 --- a/gtk/gtkrangeprivate.h +++ b/gtk/gtkrangeprivate.h @@ -36,7 +36,7 @@ void _gtk_range_set_has_origin (GtkRange *range gboolean has_origin); gboolean _gtk_range_get_has_origin (GtkRange *range); void _gtk_range_set_stop_values (GtkRange *range, - gdouble *values, + double *values, int n_values); int _gtk_range_get_stop_positions (GtkRange *range, int **values); diff --git a/gtk/gtkrender.c b/gtk/gtkrender.c index 6ddfa4998a..e095832cc3 100644 --- a/gtk/gtkrender.c +++ b/gtk/gtkrender.c @@ -37,10 +37,10 @@ static void gtk_do_render_icon (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height) + double x, + double y, + double width, + double height) { GtkSnapshot *snapshot; GskRenderNode *node; @@ -81,10 +81,10 @@ gtk_do_render_icon (GtkStyleContext *context, void gtk_render_check (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height) + double x, + double y, + double width, + double height) { g_return_if_fail (GTK_IS_STYLE_CONTEXT (context)); g_return_if_fail (cr != NULL); @@ -115,10 +115,10 @@ gtk_render_check (GtkStyleContext *context, void gtk_render_option (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height) + double x, + double y, + double width, + double height) { g_return_if_fail (GTK_IS_STYLE_CONTEXT (context)); g_return_if_fail (cr != NULL); @@ -147,10 +147,10 @@ gtk_render_option (GtkStyleContext *context, void gtk_render_arrow (GtkStyleContext *context, cairo_t *cr, - gdouble angle, - gdouble x, - gdouble y, - gdouble size) + double angle, + double x, + double y, + double size) { g_return_if_fail (GTK_IS_STYLE_CONTEXT (context)); g_return_if_fail (cr != NULL); @@ -180,10 +180,10 @@ gtk_render_arrow (GtkStyleContext *context, void gtk_render_background (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height) + double x, + double y, + double width, + double height) { GtkSnapshot *snapshot; GskRenderNode *node; @@ -226,10 +226,10 @@ gtk_render_background (GtkStyleContext *context, void gtk_render_frame (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height) + double x, + double y, + double width, + double height) { GtkSnapshot *snapshot; GskRenderNode *node; @@ -273,10 +273,10 @@ gtk_render_frame (GtkStyleContext *context, void gtk_render_expander (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height) + double x, + double y, + double width, + double height) { g_return_if_fail (GTK_IS_STYLE_CONTEXT (context)); g_return_if_fail (cr != NULL); @@ -305,10 +305,10 @@ gtk_render_expander (GtkStyleContext *context, void gtk_render_focus (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height) + double x, + double y, + double width, + double height) { GtkSnapshot *snapshot; GskRenderNode *node; @@ -345,8 +345,8 @@ gtk_render_focus (GtkStyleContext *context, void gtk_render_layout (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, + double x, + double y, PangoLayout *layout) { GtkSnapshot *snapshot; @@ -372,10 +372,10 @@ gtk_render_layout (GtkStyleContext *context, static void gtk_do_render_line (GtkStyleContext *context, cairo_t *cr, - gdouble x0, - gdouble y0, - gdouble x1, - gdouble y1) + double x0, + double y0, + double x1, + double y1) { const GdkRGBA *color; @@ -409,10 +409,10 @@ gtk_do_render_line (GtkStyleContext *context, void gtk_render_line (GtkStyleContext *context, cairo_t *cr, - gdouble x0, - gdouble y0, - gdouble x1, - gdouble y1) + double x0, + double y0, + double x1, + double y1) { g_return_if_fail (GTK_IS_STYLE_CONTEXT (context)); g_return_if_fail (cr != NULL); @@ -440,10 +440,10 @@ gtk_render_line (GtkStyleContext *context, void gtk_render_handle (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height) + double x, + double y, + double width, + double height) { g_return_if_fail (GTK_IS_STYLE_CONTEXT (context)); g_return_if_fail (cr != NULL); @@ -473,10 +473,10 @@ gtk_render_handle (GtkStyleContext *context, void gtk_render_activity (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height) + double x, + double y, + double width, + double height) { g_return_if_fail (GTK_IS_STYLE_CONTEXT (context)); g_return_if_fail (cr != NULL); @@ -506,8 +506,8 @@ void gtk_render_icon (GtkStyleContext *context, cairo_t *cr, GdkTexture *texture, - gdouble x, - gdouble y) + double x, + double y) { GtkSnapshot *snapshot; GskRenderNode *node; diff --git a/gtk/gtkrender.h b/gtk/gtkrender.h index 645e7d6c15..7e4b0b5f15 100644 --- a/gtk/gtkrender.h +++ b/gtk/gtkrender.h @@ -34,94 +34,94 @@ G_BEGIN_DECLS GDK_AVAILABLE_IN_ALL void gtk_render_check (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height); + double x, + double y, + double width, + double height); GDK_AVAILABLE_IN_ALL void gtk_render_option (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height); + double x, + double y, + double width, + double height); GDK_AVAILABLE_IN_ALL void gtk_render_arrow (GtkStyleContext *context, cairo_t *cr, - gdouble angle, - gdouble x, - gdouble y, - gdouble size); + double angle, + double x, + double y, + double size); GDK_AVAILABLE_IN_ALL void gtk_render_background (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height); + double x, + double y, + double width, + double height); GDK_AVAILABLE_IN_ALL void gtk_render_frame (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height); + double x, + double y, + double width, + double height); GDK_AVAILABLE_IN_ALL void gtk_render_expander (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height); + double x, + double y, + double width, + double height); GDK_AVAILABLE_IN_ALL void gtk_render_focus (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height); + double x, + double y, + double width, + double height); GDK_AVAILABLE_IN_ALL void gtk_render_layout (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, + double x, + double y, PangoLayout *layout); GDK_AVAILABLE_IN_ALL void gtk_render_line (GtkStyleContext *context, cairo_t *cr, - gdouble x0, - gdouble y0, - gdouble x1, - gdouble y1); + double x0, + double y0, + double x1, + double y1); GDK_AVAILABLE_IN_ALL void gtk_render_slider (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height, + double x, + double y, + double width, + double height, GtkOrientation orientation); GDK_AVAILABLE_IN_ALL void gtk_render_handle (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height); + double x, + double y, + double width, + double height); GDK_AVAILABLE_IN_ALL void gtk_render_activity (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height); + double x, + double y, + double width, + double height); GDK_AVAILABLE_IN_ALL void gtk_render_icon (GtkStyleContext *context, cairo_t *cr, GdkTexture *texture, - gdouble x, - gdouble y); + double x, + double y); G_END_DECLS #endif /* __GTK_RENDER_H__ */ diff --git a/gtk/gtkrenderborder.c b/gtk/gtkrenderborder.c index 1846ace0f9..41c063d503 100644 --- a/gtk/gtkrenderborder.c +++ b/gtk/gtkrenderborder.c @@ -510,7 +510,7 @@ snapshot_frame_stroke (GtkSnapshot *snapshot, static void color_shade (const GdkRGBA *color, - gdouble factor, + double factor, GdkRGBA *color_return) { GtkHSLA hsla; diff --git a/gtk/gtkrevealer.c b/gtk/gtkrevealer.c index f63bbf1e54..2571d82427 100644 --- a/gtk/gtkrevealer.c +++ b/gtk/gtkrevealer.c @@ -100,9 +100,9 @@ typedef struct { GtkRevealerTransitionType transition_type; guint transition_duration; - gdouble current_pos; - gdouble source_pos; - gdouble target_pos; + double current_pos; + double source_pos; + double target_pos; guint tick_id; GtkProgressTracker tracker; @@ -123,7 +123,7 @@ static void gtk_revealer_measure (GtkWidget *widget, int *natural_baseline); static void gtk_revealer_set_position (GtkRevealer *revealer, - gdouble pos); + double pos); static void gtk_revealer_buildable_iface_init (GtkBuildableIface *iface); @@ -552,7 +552,7 @@ gtk_revealer_size_allocate (GtkWidget *widget, static void gtk_revealer_set_position (GtkRevealer *revealer, - gdouble pos) + double pos) { GtkRevealerPrivate *priv = gtk_revealer_get_instance_private (revealer); gboolean new_visible; @@ -595,7 +595,7 @@ gtk_revealer_animate_cb (GtkWidget *widget, { GtkRevealer *revealer = GTK_REVEALER (widget); GtkRevealerPrivate *priv = gtk_revealer_get_instance_private (revealer); - gdouble ease; + double ease; gtk_progress_tracker_advance_frame (&priv->tracker, gdk_frame_clock_get_frame_time (frame_clock)); @@ -614,7 +614,7 @@ gtk_revealer_animate_cb (GtkWidget *widget, static void gtk_revealer_start_animation (GtkRevealer *revealer, - gdouble target) + double target) { GtkRevealerPrivate *priv = gtk_revealer_get_instance_private (revealer); GtkWidget *widget = GTK_WIDGET (revealer); diff --git a/gtk/gtkroundedbox.c b/gtk/gtkroundedbox.c index d022863557..c068c8587d 100644 --- a/gtk/gtkroundedbox.c +++ b/gtk/gtkroundedbox.c @@ -56,8 +56,8 @@ _gtk_rounded_box_init_rect (GskRoundedRect *box, static void gtk_rounded_box_clamp_border_radius (GskRoundedRect *box) { - gdouble factor = 1.0; - gdouble corners; + double factor = 1.0; + double corners; corners = box->corner[GSK_CORNER_TOP_LEFT].width + box->corner[GSK_CORNER_TOP_RIGHT].width; if (corners != 0) diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index 791cac94ed..5e649eeaa2 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -159,7 +159,7 @@ struct _GtkScalePrivate struct _GtkScaleMark { - gdouble value; + double value; int stop_position; char *markup; GtkWidget *label_widget; @@ -214,7 +214,7 @@ static void gtk_scale_buildable_custom_finished (GtkBuildable *builda const char *tagname, gpointer user_data); static char * gtk_scale_format_value (GtkScale *scale, - gdouble value); + double value); G_DEFINE_TYPE_WITH_CODE (GtkScale, gtk_scale, GTK_TYPE_RANGE, @@ -288,14 +288,14 @@ gtk_scale_notify (GObject *object, GtkScaleMark *mark; GSList *m; int i, n; - gdouble *values; + double *values; priv->marks = g_slist_sort_with_data (priv->marks, compare_marks, GINT_TO_POINTER (gtk_range_get_inverted (GTK_RANGE (scale)))); n = g_slist_length (priv->marks); - values = g_new (gdouble, n); + values = g_new (double, n); for (m = priv->marks, i = 0; m; m = m->next, i++) { mark = m->data; @@ -945,9 +945,9 @@ gtk_scale_new (GtkOrientation orientation, */ GtkWidget * gtk_scale_new_with_range (GtkOrientation orientation, - gdouble min, - gdouble max, - gdouble step) + double min, + double max, + double step) { GtkAdjustment *adj; int digits; @@ -1654,7 +1654,7 @@ gtk_scale_clear_marks (GtkScale *scale) */ void gtk_scale_add_mark (GtkScale *scale, - gdouble value, + double value, GtkPositionType position, const char *markup) { @@ -1662,7 +1662,7 @@ gtk_scale_add_mark (GtkScale *scale, GtkScalePrivate *priv = gtk_scale_get_instance_private (scale); GtkScaleMark *mark; GSList *m; - gdouble *values; + double *values; int n, i; GtkWidget *marks_widget; @@ -1758,7 +1758,7 @@ gtk_scale_add_mark (GtkScale *scale, } n = g_slist_length (priv->marks); - values = g_new (gdouble, n); + values = g_new (double, n); for (m = priv->marks, i = 0; m; m = m->next, i++) { mark = m->data; @@ -1797,7 +1797,7 @@ typedef struct typedef struct { - gdouble value; + double value; GtkPositionType position; GString *markup; char *context; @@ -1835,7 +1835,7 @@ marks_start_element (GtkBuildableParseContext *context, else if (strcmp (element_name, "mark") == 0) { const char *value_str; - gdouble value = 0; + double value = 0; const char *position_str = NULL; GtkPositionType position = GTK_POS_BOTTOM; const char *msg_context = NULL; diff --git a/gtk/gtkscale.h b/gtk/gtkscale.h index 5dd9609bd5..3b650e0271 100644 --- a/gtk/gtkscale.h +++ b/gtk/gtkscale.h @@ -86,9 +86,9 @@ GtkWidget * gtk_scale_new (GtkOrientation orientation, GtkAdjustment *adjustment); GDK_AVAILABLE_IN_ALL GtkWidget * gtk_scale_new_with_range (GtkOrientation orientation, - gdouble min, - gdouble max, - gdouble step); + double min, + double max, + double step); GDK_AVAILABLE_IN_ALL void gtk_scale_set_digits (GtkScale *scale, int digits); @@ -119,7 +119,7 @@ void gtk_scale_get_layout_offsets (GtkScale *scale, GDK_AVAILABLE_IN_ALL void gtk_scale_add_mark (GtkScale *scale, - gdouble value, + double value, GtkPositionType position, const char *markup); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c index 1924f7e957..11ddc585e2 100644 --- a/gtk/gtkscalebutton.c +++ b/gtk/gtkscalebutton.c @@ -159,8 +159,8 @@ static void cb_popup_mapped (GtkWidget *popup, gpointer user_data); static gboolean gtk_scale_button_scroll_controller_scroll (GtkEventControllerScroll *scroll, - gdouble dx, - gdouble dy, + double dx, + double dy, GtkScaleButton *button); G_DEFINE_TYPE_WITH_CODE (GtkScaleButton, gtk_scale_button, GTK_TYPE_WIDGET, @@ -547,9 +547,9 @@ gtk_scale_button_dispose (GObject *object) * Returns: a new #GtkScaleButton */ GtkWidget * -gtk_scale_button_new (gdouble min, - gdouble max, - gdouble step, +gtk_scale_button_new (double min, + double max, + double step, const char **icons) { GtkScaleButton *button; @@ -573,7 +573,7 @@ gtk_scale_button_new (gdouble min, * * Returns: current value of the scale button */ -gdouble +double gtk_scale_button_get_value (GtkScaleButton * button) { GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button); @@ -595,7 +595,7 @@ gtk_scale_button_get_value (GtkScaleButton * button) */ void gtk_scale_button_set_value (GtkScaleButton *button, - gdouble value) + double value) { GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button); @@ -753,13 +753,13 @@ gtk_scale_button_set_orientation_private (GtkScaleButton *button, static gboolean gtk_scale_button_scroll_controller_scroll (GtkEventControllerScroll *scroll, - gdouble dx, - gdouble dy, + double dx, + double dy, GtkScaleButton *button) { GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button); GtkAdjustment *adjustment; - gdouble d; + double d; adjustment = priv->adjustment; @@ -811,7 +811,7 @@ button_click (GtkScaleButton *button, GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button); GtkAdjustment *adjustment = priv->adjustment; gboolean can_continue = TRUE; - gdouble val; + double val; val = gtk_scale_button_get_value (button); @@ -864,7 +864,7 @@ gtk_scale_button_update_icon (GtkScaleButton *button) { GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button); GtkAdjustment *adjustment; - gdouble value; + double value; const char *name; guint num_icons; @@ -889,7 +889,7 @@ gtk_scale_button_update_icon (GtkScaleButton *button) /* The 2-icons special case */ if (num_icons == 2) { - gdouble limit; + double limit; limit = (gtk_adjustment_get_upper (adjustment) - gtk_adjustment_get_lower (adjustment)) / 2 + gtk_adjustment_get_lower (adjustment); if (value < limit) @@ -912,7 +912,7 @@ gtk_scale_button_update_icon (GtkScaleButton *button) } else { - gdouble step; + double step; guint i; step = (gtk_adjustment_get_upper (adjustment) - gtk_adjustment_get_lower (adjustment)) / (num_icons - 2); i = (guint) ((value - gtk_adjustment_get_lower (adjustment)) / step) + 2; @@ -929,8 +929,8 @@ cb_scale_value_changed (GtkRange *range, { GtkScaleButton *button = user_data; GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button); - gdouble value; - gdouble upper, lower; + double value; + double upper, lower; value = gtk_range_get_value (range); upper = gtk_adjustment_get_upper (priv->adjustment); diff --git a/gtk/gtkscalebutton.h b/gtk/gtkscalebutton.h index 7226d92ee5..309e75eb65 100644 --- a/gtk/gtkscalebutton.h +++ b/gtk/gtkscalebutton.h @@ -63,7 +63,7 @@ struct _GtkScaleButtonClass /* signals */ void (* value_changed) (GtkScaleButton *button, - gdouble value); + double value); /*< private >*/ @@ -73,18 +73,18 @@ struct _GtkScaleButtonClass GDK_AVAILABLE_IN_ALL GType gtk_scale_button_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget * gtk_scale_button_new (gdouble min, - gdouble max, - gdouble step, +GtkWidget * gtk_scale_button_new (double min, + double max, + double step, const char **icons); GDK_AVAILABLE_IN_ALL void gtk_scale_button_set_icons (GtkScaleButton *button, const char **icons); GDK_AVAILABLE_IN_ALL -gdouble gtk_scale_button_get_value (GtkScaleButton *button); +double gtk_scale_button_get_value (GtkScaleButton *button); GDK_AVAILABLE_IN_ALL void gtk_scale_button_set_value (GtkScaleButton *button, - gdouble value); + double value); GDK_AVAILABLE_IN_ALL GtkAdjustment * gtk_scale_button_get_adjustment (GtkScaleButton *button); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index acc77cb8fd..91d6c2e91c 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -229,9 +229,9 @@ typedef struct gint64 last_scroll_time; guint conceil_timer; - gdouble current_pos; - gdouble source_pos; - gdouble target_pos; + double current_pos; + double source_pos; + double target_pos; GtkProgressTracker tracker; guint tick_id; guint over_timeout_id; @@ -280,8 +280,8 @@ typedef struct GtkGesture *drag_gesture; GtkGesture *pan_gesture; - gdouble drag_start_x; - gdouble drag_start_y; + double drag_start_x; + double drag_start_y; guint kinetic_scrolling : 1; guint capture_button_press : 1; @@ -289,11 +289,11 @@ typedef struct guint deceleration_id; - gdouble x_velocity; - gdouble y_velocity; + double x_velocity; + double y_velocity; - gdouble unclamped_hadj_value; - gdouble unclamped_vadj_value; + double unclamped_hadj_value; + double unclamped_vadj_value; } GtkScrolledWindowPrivate; typedef struct @@ -386,7 +386,7 @@ static void gtk_scrolled_window_unmap (GtkWidget *wid static void gtk_scrolled_window_realize (GtkWidget *widget); static void _gtk_scrolled_window_set_adjustment_value (GtkScrolledWindow *scrolled_window, GtkAdjustment *adjustment, - gdouble value); + double value); static void gtk_scrolled_window_cancel_deceleration (GtkScrolledWindow *scrolled_window); @@ -402,7 +402,7 @@ static void remove_indicator (GtkScrolledWindow *sw, static gboolean maybe_hide_indicator (gpointer data); static void indicator_start_fade (Indicator *indicator, - gdouble pos); + double pos); static void indicator_set_over (Indicator *indicator, gboolean over); @@ -900,8 +900,8 @@ policy_may_be_visible (GtkPolicyType policy) static void scrolled_window_drag_begin_cb (GtkScrolledWindow *scrolled_window, - gdouble start_x, - gdouble start_y, + double start_x, + double start_y, GtkGesture *gesture) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); @@ -947,14 +947,14 @@ gtk_scrolled_window_invalidate_overshoot (GtkScrolledWindow *scrolled_window) static void scrolled_window_drag_update_cb (GtkScrolledWindow *scrolled_window, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkGesture *gesture) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); GtkAdjustment *hadjustment; GtkAdjustment *vadjustment; - gdouble dx, dy; + double dx, dy; gtk_scrolled_window_invalidate_overshoot (scrolled_window); @@ -999,8 +999,8 @@ scrolled_window_drag_end_cb (GtkScrolledWindow *scrolled_window, static void gtk_scrolled_window_decelerate (GtkScrolledWindow *scrolled_window, - gdouble x_velocity, - gdouble y_velocity) + double x_velocity, + double y_velocity) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); gboolean overshoot; @@ -1024,16 +1024,16 @@ gtk_scrolled_window_decelerate (GtkScrolledWindow *scrolled_window, static void scrolled_window_swipe_cb (GtkScrolledWindow *scrolled_window, - gdouble x_velocity, - gdouble y_velocity) + double x_velocity, + double y_velocity) { gtk_scrolled_window_decelerate (scrolled_window, -x_velocity, -y_velocity); } static void scrolled_window_long_press_cb (GtkScrolledWindow *scrolled_window, - gdouble x, - gdouble y, + double x, + double y, GtkGesture *gesture) { GdkEventSequence *sequence; @@ -1116,8 +1116,8 @@ indicator_set_over (Indicator *indicator, static gboolean coords_close_to_indicator (GtkScrolledWindow *sw, Indicator *indicator, - gdouble x, - gdouble y) + double x, + double y) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (sw); graphene_rect_t indicator_bounds; @@ -1162,8 +1162,8 @@ static gboolean check_update_scrollbar_proximity (GtkScrolledWindow *sw, Indicator *indicator, GtkWidget *target, - gdouble x, - gdouble y) + double x, + double y) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (sw); gboolean indicator_close, on_scrollbar, on_other_scrollbar; @@ -1196,17 +1196,17 @@ check_update_scrollbar_proximity (GtkScrolledWindow *sw, return indicator_close; } -static gdouble +static double get_scroll_unit (GtkScrolledWindow *sw, GtkOrientation orientation) { - gdouble scroll_unit; + double scroll_unit; #ifndef GDK_WINDOWING_QUARTZ GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (sw); GtkScrollbar *scrollbar; GtkAdjustment *adj; - gdouble page_size; + double page_size; if (orientation == GTK_ORIENTATION_HORIZONTAL) scrollbar = GTK_SCROLLBAR (priv->hscrollbar); @@ -1316,8 +1316,8 @@ scroll_controller_scroll_begin (GtkEventControllerScroll *scroll, static gboolean scroll_controller_scroll (GtkEventControllerScroll *scroll, - gdouble delta_x, - gdouble delta_y, + double delta_x, + double delta_y, GtkScrolledWindow *scrolled_window) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); @@ -1331,7 +1331,7 @@ scroll_controller_scroll (GtkEventControllerScroll *scroll, if (shifted) { - gdouble delta; + double delta; delta = delta_x; delta_x = delta_y; @@ -1342,8 +1342,8 @@ scroll_controller_scroll (GtkEventControllerScroll *scroll, may_hscroll (scrolled_window)) { GtkAdjustment *adj; - gdouble new_value; - gdouble scroll_unit; + double new_value; + double scroll_unit; adj = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (priv->hscrollbar)); scroll_unit = get_scroll_unit (scrolled_window, GTK_ORIENTATION_HORIZONTAL); @@ -1357,8 +1357,8 @@ scroll_controller_scroll (GtkEventControllerScroll *scroll, may_vscroll (scrolled_window)) { GtkAdjustment *adj; - gdouble new_value; - gdouble scroll_unit; + double new_value; + double scroll_unit; adj = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (priv->vscrollbar)); scroll_unit = get_scroll_unit (scrolled_window, GTK_ORIENTATION_VERTICAL); @@ -1398,11 +1398,11 @@ scroll_controller_scroll_end (GtkEventControllerScroll *scroll, static void scroll_controller_decelerate (GtkEventControllerScroll *scroll, - gdouble initial_vel_x, - gdouble initial_vel_y, + double initial_vel_x, + double initial_vel_y, GtkScrolledWindow *scrolled_window) { - gdouble unit_x, unit_y; + double unit_x, unit_y; gboolean shifted; GdkModifierType state; @@ -2898,7 +2898,7 @@ gtk_scrolled_window_scroll_child (GtkScrolledWindow *scrolled_window, if (adjustment) { - gdouble value = gtk_adjustment_get_value (adjustment); + double value = gtk_adjustment_get_value (adjustment); switch (scroll) { @@ -3028,7 +3028,7 @@ _gtk_scrolled_window_get_overshoot (GtkScrolledWindow *scrolled_window, { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); GtkAdjustment *vadjustment, *hadjustment; - gdouble lower, upper, x, y; + double lower, upper, x, y; /* Vertical overshoot */ vadjustment = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (priv->vscrollbar)); @@ -3201,10 +3201,10 @@ uninstall_scroll_cursor (GtkScrolledWindow *scrolled_window) static void _gtk_scrolled_window_set_adjustment_value (GtkScrolledWindow *scrolled_window, GtkAdjustment *adjustment, - gdouble value) + double value) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); - gdouble lower, upper, *prev_value; + double lower, upper, *prev_value; GtkPositionType edge_pos; gboolean vertical; @@ -3257,7 +3257,7 @@ scrolled_window_deceleration_cb (GtkWidget *widget, GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); GtkAdjustment *hadjustment, *vadjustment; gint64 current_time; - gdouble position, elapsed; + double position, elapsed; current_time = gdk_frame_clock_get_frame_time (frame_clock); elapsed = (current_time - data->last_deceleration_time) / 1000000.0; @@ -3338,7 +3338,7 @@ gtk_scrolled_window_start_deceleration (GtkScrolledWindow *scrolled_window) if (may_hscroll (scrolled_window)) { - gdouble lower,upper; + double lower,upper; GtkAdjustment *hadjustment; hadjustment = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (priv->hscrollbar)); @@ -3357,7 +3357,7 @@ gtk_scrolled_window_start_deceleration (GtkScrolledWindow *scrolled_window) if (may_vscroll (scrolled_window)) { - gdouble lower,upper; + double lower,upper; GtkAdjustment *vadjustment; vadjustment = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (priv->vscrollbar)); @@ -3456,7 +3456,7 @@ maybe_emit_edge_reached (GtkScrolledWindow *scrolled_window, GtkAdjustment *adjustment) { GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window); - gdouble value, lower, upper, page_size; + double value, lower, upper, page_size; GtkPositionType edge_pos; gboolean vertical; @@ -3591,7 +3591,7 @@ gtk_scrolled_window_unmap (GtkWidget *widget) static void indicator_set_fade (Indicator *indicator, - gdouble pos) + double pos) { gboolean visible, changed; @@ -3623,7 +3623,7 @@ indicator_fade_cb (GtkWidget *widget, gpointer user_data) { Indicator *indicator = user_data; - gdouble t; + double t; gtk_progress_tracker_advance_frame (&indicator->tracker, gdk_frame_clock_get_frame_time (frame_clock)); @@ -3643,7 +3643,7 @@ indicator_fade_cb (GtkWidget *widget, static void indicator_start_fade (Indicator *indicator, - gdouble target) + double target) { if (indicator->target_pos == target) return; diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index 65989011b8..332f46fe2a 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -1804,7 +1804,7 @@ gtk_settings_load_from_key_file (GtkSettings *settings, case G_TYPE_DOUBLE: { - gdouble d_val; + double d_val; g_value_init (&svalue.value, G_TYPE_DOUBLE); d_val = g_key_file_get_double (keyfile, "Settings", key, &error); diff --git a/gtk/gtkshortcutssection.c b/gtk/gtkshortcutssection.c index 462becb974..aa8407611b 100644 --- a/gtk/gtkshortcutssection.c +++ b/gtk/gtkshortcutssection.c @@ -121,7 +121,7 @@ static gboolean gtk_shortcuts_section_change_current_page (GtkShortcutsSection * static void gtk_shortcuts_section_pan_gesture_pan (GtkGesturePan *gesture, GtkPanDirection direction, - gdouble offset, + double offset, GtkShortcutsSection *self); static GtkBuildableIface *parent_buildable_iface; @@ -753,7 +753,7 @@ gtk_shortcuts_section_change_current_page (GtkShortcutsSection *self, static void gtk_shortcuts_section_pan_gesture_pan (GtkGesturePan *gesture, GtkPanDirection direction, - gdouble offset, + double offset, GtkShortcutsSection *self) { if (offset < 50) diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index b9c99ffb83..7de6594167 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -1706,10 +1706,10 @@ gtk_snapshot_append_color (GtkSnapshot *snapshot, void gtk_snapshot_render_background (GtkSnapshot *snapshot, GtkStyleContext *context, - gdouble x, - gdouble y, - gdouble width, - gdouble height) + double x, + double y, + double width, + double height) { GtkCssBoxes boxes; @@ -1738,10 +1738,10 @@ gtk_snapshot_render_background (GtkSnapshot *snapshot, void gtk_snapshot_render_frame (GtkSnapshot *snapshot, GtkStyleContext *context, - gdouble x, - gdouble y, - gdouble width, - gdouble height) + double x, + double y, + double width, + double height) { GtkCssBoxes boxes; @@ -1770,10 +1770,10 @@ gtk_snapshot_render_frame (GtkSnapshot *snapshot, void gtk_snapshot_render_focus (GtkSnapshot *snapshot, GtkStyleContext *context, - gdouble x, - gdouble y, - gdouble width, - gdouble height) + double x, + double y, + double width, + double height) { GtkCssBoxes boxes; @@ -1801,8 +1801,8 @@ gtk_snapshot_render_focus (GtkSnapshot *snapshot, void gtk_snapshot_render_layout (GtkSnapshot *snapshot, GtkStyleContext *context, - gdouble x, - gdouble y, + double x, + double y, PangoLayout *layout) { const bool needs_translate = (x != 0 || y != 0); diff --git a/gtk/gtksnapshot.h b/gtk/gtksnapshot.h index 91c050d048..406a02da58 100644 --- a/gtk/gtksnapshot.h +++ b/gtk/gtksnapshot.h @@ -195,35 +195,35 @@ void gtk_snapshot_append_layout (GtkSnapshot GDK_AVAILABLE_IN_ALL void gtk_snapshot_render_background (GtkSnapshot *snapshot, GtkStyleContext *context, - gdouble x, - gdouble y, - gdouble width, - gdouble height); + double x, + double y, + double width, + double height); GDK_AVAILABLE_IN_ALL void gtk_snapshot_render_frame (GtkSnapshot *snapshot, GtkStyleContext *context, - gdouble x, - gdouble y, - gdouble width, - gdouble height); + double x, + double y, + double width, + double height); GDK_AVAILABLE_IN_ALL void gtk_snapshot_render_focus (GtkSnapshot *snapshot, GtkStyleContext *context, - gdouble x, - gdouble y, - gdouble width, - gdouble height); + double x, + double y, + double width, + double height); GDK_AVAILABLE_IN_ALL void gtk_snapshot_render_layout (GtkSnapshot *snapshot, GtkStyleContext *context, - gdouble x, - gdouble y, + double x, + double y, PangoLayout *layout); GDK_AVAILABLE_IN_ALL /* in gtkstylecontext.c */ void gtk_snapshot_render_insertion_cursor (GtkSnapshot *snapshot, GtkStyleContext *context, - gdouble x, - gdouble y, + double x, + double y, PangoLayout *layout, int index, PangoDirection direction); diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 512fbdd3c8..7e7460490f 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -202,8 +202,8 @@ struct _GtkSpinButton GtkSpinButtonUpdatePolicy update_policy; - gdouble climb_rate; - gdouble timer_step; + double climb_rate; + double timer_step; int width_chars; @@ -223,7 +223,7 @@ struct _GtkSpinButtonClass GtkWidgetClass parent_class; int (*input) (GtkSpinButton *spin_button, - gdouble *new_value); + double *new_value); int (*output) (GtkSpinButton *spin_button); void (*value_changed) (GtkSpinButton *spin_button); @@ -286,18 +286,18 @@ static void gtk_spin_button_unset_adjustment (GtkSpinButton *spin_button); static void gtk_spin_button_set_orientation (GtkSpinButton *spin_button, GtkOrientation orientation); static void gtk_spin_button_snap (GtkSpinButton *spin_button, - gdouble val); + double val); static void gtk_spin_button_insert_text (GtkEditable *editable, const char *new_text, int new_text_length, int *position); static void gtk_spin_button_real_spin (GtkSpinButton *spin_button, - gdouble step); + double step); static void gtk_spin_button_real_change_value (GtkSpinButton *spin, GtkScrollType scroll); static int gtk_spin_button_default_input (GtkSpinButton *spin_button, - gdouble *new_val); + double *new_val); static void gtk_spin_button_default_output (GtkSpinButton *spin_button); static void gtk_spin_button_update_width_chars (GtkSpinButton *spin_button); @@ -766,7 +766,7 @@ swipe_gesture_update (GtkGesture *gesture, GdkEventSequence *sequence, GtkSpinButton *spin_button) { - gdouble vel_y; + double vel_y; gtk_gesture_swipe_get_velocity (GTK_GESTURE_SWIPE (gesture), NULL, &vel_y); gtk_spin_button_real_spin (spin_button, -vel_y / 20); @@ -774,8 +774,8 @@ swipe_gesture_update (GtkGesture *gesture, static gboolean scroll_controller_scroll (GtkEventControllerScroll *Scroll, - gdouble dx, - gdouble dy, + double dx, + double dy, GtkWidget *widget) { GtkSpinButton *spin = GTK_SPIN_BUTTON (widget); @@ -812,7 +812,7 @@ gtk_spin_button_stop_spinning (GtkSpinButton *spin) static void start_spinning (GtkSpinButton *spin, GtkWidget *click_child, - gdouble step) + double step) { spin->click_child = click_child; @@ -1147,7 +1147,7 @@ weed_out_neg_zero (char *str, static char * gtk_spin_button_format_for_value (GtkSpinButton *spin_button, - gdouble value) + double value) { char *buf = g_strdup_printf ("%0.*f", spin_button->digits, value); @@ -1263,7 +1263,7 @@ static void gtk_spin_button_real_change_value (GtkSpinButton *spin, GtkScrollType scroll) { - gdouble old_value; + double old_value; if (!gtk_editable_get_editable (GTK_EDITABLE (spin->entry))) { @@ -1360,10 +1360,10 @@ gtk_spin_button_real_change_value (GtkSpinButton *spin, static void gtk_spin_button_snap (GtkSpinButton *spin_button, - gdouble val) + double val) { - gdouble inc; - gdouble tmp; + double inc; + double tmp; inc = gtk_adjustment_get_step_increment (spin_button->adjustment); if (inc == 0) @@ -1491,10 +1491,10 @@ gtk_spin_button_insert_text (GtkEditable *editable, static void gtk_spin_button_real_spin (GtkSpinButton *spin_button, - gdouble increment) + double increment) { GtkAdjustment *adjustment; - gdouble new_value = 0.0; + double new_value = 0.0; gboolean wrapped = FALSE; adjustment = spin_button->adjustment; @@ -1541,7 +1541,7 @@ gtk_spin_button_real_spin (GtkSpinButton *spin_button, static int gtk_spin_button_default_input (GtkSpinButton *spin_button, - gdouble *new_val) + double *new_val) { char *err = NULL; const char *text = gtk_editable_get_text (GTK_EDITABLE (spin_button->entry)); @@ -1586,7 +1586,7 @@ gtk_spin_button_default_output (GtkSpinButton *spin_button) void gtk_spin_button_configure (GtkSpinButton *spin_button, GtkAdjustment *adjustment, - gdouble climb_rate, + double climb_rate, guint digits) { g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button)); @@ -1647,7 +1647,7 @@ gtk_spin_button_configure (GtkSpinButton *spin_button, */ GtkWidget * gtk_spin_button_new (GtkAdjustment *adjustment, - gdouble climb_rate, + double climb_rate, guint digits) { GtkSpinButton *spin; @@ -1681,9 +1681,9 @@ gtk_spin_button_new (GtkAdjustment *adjustment, * Returns: The new spin button as a #GtkWidget */ GtkWidget * -gtk_spin_button_new_with_range (gdouble min, - gdouble max, - gdouble step) +gtk_spin_button_new_with_range (double min, + double max, + double step) { GtkAdjustment *adjustment; GtkSpinButton *spin; @@ -1801,8 +1801,8 @@ gtk_spin_button_get_digits (GtkSpinButton *spin_button) **/ void gtk_spin_button_set_increments (GtkSpinButton *spin_button, - gdouble step, - gdouble page) + double step, + double page) { g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button)); @@ -1826,8 +1826,8 @@ gtk_spin_button_set_increments (GtkSpinButton *spin_button, **/ void gtk_spin_button_get_increments (GtkSpinButton *spin_button, - gdouble *step, - gdouble *page) + double *step, + double *page) { g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button)); @@ -1850,8 +1850,8 @@ gtk_spin_button_get_increments (GtkSpinButton *spin_button, */ void gtk_spin_button_set_range (GtkSpinButton *spin_button, - gdouble min, - gdouble max) + double min, + double max) { GtkAdjustment *adjustment; @@ -1879,8 +1879,8 @@ gtk_spin_button_set_range (GtkSpinButton *spin_button, */ void gtk_spin_button_get_range (GtkSpinButton *spin_button, - gdouble *min, - gdouble *max) + double *min, + double *max) { g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button)); @@ -1898,7 +1898,7 @@ gtk_spin_button_get_range (GtkSpinButton *spin_button, * * Returns: the value of @spin_button */ -gdouble +double gtk_spin_button_get_value (GtkSpinButton *spin_button) { g_return_val_if_fail (GTK_IS_SPIN_BUTTON (spin_button), 0.0); @@ -1917,7 +1917,7 @@ gtk_spin_button_get_value (GtkSpinButton *spin_button) int gtk_spin_button_get_value_as_int (GtkSpinButton *spin_button) { - gdouble val; + double val; g_return_val_if_fail (GTK_IS_SPIN_BUTTON (spin_button), 0); @@ -1937,7 +1937,7 @@ gtk_spin_button_get_value_as_int (GtkSpinButton *spin_button) */ void gtk_spin_button_set_value (GtkSpinButton *spin_button, - gdouble value) + double value) { g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button)); @@ -2133,10 +2133,10 @@ gtk_spin_button_get_snap_to_ticks (GtkSpinButton *spin_button) void gtk_spin_button_spin (GtkSpinButton *spin_button, GtkSpinType direction, - gdouble increment) + double increment) { GtkAdjustment *adjustment; - gdouble diff; + double diff; g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button)); @@ -2208,7 +2208,7 @@ gtk_spin_button_spin (GtkSpinButton *spin_button, void gtk_spin_button_update (GtkSpinButton *spin_button) { - gdouble val; + double val; int error = 0; int return_val; diff --git a/gtk/gtkspinbutton.h b/gtk/gtkspinbutton.h index 5e9b70caa5..28fa0c1499 100644 --- a/gtk/gtkspinbutton.h +++ b/gtk/gtkspinbutton.h @@ -101,18 +101,18 @@ GType gtk_spin_button_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL void gtk_spin_button_configure (GtkSpinButton *spin_button, GtkAdjustment *adjustment, - gdouble climb_rate, + double climb_rate, guint digits); GDK_AVAILABLE_IN_ALL GtkWidget* gtk_spin_button_new (GtkAdjustment *adjustment, - gdouble climb_rate, + double climb_rate, guint digits); GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_spin_button_new_with_range (gdouble min, - gdouble max, - gdouble step); +GtkWidget* gtk_spin_button_new_with_range (double min, + double max, + double step); GDK_AVAILABLE_IN_ALL void gtk_spin_button_set_adjustment (GtkSpinButton *spin_button, @@ -129,31 +129,31 @@ guint gtk_spin_button_get_digits (GtkSpinButton *spin_button) GDK_AVAILABLE_IN_ALL void gtk_spin_button_set_increments (GtkSpinButton *spin_button, - gdouble step, - gdouble page); + double step, + double page); GDK_AVAILABLE_IN_ALL void gtk_spin_button_get_increments (GtkSpinButton *spin_button, - gdouble *step, - gdouble *page); + double *step, + double *page); GDK_AVAILABLE_IN_ALL void gtk_spin_button_set_range (GtkSpinButton *spin_button, - gdouble min, - gdouble max); + double min, + double max); GDK_AVAILABLE_IN_ALL void gtk_spin_button_get_range (GtkSpinButton *spin_button, - gdouble *min, - gdouble *max); + double *min, + double *max); GDK_AVAILABLE_IN_ALL -gdouble gtk_spin_button_get_value (GtkSpinButton *spin_button); +double gtk_spin_button_get_value (GtkSpinButton *spin_button); GDK_AVAILABLE_IN_ALL int gtk_spin_button_get_value_as_int (GtkSpinButton *spin_button); GDK_AVAILABLE_IN_ALL void gtk_spin_button_set_value (GtkSpinButton *spin_button, - gdouble value); + double value); GDK_AVAILABLE_IN_ALL void gtk_spin_button_set_update_policy (GtkSpinButton *spin_button, @@ -170,7 +170,7 @@ gboolean gtk_spin_button_get_numeric (GtkSpinButton *spin_button) GDK_AVAILABLE_IN_ALL void gtk_spin_button_spin (GtkSpinButton *spin_button, GtkSpinType direction, - gdouble increment); + double increment); GDK_AVAILABLE_IN_ALL void gtk_spin_button_set_wrap (GtkSpinButton *spin_button, diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c index a789be258c..98cdc4093a 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -2013,7 +2013,7 @@ gtk_stack_snapshot_crossfade (GtkWidget *widget, { GtkStack *stack = GTK_STACK (widget); GtkStackPrivate *priv = gtk_stack_get_instance_private (stack); - gdouble progress = gtk_progress_tracker_get_progress (&priv->tracker, FALSE); + double progress = gtk_progress_tracker_get_progress (&priv->tracker, FALSE); gtk_snapshot_push_cross_fade (snapshot, progress); @@ -2411,13 +2411,13 @@ gtk_stack_measure (GtkWidget *widget, { if (orientation == GTK_ORIENTATION_VERTICAL && !priv->vhomogeneous) { - gdouble t = priv->interpolate_size ? gtk_progress_tracker_get_ease_out_cubic (&priv->tracker, FALSE) : 1.0; + double t = priv->interpolate_size ? gtk_progress_tracker_get_ease_out_cubic (&priv->tracker, FALSE) : 1.0; *minimum = LERP (*minimum, priv->last_visible_widget_height, t); *natural = LERP (*natural, priv->last_visible_widget_height, t); } if (orientation == GTK_ORIENTATION_HORIZONTAL && !priv->hhomogeneous) { - gdouble t = priv->interpolate_size ? gtk_progress_tracker_get_ease_out_cubic (&priv->tracker, FALSE) : 1.0; + double t = priv->interpolate_size ? gtk_progress_tracker_get_ease_out_cubic (&priv->tracker, FALSE) : 1.0; *minimum = LERP (*minimum, priv->last_visible_widget_width, t); *natural = LERP (*natural, priv->last_visible_widget_width, t); } diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index b11a5b8028..f32e0d7c6e 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -978,9 +978,9 @@ _gtk_style_context_get_cursor_color (GtkStyleContext *context, static void draw_insertion_cursor (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, - gdouble height, + double x, + double y, + double height, float aspect_ratio, gboolean is_primary, PangoDirection direction, @@ -1043,7 +1043,7 @@ draw_insertion_cursor (GtkStyleContext *context, } static void -get_insertion_cursor_bounds (gdouble height, +get_insertion_cursor_bounds (double height, float aspect_ratio, PangoDirection direction, gboolean draw_arrow, @@ -1084,7 +1084,7 @@ get_insertion_cursor_bounds (gdouble height, static void snapshot_insertion_cursor (GtkSnapshot *snapshot, GtkStyleContext *context, - gdouble height, + double height, float aspect_ratio, gboolean is_primary, PangoDirection direction, @@ -1140,8 +1140,8 @@ snapshot_insertion_cursor (GtkSnapshot *snapshot, void gtk_render_insertion_cursor (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, + double x, + double y, PangoLayout *layout, int index, PangoDirection direction) @@ -1237,8 +1237,8 @@ gtk_render_insertion_cursor (GtkStyleContext *context, void gtk_snapshot_render_insertion_cursor (GtkSnapshot *snapshot, GtkStyleContext *context, - gdouble x, - gdouble y, + double x, + double y, PangoLayout *layout, int index, PangoDirection direction) diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h index 688f6fd1e0..bd4dde7646 100644 --- a/gtk/gtkstylecontext.h +++ b/gtk/gtkstylecontext.h @@ -904,8 +904,8 @@ GDK_AVAILABLE_IN_ALL void gtk_render_insertion_cursor (GtkStyleContext *context, cairo_t *cr, - gdouble x, - gdouble y, + double x, + double y, PangoLayout *layout, int index, PangoDirection direction); diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c index a6e8d88d93..1c3bdd27c3 100644 --- a/gtk/gtkswitch.c +++ b/gtk/gtkswitch.c @@ -196,8 +196,8 @@ gtk_switch_begin_toggle_animation (GtkSwitch *self) static void gtk_switch_click_gesture_pressed (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkSwitch *self) { graphene_rect_t switch_bounds; @@ -216,8 +216,8 @@ gtk_switch_click_gesture_pressed (GtkGestureClick *gesture, static void gtk_switch_click_gesture_released (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkSwitch *self) { GdkEventSequence *sequence; @@ -235,7 +235,7 @@ gtk_switch_click_gesture_released (GtkGestureClick *gesture, static void gtk_switch_pan_gesture_pan (GtkGesturePan *gesture, GtkPanDirection direction, - gdouble offset, + double offset, GtkSwitch *self) { GtkWidget *widget = GTK_WIDGET (self); @@ -261,8 +261,8 @@ gtk_switch_pan_gesture_pan (GtkGesturePan *gesture, static void gtk_switch_pan_gesture_drag_end (GtkGestureDrag *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkSwitch *self) { GdkEventSequence *sequence; diff --git a/gtk/gtktextattributes.h b/gtk/gtktextattributes.h index d087fed77b..e4f98f3568 100644 --- a/gtk/gtktextattributes.h +++ b/gtk/gtktextattributes.h @@ -152,7 +152,7 @@ struct _GtkTextAttributes PangoFontDescription *font; - gdouble font_scale; + double font_scale; int left_margin; int right_margin; diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c index 0b67be7553..9cdf94a75a 100644 --- a/gtk/gtktexthandle.c +++ b/gtk/gtktexthandle.c @@ -334,8 +334,8 @@ gtk_text_handle_class_init (GtkTextHandleClass *klass) static void handle_drag_begin (GtkGestureDrag *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkTextHandle *handle) { GtkWidget *widget; @@ -360,12 +360,12 @@ handle_drag_begin (GtkGestureDrag *gesture, static void handle_drag_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkWidget *widget) { GtkTextHandle *handle = GTK_TEXT_HANDLE (widget); - gdouble start_x, start_y; + double start_x, start_y; int x, y; gtk_gesture_drag_get_start_point (gesture, &start_x, &start_y); @@ -388,8 +388,8 @@ handle_drag_update (GtkGestureDrag *gesture, static void handle_drag_end (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTextHandle *handle) { g_signal_emit (handle, signals[DRAG_FINISHED], 0); diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 645ffe5bef..f9d1ae8a2a 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -291,10 +291,10 @@ struct _GtkTextViewPrivate struct _GtkTextPendingScroll { GtkTextMark *mark; - gdouble within_margin; + double within_margin; gboolean use_align; - gdouble xalign; - gdouble yalign; + double xalign; + double yalign; }; typedef enum @@ -392,16 +392,16 @@ static void gtk_text_view_state_flags_changed (GtkWidget *widget, static void gtk_text_view_click_gesture_pressed (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkTextView *text_view); static void gtk_text_view_drag_gesture_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTextView *text_view); static void gtk_text_view_drag_gesture_end (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTextView *text_view); static gboolean gtk_text_view_key_controller_key_pressed (GtkEventControllerKey *controller, @@ -540,10 +540,10 @@ static void gtk_text_view_do_popup (GtkTextView *text_view, static void cancel_pending_scroll (GtkTextView *text_view); static void gtk_text_view_queue_scroll (GtkTextView *text_view, GtkTextMark *mark, - gdouble within_margin, + double within_margin, gboolean use_align, - gdouble xalign, - gdouble yalign); + double xalign, + double yalign); static gboolean gtk_text_view_flush_scroll (GtkTextView *text_view); static void gtk_text_view_update_adjustments (GtkTextView *text_view); @@ -674,7 +674,7 @@ get_buffer (GtkTextView *text_view) #define LOWER_OFFSET_ANCHOR 0.2 static gboolean -check_scroll (gdouble offset, GtkAdjustment *adjustment) +check_scroll (double offset, GtkAdjustment *adjustment) { if ((offset > UPPER_OFFSET_ANCHOR && gtk_adjustment_get_value (adjustment) + gtk_adjustment_get_page_size (adjustment) < gtk_adjustment_get_upper (adjustment)) || @@ -691,7 +691,7 @@ gtk_text_view_drop_motion_scroll_timeout (gpointer data) GtkTextView *text_view; GtkTextViewPrivate *priv; GtkTextIter newplace; - gdouble pointer_xoffset, pointer_yoffset; + double pointer_xoffset, pointer_yoffset; text_view = GTK_TEXT_VIEW (data); priv = text_view->priv; @@ -703,8 +703,8 @@ gtk_text_view_drop_motion_scroll_timeout (gpointer data) gtk_text_buffer_move_mark (get_buffer (text_view), priv->dnd_mark, &newplace); - pointer_xoffset = (gdouble) priv->dnd_x / text_window_get_width (priv->text_window); - pointer_yoffset = (gdouble) priv->dnd_y / text_window_get_height (priv->text_window); + pointer_xoffset = (double) priv->dnd_x / text_window_get_width (priv->text_window); + pointer_yoffset = (double) priv->dnd_y / text_window_get_height (priv->text_window); if (check_scroll (pointer_xoffset, priv->hadjustment) || check_scroll (pointer_yoffset, priv->vadjustment)) @@ -2392,10 +2392,10 @@ gtk_text_view_get_line_at_y (GtkTextView *text_view, static gboolean _gtk_text_view_scroll_to_iter (GtkTextView *text_view, GtkTextIter *iter, - gdouble within_margin, + double within_margin, gboolean use_align, - gdouble xalign, - gdouble yalign, + double xalign, + double yalign, gboolean with_border) { GtkTextViewPrivate *priv = text_view->priv; @@ -2628,10 +2628,10 @@ _gtk_text_view_scroll_to_iter (GtkTextView *text_view, gboolean gtk_text_view_scroll_to_iter (GtkTextView *text_view, GtkTextIter *iter, - gdouble within_margin, + double within_margin, gboolean use_align, - gdouble xalign, - gdouble yalign) + double xalign, + double yalign) { return _gtk_text_view_scroll_to_iter (text_view, iter, @@ -2665,10 +2665,10 @@ cancel_pending_scroll (GtkTextView *text_view) static void gtk_text_view_queue_scroll (GtkTextView *text_view, GtkTextMark *mark, - gdouble within_margin, + double within_margin, gboolean use_align, - gdouble xalign, - gdouble yalign) + double xalign, + double yalign) { GtkTextIter iter; GtkTextPendingScroll *scroll; @@ -2881,10 +2881,10 @@ flush_update_im_spot_location (GtkTextView *text_view) void gtk_text_view_scroll_to_mark (GtkTextView *text_view, GtkTextMark *mark, - gdouble within_margin, + double within_margin, gboolean use_align, - gdouble xalign, - gdouble yalign) + double xalign, + double yalign) { g_return_if_fail (GTK_IS_TEXT_VIEW (text_view)); g_return_if_fail (GTK_IS_TEXT_MARK (mark)); @@ -5340,7 +5340,7 @@ get_iter_from_gesture (GtkTextView *text_view, GdkEventSequence *sequence; GtkTextViewPrivate *priv; int xcoord, ycoord; - gdouble px, py; + double px, py; priv = text_view->priv; sequence = @@ -5365,8 +5365,8 @@ get_iter_from_gesture (GtkTextView *text_view, static void gtk_text_view_click_gesture_pressed (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkTextView *text_view) { GdkEventSequence *sequence; @@ -6112,7 +6112,7 @@ gtk_text_view_move_cursor (GtkTextView *text_view, if (!cursor_visible (text_view)) { GtkScrollStep scroll_step; - gdouble old_xpos, old_ypos; + double old_xpos, old_ypos; switch (step) { @@ -6359,7 +6359,7 @@ gtk_text_view_move_viewport (GtkTextView *text_view, int count) { GtkAdjustment *adjustment; - gdouble increment; + double increment; switch (step) { @@ -6423,8 +6423,8 @@ gtk_text_view_scroll_pages (GtkTextView *text_view, GtkTextIter old_insert; GtkTextIter new_insert; GtkTextIter anchor; - gdouble newval; - gdouble oldval; + double newval; + double oldval; int y0, y1; priv = text_view->priv; @@ -6515,8 +6515,8 @@ gtk_text_view_scroll_hpages (GtkTextView *text_view, GtkTextMark *insert_mark; GtkTextIter old_insert; GtkTextIter new_insert; - gdouble newval; - gdouble oldval; + double newval; + double oldval; int y, height; priv = text_view->priv; @@ -7187,7 +7187,7 @@ drag_gesture_get_text_surface_coords (GtkGestureDrag *gesture, int *x, int *y) { - gdouble sx, sy, ox, oy; + double sx, sy, ox, oy; if (!gtk_gesture_drag_get_start_point (gesture, &sx, &sy) || !gtk_gesture_drag_get_offset (gesture, &ox, &oy)) @@ -7206,8 +7206,8 @@ drag_gesture_get_text_surface_coords (GtkGestureDrag *gesture, static void gtk_text_view_drag_gesture_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTextView *text_view) { int start_x, start_y, x, y; @@ -7324,8 +7324,8 @@ gtk_text_view_drag_gesture_update (GtkGestureDrag *gesture, static void gtk_text_view_drag_gesture_end (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTextView *text_view) { gboolean is_touchscreen, clicked_in_selection; @@ -7970,9 +7970,9 @@ gtk_text_view_set_hadjustment_values (GtkTextView *text_view) { GtkTextViewPrivate *priv; int screen_width; - gdouble old_value; - gdouble new_value; - gdouble new_upper; + double old_value; + double new_value; + double new_upper; priv = text_view->priv; @@ -7983,7 +7983,7 @@ gtk_text_view_set_hadjustment_values (GtkTextView *text_view) g_object_set (priv->hadjustment, "lower", 0.0, "upper", new_upper, - "page-size", (gdouble)screen_width, + "page-size", (double)screen_width, "step-increment", screen_width * 0.1, "page-increment", screen_width * 0.9, NULL); @@ -8000,9 +8000,9 @@ gtk_text_view_set_vadjustment_values (GtkTextView *text_view) GtkTextIter first_para; int screen_height; int y; - gdouble old_value; - gdouble new_value; - gdouble new_upper; + double old_value; + double new_value; + double new_upper; priv = text_view->priv; @@ -8013,7 +8013,7 @@ gtk_text_view_set_vadjustment_values (GtkTextView *text_view) g_object_set (priv->vadjustment, "lower", 0.0, "upper", new_upper, - "page-size", (gdouble)screen_height, + "page-size", (double)screen_height, "step-increment", screen_height * 0.1, "page-increment", screen_height * 0.9, NULL); diff --git a/gtk/gtktextview.h b/gtk/gtktextview.h index d16f17f2b5..1d929f040b 100644 --- a/gtk/gtktextview.h +++ b/gtk/gtktextview.h @@ -199,17 +199,17 @@ GtkTextBuffer *gtk_text_view_get_buffer (GtkTextView *text_view); GDK_AVAILABLE_IN_ALL gboolean gtk_text_view_scroll_to_iter (GtkTextView *text_view, GtkTextIter *iter, - gdouble within_margin, + double within_margin, gboolean use_align, - gdouble xalign, - gdouble yalign); + double xalign, + double yalign); GDK_AVAILABLE_IN_ALL void gtk_text_view_scroll_to_mark (GtkTextView *text_view, GtkTextMark *mark, - gdouble within_margin, + double within_margin, gboolean use_align, - gdouble xalign, - gdouble yalign); + double xalign, + double yalign); GDK_AVAILABLE_IN_ALL void gtk_text_view_scroll_mark_onscreen (GtkTextView *text_view, GtkTextMark *mark); diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index f7e851c6c7..6eb1472a51 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -136,8 +136,8 @@ static void gtk_tooltip_set_surface (GtkTooltip *tooltip, static void gtk_tooltip_handle_event_internal (GdkEventType event_type, GdkSurface *surface, GtkWidget *target_widget, - gdouble dx, - gdouble dy); + double dx, + double dy); static GQuark quark_current_tooltip; diff --git a/gtk/gtktreedatalist.c b/gtk/gtktreedatalist.c index 078847239b..b5a479ad29 100644 --- a/gtk/gtktreedatalist.c +++ b/gtk/gtktreedatalist.c @@ -162,7 +162,7 @@ _gtk_tree_data_list_node_to_value (GtkTreeDataList *list, 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); + g_value_set_double (value, (double) list->data.v_double); break; case G_TYPE_STRING: g_value_set_string (value, (char *) list->data.v_pointer); diff --git a/gtk/gtktreedatalist.h b/gtk/gtktreedatalist.h index 9207bce14a..676311786f 100644 --- a/gtk/gtktreedatalist.h +++ b/gtk/gtktreedatalist.h @@ -36,7 +36,7 @@ struct _GtkTreeDataList gint64 v_int64; guint64 v_uint64; float v_float; - gdouble v_double; + double v_double; gpointer v_pointer; } data; }; diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 8b20bedd91..8d03b23af7 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -818,8 +818,8 @@ static void gtk_tree_view_search_pressed_cb (GtkGesture *gestu double y, GtkTreeView *tree_view); static gboolean gtk_tree_view_search_scroll_event (GtkWidget *entry, - gdouble dx, - gdouble dy, + double dx, + double dy, GtkTreeView *tree_view); static gboolean gtk_tree_view_search_key_pressed (GtkEventControllerKey *key, guint keyval, @@ -886,45 +886,45 @@ static void grab_focus_and_unset_draw_keyfocus (GtkTreeView *tree_view); /* Gestures */ static void gtk_tree_view_column_click_gesture_pressed (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkTreeView *tree_view); static void gtk_tree_view_click_gesture_pressed (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkTreeView *tree_view); static void gtk_tree_view_click_gesture_released (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkTreeView *tree_view); static void gtk_tree_view_column_drag_gesture_begin (GtkGestureDrag *gesture, - gdouble start_x, - gdouble start_y, + double start_x, + double start_y, GtkTreeView *tree_view); static void gtk_tree_view_column_drag_gesture_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTreeView *tree_view); static void gtk_tree_view_column_drag_gesture_end (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTreeView *tree_view); static void gtk_tree_view_drag_gesture_begin (GtkGestureDrag *gesture, - gdouble start_x, - gdouble start_y, + double start_x, + double start_y, GtkTreeView *tree_view); static void gtk_tree_view_drag_gesture_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTreeView *tree_view); static void gtk_tree_view_drag_gesture_end (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTreeView *tree_view); static void gtk_tree_view_motion_controller_enter (GtkEventControllerMotion *controller, double x, @@ -3012,8 +3012,8 @@ gtk_tree_view_click_gesture_pressed (GtkGestureClick *gesture, static void gtk_tree_view_drag_gesture_begin (GtkGestureDrag *gesture, - gdouble start_x, - gdouble start_y, + double start_x, + double start_y, GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -3053,8 +3053,8 @@ gtk_tree_view_drag_gesture_begin (GtkGestureDrag *gesture, static void gtk_tree_view_column_click_gesture_pressed (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -3086,8 +3086,8 @@ gtk_tree_view_column_click_gesture_pressed (GtkGestureClick *gesture, static void gtk_tree_view_column_drag_gesture_begin (GtkGestureDrag *gesture, - gdouble start_x, - gdouble start_y, + double start_x, + double start_y, GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -3227,8 +3227,8 @@ gtk_tree_view_button_release_column_resize (GtkTreeView *tree_view) static void gtk_tree_view_column_drag_gesture_end (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -3248,8 +3248,8 @@ gtk_tree_view_column_drag_gesture_end (GtkGestureDrag *gesture, static void gtk_tree_view_drag_gesture_end (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTreeView *tree_view) { gtk_tree_view_stop_rubber_band (tree_view); @@ -3258,8 +3258,8 @@ gtk_tree_view_drag_gesture_end (GtkGestureDrag *gesture, static void gtk_tree_view_click_gesture_released (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -3550,8 +3550,8 @@ update_prelight (GtkTreeView *tree_view, static gboolean gtk_tree_view_motion_resize_column (GtkTreeView *tree_view, - gdouble x, - gdouble y) + double x, + double y) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); int new_width; @@ -3577,7 +3577,7 @@ gtk_tree_view_update_current_reorder (GtkTreeView *tree_view) GtkTreeViewColumnReorder *reorder = NULL; GdkEventSequence *sequence; GList *list; - gdouble x; + double x; sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (priv->column_drag_gesture)); @@ -3607,7 +3607,7 @@ gtk_tree_view_vertical_autoscroll (GtkTreeView *tree_view) if (gtk_gesture_is_recognized (priv->drag_gesture)) { GdkEventSequence *sequence; - gdouble py; + double py; sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (priv->drag_gesture)); gtk_gesture_get_point (priv->drag_gesture, sequence, NULL, &py); @@ -3642,7 +3642,7 @@ gtk_tree_view_horizontal_autoscroll (GtkTreeView *tree_view) GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GdkEventSequence *sequence; GdkRectangle visible_rect; - gdouble x; + double x; int offset; sequence = gtk_gesture_single_get_current_sequence @@ -3669,8 +3669,8 @@ gtk_tree_view_horizontal_autoscroll (GtkTreeView *tree_view) static void gtk_tree_view_motion_drag_column (GtkTreeView *tree_view, - gdouble x, - gdouble y) + double x, + double y) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreeViewColumn *column = priv->drag_column; @@ -3849,7 +3849,7 @@ gtk_tree_view_update_rubber_band_selection (GtkTreeView *tree_view) GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkTreeRBTree *start_tree, *end_tree; GtkTreeRBNode *start_node, *end_node; - gdouble start_y, offset_y; + double start_y, offset_y; int bin_y; if (!gtk_gesture_is_active (priv->drag_gesture)) @@ -3986,7 +3986,7 @@ static void gtk_tree_view_update_rubber_band (GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); - gdouble start_x, start_y, offset_x, offset_y, x, y; + double start_x, start_y, offset_x, offset_y, x, y; int bin_x, bin_y; if (!gtk_gesture_is_recognized (priv->drag_gesture)) @@ -4016,7 +4016,7 @@ gtk_tree_view_snapshot_rubber_band (GtkTreeView *tree_view, GtkSnapshot *snapshot) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); - gdouble start_x, start_y, offset_x, offset_y; + double start_x, start_y, offset_x, offset_y; GdkRectangle rect; GtkStyleContext *context; int bin_x, bin_y; @@ -4054,12 +4054,12 @@ gtk_tree_view_snapshot_rubber_band (GtkTreeView *tree_view, static void gtk_tree_view_column_drag_gesture_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); - gdouble start_x, start_y, x, y; + double start_x, start_y, x, y; GdkEventSequence *sequence; sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture)); @@ -4079,8 +4079,8 @@ gtk_tree_view_column_drag_gesture_update (GtkGestureDrag *gesture, static void gtk_tree_view_drag_gesture_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); @@ -5537,7 +5537,7 @@ get_separator_height (GtkTreeView *tree_view) { GtkStyleContext *context; GtkCssStyle *style; - gdouble d; + double d; int min_size; context = gtk_widget_get_style_context (GTK_WIDGET (tree_view)); @@ -6554,7 +6554,7 @@ gtk_tree_view_top_row_to_dy (GtkTreeView *tree_view) new_dy = MAX (0, new_dy); priv->in_top_row_to_dy = TRUE; - gtk_adjustment_set_value (priv->vadjustment, (gdouble)new_dy); + gtk_adjustment_set_value (priv->vadjustment, (double)new_dy); priv->in_top_row_to_dy = FALSE; } @@ -7017,7 +7017,7 @@ gtk_tree_view_maybe_begin_dragging_row (GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); GtkWidget *widget = GTK_WIDGET (tree_view); - gdouble start_x, start_y, offset_x, offset_y; + double start_x, start_y, offset_x, offset_y; TreeViewDragInfo *di; GtkTreePath *path = NULL; int button; @@ -13130,8 +13130,8 @@ gtk_tree_view_get_dest_row_at_pos (GtkTreeView *tree_view, GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); int cell_y; int bin_x, bin_y; - gdouble offset_into_row; - gdouble fourth; + double offset_into_row; + double fourth; GdkRectangle cell; GtkTreeViewColumn *column = NULL; GtkTreePath *tmp_path = NULL; @@ -13720,8 +13720,8 @@ gtk_tree_view_search_pressed_cb (GtkGesture *gesture, static gboolean gtk_tree_view_search_scroll_event (GtkWidget *widget, - gdouble dx, - gdouble dy, + double dx, + double dy, GtkTreeView *tree_view) { GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view); diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index ad81ebb946..b1bc4d8eba 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -91,12 +91,12 @@ static void gtk_tree_view_column_update_button (GtkTreeViewColum /* Button signal handlers */ static void column_button_drag_begin (GtkGestureDrag *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkTreeViewColumn *column); static void column_button_drag_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTreeViewColumn *column); static void gtk_tree_view_column_button_clicked (GtkWidget *widget, @@ -1045,8 +1045,8 @@ gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column) static void column_button_drag_begin (GtkGestureDrag *gesture, - gdouble x, - gdouble y, + double x, + double y, GtkTreeViewColumn *column) { GtkTreeViewColumnPrivate *priv = column->priv; @@ -1065,8 +1065,8 @@ column_button_drag_begin (GtkGestureDrag *gesture, static void column_button_drag_update (GtkGestureDrag *gesture, - gdouble offset_x, - gdouble offset_y, + double offset_x, + double offset_y, GtkTreeViewColumn *column) { GtkTreeViewColumnPrivate *priv = column->priv; diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 890a24f373..6e7097ec1f 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -163,7 +163,7 @@ viewport_set_adjustment_values (GtkViewport *viewport, GtkScrollablePolicy scroll_policy; GtkScrollablePolicy other_scroll_policy; GtkOrientation other_orientation; - gdouble upper, value; + double upper, value; int viewport_size, other_viewport_size; int view_width, view_height; @@ -223,7 +223,7 @@ viewport_set_adjustment_values (GtkViewport *viewport, if (orientation == GTK_ORIENTATION_HORIZONTAL && _gtk_widget_get_direction (GTK_WIDGET (viewport)) == GTK_TEXT_DIR_RTL) { - gdouble dist = gtk_adjustment_get_upper (adjustment) + double dist = gtk_adjustment_get_upper (adjustment) - value - gtk_adjustment_get_page_size (adjustment); value = upper - dist - viewport_size; diff --git a/gtk/gtkvolumebutton.c b/gtk/gtkvolumebutton.c index 431a1d2820..c9145749b9 100644 --- a/gtk/gtkvolumebutton.c +++ b/gtk/gtkvolumebutton.c @@ -85,7 +85,7 @@ static gboolean cb_query_tooltip (GtkWidget *button, GtkTooltip *tooltip, gpointer user_data); static void cb_value_changed (GtkVolumeButton *button, - gdouble value, + double value, gpointer user_data); G_DEFINE_TYPE (GtkVolumeButton, gtk_volume_button, GTK_TYPE_SCALE_BUTTON) @@ -222,7 +222,7 @@ cb_query_tooltip (GtkWidget *button, { GtkScaleButton *scale_button = GTK_SCALE_BUTTON (button); GtkAdjustment *adjustment; - gdouble val; + double val; char *str; adjustment = gtk_scale_button_get_adjustment (scale_button); @@ -257,7 +257,7 @@ cb_query_tooltip (GtkWidget *button, } static void -cb_value_changed (GtkVolumeButton *button, gdouble value, gpointer user_data) +cb_value_changed (GtkVolumeButton *button, double value, gpointer user_data) { gtk_widget_trigger_tooltip_query (GTK_WIDGET (button)); } diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 70158b101b..7a9cb2b478 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -797,8 +797,8 @@ gtk_widget_real_snapshot (GtkWidget *widget, static gboolean gtk_widget_real_contains (GtkWidget *widget, - gdouble x, - gdouble y) + double x, + double y) { GtkCssBoxes boxes; @@ -1887,7 +1887,7 @@ _gtk_widget_emulate_press (GtkWidget *widget, { GtkWidget *next_child, *parent; GdkEvent *press; - gdouble x, y; + double x, y; graphene_point_t p; if (event_widget == widget) @@ -9735,8 +9735,8 @@ gtk_widget_get_allocation (GtkWidget *widget, **/ gboolean gtk_widget_contains (GtkWidget *widget, - gdouble x, - gdouble y) + double x, + double y) { g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); @@ -9767,8 +9767,8 @@ gtk_widget_can_be_picked (GtkWidget *widget, static GtkWidget * gtk_widget_do_pick (GtkWidget *widget, - gdouble x, - gdouble y, + double x, + double y, GtkPickFlags flags) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); @@ -9874,8 +9874,8 @@ gtk_widget_do_pick (GtkWidget *widget, **/ GtkWidget * gtk_widget_pick (GtkWidget *widget, - gdouble x, - gdouble y, + double x, + double y, GtkPickFlags flags) { g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); @@ -10101,7 +10101,7 @@ gtk_widget_get_allocated_baseline (GtkWidget *widget) **/ void gtk_widget_set_opacity (GtkWidget *widget, - gdouble opacity) + double opacity) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); guint8 alpha; @@ -10131,7 +10131,7 @@ gtk_widget_set_opacity (GtkWidget *widget, * * Returns: the requested opacity for this widget. **/ -gdouble +double gtk_widget_get_opacity (GtkWidget *widget) { GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget); diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index ead4b6b429..771e584ab4 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -275,8 +275,8 @@ struct _GtkWidgetClass GtkSnapshot *snapshot); gboolean (* contains) (GtkWidget *widget, - gdouble x, - gdouble y); + double x, + double y); /*< private >*/ @@ -644,12 +644,12 @@ gboolean gtk_widget_translate_coordinates (GtkWidget *src_widget, GDK_AVAILABLE_IN_ALL gboolean gtk_widget_contains (GtkWidget *widget, - gdouble x, - gdouble y); + double x, + double y); GDK_AVAILABLE_IN_ALL GtkWidget * gtk_widget_pick (GtkWidget *widget, - gdouble x, - gdouble y, + double x, + double y, GtkPickFlags flags); GDK_AVAILABLE_IN_ALL diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 41f06bbcc0..274b6d7ab9 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1322,8 +1322,8 @@ get_edge_for_coordinates (GtkWindow *window, static void click_gesture_pressed_cb (GtkGestureClick *gesture, int n_press, - gdouble x, - gdouble y, + double x, + double y, GtkWindow *window) { GtkWindowPrivate *priv = gtk_window_get_instance_private (window); @@ -6903,8 +6903,8 @@ gtk_window_update_pointer_focus (GtkWindow *window, GdkDevice *device, GdkEventSequence *sequence, GtkWidget *target, - gdouble x, - gdouble y) + double x, + double y) { GtkWindowPrivate *priv = gtk_window_get_instance_private (window); GtkPointerFocus *focus; diff --git a/gtk/gtkwindowprivate.h b/gtk/gtkwindowprivate.h index 4cb31c3eed..a9546272ec 100644 --- a/gtk/gtkwindowprivate.h +++ b/gtk/gtkwindowprivate.h @@ -104,8 +104,8 @@ void gtk_window_update_pointer_focus (GtkWindow *window, GdkDevice *device, GdkEventSequence *sequence, GtkWidget *target, - gdouble x, - gdouble y); + double x, + double y); void gtk_window_set_pointer_focus_grab (GtkWindow *window, GdkDevice *device, GdkEventSequence *sequence, diff --git a/gtk/inspector/visual.c b/gtk/inspector/visual.c index b0f54280fb..008b3e1ac7 100644 --- a/gtk/inspector/visual.c +++ b/gtk/inspector/visual.c @@ -204,7 +204,7 @@ get_font_scale (GtkInspectorVisual *vis) static void update_font_scale (GtkInspectorVisual *vis, - gdouble factor, + double factor, gboolean update_adjustment, gboolean update_entry) { @@ -228,7 +228,7 @@ static void font_scale_adjustment_changed (GtkAdjustment *adjustment, GtkInspectorVisual *vis) { - gdouble factor; + double factor; factor = gtk_adjustment_get_value (adjustment); update_font_scale (vis, factor, FALSE, TRUE); @@ -238,7 +238,7 @@ static void font_scale_entry_activated (GtkEntry *entry, GtkInspectorVisual *vis) { - gdouble factor; + double factor; char *err = NULL; factor = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err); @@ -772,7 +772,7 @@ init_cursor_size (GtkInspectorVisual *vis) if (size == 0) size = 32; - gtk_adjustment_set_value (vis->scale_adjustment, (gdouble)size); + gtk_adjustment_set_value (vis->scale_adjustment, (double)size); g_signal_connect (vis->cursor_size_adjustment, "value-changed", G_CALLBACK (cursor_size_changed), vis); } @@ -816,7 +816,7 @@ init_scale (GtkInspectorVisual *vis) #if defined (GDK_WINDOWING_X11) if (GDK_IS_X11_DISPLAY (vis->display)) { - gdouble scale; + double scale; scale = gdk_monitor_get_scale_factor (gdk_x11_display_get_primary_monitor (vis->display)); gtk_adjustment_set_value (vis->scale_adjustment, scale); @@ -845,7 +845,7 @@ init_animation (GtkInspectorVisual *vis) static void update_slowdown (GtkInspectorVisual *vis, - gdouble slowdown, + double slowdown, gboolean update_adjustment, gboolean update_entry) { @@ -868,8 +868,8 @@ static void slowdown_adjustment_changed (GtkAdjustment *adjustment, GtkInspectorVisual *vis) { - gdouble value = gtk_adjustment_get_value (adjustment); - gdouble previous = CLAMP (log2 (_gtk_get_slowdown ()), + double value = gtk_adjustment_get_value (adjustment); + double previous = CLAMP (log2 (_gtk_get_slowdown ()), gtk_adjustment_get_lower (adjustment), gtk_adjustment_get_upper (adjustment)); @@ -881,7 +881,7 @@ static void slowdown_entry_activated (GtkEntry *entry, GtkInspectorVisual *vis) { - gdouble slowdown; + double slowdown; char *err = NULL; slowdown = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err); diff --git a/gtk/tools/gdkpixbufutils.c b/gtk/tools/gdkpixbufutils.c index 4912f7962f..d1a627c37b 100644 --- a/gtk/tools/gdkpixbufutils.c +++ b/gtk/tools/gdkpixbufutils.c @@ -76,7 +76,7 @@ size_prepared_cb (GdkPixbufLoader *loader, int height, gpointer data) { - gdouble *scale = data; + double *scale = data; width = MAX (*scale * width, 1); height = MAX (*scale * height, 1); @@ -91,7 +91,7 @@ size_prepared_cb (GdkPixbufLoader *loader, GdkPixbuf * _gdk_pixbuf_new_from_stream_scaled (GInputStream *stream, const char *format, - gdouble scale, + double scale, GCancellable *cancellable, GError **error) { diff --git a/modules/printbackends/gtkprintbackendcloudprint.c b/modules/printbackends/gtkprintbackendcloudprint.c index a78bbe6d73..f99bcca2be 100644 --- a/modules/printbackends/gtkprintbackendcloudprint.c +++ b/modules/printbackends/gtkprintbackendcloudprint.c @@ -94,8 +94,8 @@ static void gtk_print_backend_cloudprint_print_stream (GtkPri GDestroyNotify dnotify); static cairo_surface_t * cloudprint_printer_create_cairo_surface (GtkPrinter *printer, GtkPrintSettings *settings, - gdouble width, - gdouble height, + double width, + double height, GIOChannel *cache_io); static void cloudprint_printer_request_details (GtkPrinter *printer); TGOAAccount * t_goa_account_copy (TGOAAccount *account); @@ -235,8 +235,8 @@ _cairo_write (void *closure, static cairo_surface_t * cloudprint_printer_create_cairo_surface (GtkPrinter *printer, GtkPrintSettings *settings, - gdouble width, - gdouble height, + double width, + double height, GIOChannel *cache_io) { cairo_surface_t *surface; @@ -942,7 +942,7 @@ cloudprint_printer_prepare_for_print (GtkPrinter *printer, GtkPrintSettings *settings, GtkPageSetup *page_setup) { - gdouble scale; + double scale; gtk_print_job_set_pages (print_job, gtk_print_settings_get_print_pages (settings)); gtk_print_job_set_page_ranges (print_job, NULL, 0); diff --git a/modules/printbackends/gtkprintbackendcups.c b/modules/printbackends/gtkprintbackendcups.c index 940b57f393..6453e824d9 100644 --- a/modules/printbackends/gtkprintbackendcups.c +++ b/modules/printbackends/gtkprintbackendcups.c @@ -185,16 +185,16 @@ static void cups_printer_request_details (GtkPrinter static gboolean cups_request_default_printer (GtkPrintBackendCups *print_backend); static gboolean cups_request_ppd (GtkPrinter *printer); static gboolean cups_printer_get_hard_margins (GtkPrinter *printer, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right); + double *top, + double *bottom, + double *left, + double *right); static gboolean cups_printer_get_hard_margins_for_paper_size (GtkPrinter *printer, GtkPaperSize *paper_size, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right); + double *top, + double *bottom, + double *left, + double *right); static GtkPrintCapabilities cups_printer_get_capabilities (GtkPrinter *printer); static void set_option_from_settings (GtkPrinterOption *option, GtkPrintSettings *setting); @@ -210,8 +210,8 @@ static void gtk_print_backend_cups_print_stream (GtkPrintBack GDestroyNotify dnotify); static cairo_surface_t * cups_printer_create_cairo_surface (GtkPrinter *printer, GtkPrintSettings *settings, - gdouble width, - gdouble height, + double width, + double height, GIOChannel *cache_io); static void gtk_print_backend_cups_set_password (GtkPrintBackend *backend, @@ -381,8 +381,8 @@ _cairo_write_to_cups (void *closure, static cairo_surface_t * cups_printer_create_cairo_surface (GtkPrinter *printer, GtkPrintSettings *settings, - gdouble width, - gdouble height, + double width, + double height, GIOChannel *cache_io) { cairo_surface_t *surface; @@ -6763,10 +6763,10 @@ cups_printer_get_default_page_size (GtkPrinter *printer) static gboolean cups_printer_get_hard_margins (GtkPrinter *printer, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right) + double *top, + double *bottom, + double *left, + double *right) { GtkPrinterCups *cups_printer = GTK_PRINTER_CUPS (printer); ppd_file_t *ppd_file; @@ -6796,10 +6796,10 @@ cups_printer_get_hard_margins (GtkPrinter *printer, static gboolean cups_printer_get_hard_margins_for_paper_size (GtkPrinter *printer, GtkPaperSize *paper_size, - gdouble *top, - gdouble *bottom, - gdouble *left, - gdouble *right) + double *top, + double *bottom, + double *left, + double *right) { ppd_file_t *ppd_file; ppd_size_t *size; diff --git a/modules/printbackends/gtkprintbackendfile.c b/modules/printbackends/gtkprintbackendfile.c index 4e0691702e..cb93537884 100644 --- a/modules/printbackends/gtkprintbackendfile.c +++ b/modules/printbackends/gtkprintbackendfile.c @@ -93,8 +93,8 @@ static void gtk_print_backend_file_print_stream (GtkPrintBack GDestroyNotify dnotify); static cairo_surface_t * file_printer_create_cairo_surface (GtkPrinter *printer, GtkPrintSettings *settings, - gdouble width, - gdouble height, + double width, + double height, GIOChannel *cache_io); static GList * file_printer_list_papers (GtkPrinter *printer); @@ -318,8 +318,8 @@ _cairo_write (void *closure, static cairo_surface_t * file_printer_create_cairo_surface (GtkPrinter *printer, GtkPrintSettings *settings, - gdouble width, - gdouble height, + double width, + double height, GIOChannel *cache_io) { cairo_surface_t *surface; @@ -770,7 +770,7 @@ file_printer_prepare_for_print (GtkPrinter *printer, GtkPrintSettings *settings, GtkPageSetup *page_setup) { - gdouble scale; + double scale; GtkPrintPages pages; GtkPageRange *ranges; int n_ranges; diff --git a/modules/printbackends/gtkprintbackendlpr.c b/modules/printbackends/gtkprintbackendlpr.c index 1e8e0e3550..8fba9b71fd 100644 --- a/modules/printbackends/gtkprintbackendlpr.c +++ b/modules/printbackends/gtkprintbackendlpr.c @@ -69,8 +69,8 @@ static void lpr_printer_prepare_for_print (GtkPrinter GtkPageSetup *page_setup); static cairo_surface_t * lpr_printer_create_cairo_surface (GtkPrinter *printer, GtkPrintSettings *settings, - gdouble width, - gdouble height, + double width, + double height, GIOChannel *cache_io); static void gtk_print_backend_lpr_print_stream (GtkPrintBackend *print_backend, GtkPrintJob *job, @@ -184,8 +184,8 @@ _cairo_write (void *closure, static cairo_surface_t * lpr_printer_create_cairo_surface (GtkPrinter *printer, GtkPrintSettings *settings, - gdouble width, - gdouble height, + double width, + double height, GIOChannel *cache_io) { cairo_surface_t *surface; diff --git a/tests/motion-compression.c b/tests/motion-compression.c index 33be6b617e..b0b1a8edbb 100644 --- a/tests/motion-compression.c +++ b/tests/motion-compression.c @@ -6,8 +6,8 @@ int cursor_x, cursor_y; static void motion_cb (GtkEventControllerMotion *motion, - gdouble x, - gdouble y, + double x, + double y, GtkWidget *widget) { float processing_ms = gtk_adjustment_get_value (adjustment); diff --git a/tests/rendernode-create-tests.c b/tests/rendernode-create-tests.c index 97418a60cf..2bd7a3876b 100644 --- a/tests/rendernode-create-tests.c +++ b/tests/rendernode-create-tests.c @@ -5,12 +5,12 @@ static void hsv_to_rgb (GdkRGBA *rgba, - gdouble h, - gdouble s, - gdouble v) + double h, + double s, + double v) { - gdouble hue, saturation, value; - gdouble f, p, q, t; + double hue, saturation, value; + double f, p, q, t; rgba->alpha = 1.0; diff --git a/tests/scrolling-performance.c b/tests/scrolling-performance.c index 3d5b165623..f386c911b7 100644 --- a/tests/scrolling-performance.c +++ b/tests/scrolling-performance.c @@ -51,11 +51,11 @@ create_widget_factory_content (void) static void set_adjustment_to_fraction (GtkAdjustment *adjustment, - gdouble fraction) + double fraction) { - gdouble upper = gtk_adjustment_get_upper (adjustment); - gdouble lower = gtk_adjustment_get_lower (adjustment); - gdouble page_size = gtk_adjustment_get_page_size (adjustment); + double upper = gtk_adjustment_get_upper (adjustment); + double lower = gtk_adjustment_get_lower (adjustment); + double page_size = gtk_adjustment_get_page_size (adjustment); gtk_adjustment_set_value (adjustment, (1 - fraction) * lower + @@ -69,7 +69,7 @@ scroll_viewport (GtkWidget *viewport, { static gint64 start_time; gint64 now = gdk_frame_clock_get_frame_time (frame_clock); - gdouble elapsed; + double elapsed; GtkAdjustment *hadjustment, *vadjustment; if (start_time == 0) diff --git a/tests/testassistant.c b/tests/testassistant.c index 0d0d88259a..e85396cda1 100644 --- a/tests/testassistant.c +++ b/tests/testassistant.c @@ -109,7 +109,7 @@ progress_timeout (GtkWidget *assistant) { GtkWidget *progress; int current_page; - gdouble value; + double value; current_page = gtk_assistant_get_current_page (GTK_ASSISTANT (assistant)); progress = gtk_assistant_get_nth_page (GTK_ASSISTANT (assistant), current_page); diff --git a/tests/testframe.c b/tests/testframe.c index 5a47758242..d2345b7dd5 100644 --- a/tests/testframe.c +++ b/tests/testframe.c @@ -23,8 +23,8 @@ #define EPSILON 1e-10 -static gdouble -double_normalize (gdouble n) +static double +double_normalize (double n) { if (fabs (1.0 - n) < EPSILON) n = 1.0; @@ -37,7 +37,7 @@ double_normalize (gdouble n) static void spin_xalign_cb (GtkSpinButton *spin, GtkFrame *frame) { - gdouble xalign; + double xalign; xalign = double_normalize (gtk_spin_button_get_value (spin)); gtk_frame_set_label_align (frame, xalign); diff --git a/tests/testgrid.c b/tests/testgrid.c index bb9a4ce829..e2af187dc5 100644 --- a/tests/testgrid.c +++ b/tests/testgrid.c @@ -34,8 +34,8 @@ static GtkOrientation o; static void toggle_orientation (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkGrid *grid) { o = 1 - o; diff --git a/tests/testgtk.c b/tests/testgtk.c index 310f59ab71..028985e63b 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -2020,7 +2020,7 @@ entry_progress_timeout (gpointer data) } else { - gdouble fraction; + double fraction; fraction = gtk_entry_get_progress_fraction (GTK_ENTRY (data)); @@ -2463,8 +2463,8 @@ spin_button_time_output_func (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; static char buf[6]; - gdouble hours; - gdouble minutes; + double hours; + double minutes; adjustment = gtk_spin_button_get_adjustment (spin_button); hours = gtk_adjustment_get_value (adjustment) / 60.0; @@ -2477,7 +2477,7 @@ spin_button_time_output_func (GtkSpinButton *spin_button) static int spin_button_month_input_func (GtkSpinButton *spin_button, - gdouble *new_val) + double *new_val) { int i; static const char *month[12] = { "January", "February", "March", "April", @@ -2502,7 +2502,7 @@ spin_button_month_input_func (GtkSpinButton *spin_button, *new_val = 0.0; return GTK_INPUT_ERROR; } - *new_val = (gdouble) i; + *new_val = (double) i; return TRUE; } @@ -2510,7 +2510,7 @@ static int spin_button_month_output_func (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; - gdouble value; + double value; int i; static const char *month[12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", @@ -2529,11 +2529,11 @@ spin_button_month_output_func (GtkSpinButton *spin_button) static int spin_button_hex_input_func (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); @@ -2549,7 +2549,7 @@ spin_button_hex_output_func (GtkSpinButton *spin_button) { GtkAdjustment *adjustment; static char buf[7]; - gdouble val; + double val; adjustment = gtk_spin_button_get_adjustment (spin_button); val = gtk_adjustment_get_value (adjustment); @@ -3516,7 +3516,7 @@ create_display_screen (GtkWidget *widget) static char * reformat_value (GtkScale *scale, - gdouble value) + double value) { return g_strdup_printf ("-->%0.*g<--", gtk_scale_get_digits (scale), value); @@ -5115,7 +5115,7 @@ static gboolean progress_timeout (gpointer data) { ProgressData *pdata = data; - gdouble new_val; + double new_val; char *text; if (pdata->activity) diff --git a/tests/testiconview.c b/tests/testiconview.c index b0f8808cf5..e3494db792 100644 --- a/tests/testiconview.c +++ b/tests/testiconview.c @@ -358,8 +358,8 @@ do_popup_menu (GtkWidget *icon_list, static void press_handler (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkWidget *widget) { GtkTreePath *path = NULL; diff --git a/tests/testlevelbar.c b/tests/testlevelbar.c index 242aa727dd..2886d66f7c 100644 --- a/tests/testlevelbar.c +++ b/tests/testlevelbar.c @@ -44,7 +44,7 @@ static gboolean increase_level (gpointer data) { GtkLevelBar *bar = data; - gdouble value; + double value; value = gtk_level_bar_get_value (bar); value += 0.1; diff --git a/tests/testscale.c b/tests/testscale.c index 277a837e4b..2c73d30f1b 100644 --- a/tests/testscale.c +++ b/tests/testscale.c @@ -64,8 +64,8 @@ trough (GtkToggleButton *button) } } -gdouble marks[3] = { 0.0, 50.0, 100.0 }; -gdouble extra_marks[2] = { 20.0, 40.0 }; +double marks[3] = { 0.0, 50.0, 100.0 }; +double extra_marks[2] = { 20.0, 40.0 }; static void extra (GtkToggleButton *button) @@ -114,7 +114,7 @@ int main (int argc, char *argv[]) "Right" }; - gdouble bath_marks[4] = { 0.0, 33.3, 66.6, 100.0 }; + double bath_marks[4] = { 0.0, 33.3, 66.6, 100.0 }; const char *bath_labels[4] = { "Cold", "Baby bath", @@ -122,7 +122,7 @@ int main (int argc, char *argv[]) "Hot" }; - gdouble pos_marks[4] = { 0.0, 33.3, 66.6, 100.0 }; + double pos_marks[4] = { 0.0, 33.3, 66.6, 100.0 }; const char *pos_labels[4] = { "Left", "Right", "Top", "Bottom" }; gboolean done = FALSE; diff --git a/tests/testscrolledwindow.c b/tests/testscrolledwindow.c index 6642ef3b44..631b2059aa 100644 --- a/tests/testscrolledwindow.c +++ b/tests/testscrolledwindow.c @@ -24,7 +24,7 @@ content_width_changed (GtkSpinButton *spin_button, gpointer data) { GtkScrolledWindow *swindow = data; - gdouble value; + double value; value = gtk_spin_button_get_value (spin_button); gtk_scrolled_window_set_min_content_width (swindow, (int)value); @@ -35,7 +35,7 @@ content_height_changed (GtkSpinButton *spin_button, gpointer data) { GtkScrolledWindow *swindow = data; - gdouble value; + double value; value = gtk_spin_button_get_value (spin_button); gtk_scrolled_window_set_min_content_height (swindow, (int)value); diff --git a/tests/testtreemodel.c b/tests/testtreemodel.c index 913bfce662..b4d0b8b8b4 100644 --- a/tests/testtreemodel.c +++ b/tests/testtreemodel.c @@ -211,7 +211,7 @@ test_run (const char *title, { int i, k, d, items; GTimer *timer; - gdouble elapsed; + double elapsed; int memused; #ifdef HAVE_MALLINFO int uordblks_before = 0; diff --git a/tests/testtreepos.c b/tests/testtreepos.c index 2980c027b5..81951c38e6 100644 --- a/tests/testtreepos.c +++ b/tests/testtreepos.c @@ -55,8 +55,8 @@ clicked_icon (GtkTreeView *tv, static void release_event (GtkGestureClick *gesture, guint n_press, - gdouble x, - gdouble y, + double x, + double y, GtkTreeView *tv) { GtkTreePath *path; diff --git a/tests/testvolumebutton.c b/tests/testvolumebutton.c index 7fb886dcf4..0291d3d7b4 100644 --- a/tests/testvolumebutton.c +++ b/tests/testvolumebutton.c @@ -19,7 +19,7 @@ static void value_changed (GtkWidget *button, - gdouble volume, + double volume, gpointer user_data) { g_message ("volume changed to %f", volume); diff --git a/tests/testwidgetfocus.c b/tests/testwidgetfocus.c index 0d583fe30a..e28d4aa794 100644 --- a/tests/testwidgetfocus.c +++ b/tests/testwidgetfocus.c @@ -202,8 +202,8 @@ gtk_focus_widget_snapshot (GtkWidget *widget, GtkSnapshot *snapshot) static void motion_cb (GtkEventControllerMotion *controller, - gdouble x, - gdouble y, + double x, + double y, GtkWidget *widget) { GtkFocusWidget *self = GTK_FOCUS_WIDGET (widget); diff --git a/tests/video-timer.c b/tests/video-timer.c index cc59a9525a..ed070e111f 100644 --- a/tests/video-timer.c +++ b/tests/video-timer.c @@ -4,7 +4,7 @@ #include "variable.h" typedef struct { - gdouble angle; + double angle; gint64 stream_time; gint64 clock_time; gint64 frame_counter; diff --git a/testsuite/a11y/accessibility-dump.c b/testsuite/a11y/accessibility-dump.c index d1189dc41e..748cbcf106 100644 --- a/testsuite/a11y/accessibility-dump.c +++ b/testsuite/a11y/accessibility-dump.c @@ -435,7 +435,7 @@ dump_atk_value (AtkValue *atk_value, GString *string) { AtkRange *range; - gdouble value; + double value; char *text; value = 0.0; diff --git a/testsuite/a11y/tree-performance.c b/testsuite/a11y/tree-performance.c index c25e491bf4..d04bbb7adc 100644 --- a/testsuite/a11y/tree-performance.c +++ b/testsuite/a11y/tree-performance.c @@ -147,7 +147,7 @@ static void test_performance_list (void) { GtkBuilder *builder; - gdouble elapsed; + double elapsed; GtkWidget *window; GError *error = NULL; @@ -172,7 +172,7 @@ static void test_a11y_performance_list (void) { GtkBuilder *builder; - gdouble elapsed; + double elapsed; GtkWidget *window; GError *error = NULL; int count_before; @@ -294,7 +294,7 @@ static void test_performance_tree (void) { GtkBuilder *builder; - gdouble elapsed; + double elapsed; GtkWidget *window; GError *error = NULL; @@ -319,7 +319,7 @@ static void test_a11y_performance_tree (void) { GtkBuilder *builder; - gdouble elapsed; + double elapsed; GtkWidget *window; GError *error = NULL; int count_before; diff --git a/testsuite/a11y/value.c b/testsuite/a11y/value.c index 376eada8ea..f43acf933d 100644 --- a/testsuite/a11y/value.c +++ b/testsuite/a11y/value.c @@ -61,8 +61,8 @@ test_basic (GtkWidget *widget) NotifyData notify_data; AtkObject *atk_object; AtkValue *atk_value; - gdouble value = 50; - gdouble ret; + double value = 50; + double ret; char *text; atk_object = gtk_widget_get_accessible (widget); diff --git a/testsuite/gtk/builder.c b/testsuite/gtk/builder.c index 63c0b5d67f..8d8f9e3d01 100644 --- a/testsuite/gtk/builder.c +++ b/testsuite/gtk/builder.c @@ -736,7 +736,7 @@ test_spin_button (void) ""; GObject *obj; GtkAdjustment *adjustment; - gdouble value; + double value; builder = builder_new_from_string (buffer, -1, NULL); obj = gtk_builder_get_object (builder, "spinbutton1"); diff --git a/testsuite/gtk/gestures.c b/testsuite/gtk/gestures.c index 07dc374858..595c79ea8a 100644 --- a/testsuite/gtk/gestures.c +++ b/testsuite/gtk/gestures.c @@ -81,8 +81,8 @@ point_press (PointState *point, static void point_update (PointState *point, GtkWidget *widget, - gdouble x, - gdouble y) + double x, + double y) { GdkDisplay *display; GdkDevice *device; @@ -247,7 +247,7 @@ typedef struct { } GestureData; static void -press_cb (GtkGesture *g, int n_press, gdouble x, gdouble y, gpointer data) +press_cb (GtkGesture *g, int n_press, double x, double y, gpointer data) { GtkEventController *c = GTK_EVENT_CONTROLLER (g); GdkEventSequence *sequence; diff --git a/testsuite/gtk/notify.c b/testsuite/gtk/notify.c index a707fbc984..dda0f22d2b 100644 --- a/testsuite/gtk/notify.c +++ b/testsuite/gtk/notify.c @@ -272,10 +272,10 @@ check_property (GObject *instance, GParamSpec *pspec) guint i; NotifyData data; gulong id; - gdouble value; - gdouble new_value; + double value; + double new_value; int current_count; - gdouble delta; + double delta; data.name = pspec->name; data.count = 0;