PARSER phase #10
283
gtk.h
Normal file
283
gtk.h
Normal file
@@ -0,0 +1,283 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_H__
|
||||
#define __GTK_H__
|
||||
|
||||
#define __GTK_H_INSIDE__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gtk/gtkaboutdialog.h>
|
||||
#include <gtk/gtkaccelgroup.h>
|
||||
#include <gtk/gtkaccellabel.h>
|
||||
#include <gtk/gtkaccelmap.h>
|
||||
#include <gtk/gtkaccessible.h>
|
||||
#include <gtk/gtkactionable.h>
|
||||
#include <gtk/gtkactionbar.h>
|
||||
#include <gtk/gtkadjustment.h>
|
||||
#include <gtk/gtkappchooser.h>
|
||||
#include <gtk/gtkappchooserdialog.h>
|
||||
#include <gtk/gtkappchooserwidget.h>
|
||||
#include <gtk/gtkappchooserbutton.h>
|
||||
#include <gtk/gtkapplication.h>
|
||||
#include <gtk/gtkapplicationwindow.h>
|
||||
#include <gtk/gtkaspectframe.h>
|
||||
#include <gtk/gtkassistant.h>
|
||||
#include <gtk/gtkbbox.h>
|
||||
#include <gtk/gtkbin.h>
|
||||
#include <gtk/gtkbindings.h>
|
||||
#include <gtk/gtkborder.h>
|
||||
#include <gtk/gtkbox.h>
|
||||
#include <gtk/gtkbuildable.h>
|
||||
#include <gtk/gtkbuilder.h>
|
||||
#include <gtk/gtkbutton.h>
|
||||
#include <gtk/gtkcalendar.h>
|
||||
#include <gtk/gtkcellarea.h>
|
||||
#include <gtk/gtkcellareabox.h>
|
||||
#include <gtk/gtkcellareacontext.h>
|
||||
#include <gtk/gtkcelleditable.h>
|
||||
#include <gtk/gtkcelllayout.h>
|
||||
#include <gtk/gtkcellrenderer.h>
|
||||
#include <gtk/gtkcellrendereraccel.h>
|
||||
#include <gtk/gtkcellrenderercombo.h>
|
||||
#include <gtk/gtkcellrendererpixbuf.h>
|
||||
#include <gtk/gtkcellrendererprogress.h>
|
||||
#include <gtk/gtkcellrendererspin.h>
|
||||
#include <gtk/gtkcellrendererspinner.h>
|
||||
#include <gtk/gtkcellrenderertext.h>
|
||||
#include <gtk/gtkcellrenderertoggle.h>
|
||||
#include <gtk/gtkcellview.h>
|
||||
#include <gtk/gtkcheckbutton.h>
|
||||
#include <gtk/gtkcheckmenuitem.h>
|
||||
#include <gtk/gtkclipboard.h>
|
||||
#include <gtk/gtkcolorbutton.h>
|
||||
#include <gtk/gtkcolorchooser.h>
|
||||
#include <gtk/gtkcolorchooserdialog.h>
|
||||
#include <gtk/gtkcolorchooserwidget.h>
|
||||
#include <gtk/gtkcolorutils.h>
|
||||
#include <gtk/gtkcombobox.h>
|
||||
#include <gtk/gtkcomboboxtext.h>
|
||||
#include <gtk/gtkcontainer.h>
|
||||
#include <gtk/gtkcssprovider.h>
|
||||
#include <gtk/gtkcsssection.h>
|
||||
#include <gtk/gtkdebug.h>
|
||||
#include <gtk/gtkdialog.h>
|
||||
#include <gtk/gtkdnd.h>
|
||||
#include <gtk/gtkdrawingarea.h>
|
||||
#include <gtk/gtkeditable.h>
|
||||
#include <gtk/gtkentry.h>
|
||||
#include <gtk/gtkentrybuffer.h>
|
||||
#include <gtk/gtkentrycompletion.h>
|
||||
#include <gtk/gtkenums.h>
|
||||
#include <gtk/gtkeventbox.h>
|
||||
#include <gtk/gtkeventcontroller.h>
|
||||
#include <gtk/gtkexpander.h>
|
||||
#include <gtk/gtkfixed.h>
|
||||
#include <gtk/gtkfilechooser.h>
|
||||
#include <gtk/gtkfilechooserbutton.h>
|
||||
#include <gtk/gtkfilechooserdialog.h>
|
||||
#include <gtk/gtkfilechooserwidget.h>
|
||||
#include <gtk/gtkfilefilter.h>
|
||||
#include <gtk/gtkflowbox.h>
|
||||
#include <gtk/gtkfontbutton.h>
|
||||
#include <gtk/gtkfontchooser.h>
|
||||
#include <gtk/gtkfontchooserdialog.h>
|
||||
#include <gtk/gtkfontchooserwidget.h>
|
||||
#include <gtk/gtkframe.h>
|
||||
#include <gtk/gtkgesture.h>
|
||||
#include <gtk/gtkgesturedrag.h>
|
||||
#include <gtk/gtkgesturelongpress.h>
|
||||
#include <gtk/gtkgesturemultipress.h>
|
||||
#include <gtk/gtkgesturepan.h>
|
||||
#include <gtk/gtkgesturerotate.h>
|
||||
#include <gtk/gtkgesturesingle.h>
|
||||
#include <gtk/gtkgestureswipe.h>
|
||||
#include <gtk/gtkgesturezoom.h>
|
||||
#include <gtk/gtkglarea.h>
|
||||
#include <gtk/gtkgrid.h>
|
||||
#include <gtk/gtkheaderbar.h>
|
||||
#include <gtk/gtkicontheme.h>
|
||||
#include <gtk/gtkiconview.h>
|
||||
#include <gtk/gtkimage.h>
|
||||
#include <gtk/gtkimcontext.h>
|
||||
#include <gtk/gtkimcontextinfo.h>
|
||||
#include <gtk/gtkimcontextsimple.h>
|
||||
#include <gtk/gtkimmulticontext.h>
|
||||
#include <gtk/gtkinfobar.h>
|
||||
#include <gtk/gtkinvisible.h>
|
||||
#include <gtk/gtklabel.h>
|
||||
#include <gtk/gtklayout.h>
|
||||
#include <gtk/gtklevelbar.h>
|
||||
#include <gtk/gtklinkbutton.h>
|
||||
#include <gtk/gtklistbox.h>
|
||||
#include <gtk/gtkliststore.h>
|
||||
#include <gtk/gtklockbutton.h>
|
||||
#include <gtk/gtkmain.h>
|
||||
#include <gtk/gtkmenu.h>
|
||||
#include <gtk/gtkmenubar.h>
|
||||
#include <gtk/gtkmenubutton.h>
|
||||
#include <gtk/gtkmenuitem.h>
|
||||
#include <gtk/gtkmenushell.h>
|
||||
#include <gtk/gtkmenutoolbutton.h>
|
||||
#include <gtk/gtkmessagedialog.h>
|
||||
#include <gtk/gtkmodelbutton.h>
|
||||
#include <gtk/gtkmodules.h>
|
||||
#include <gtk/gtkmountoperation.h>
|
||||
#include <gtk/gtknotebook.h>
|
||||
#include <gtk/gtkoffscreenwindow.h>
|
||||
#include <gtk/gtkorientable.h>
|
||||
#include <gtk/gtkoverlay.h>
|
||||
#include <gtk/gtkpagesetup.h>
|
||||
#include <gtk/gtkpapersize.h>
|
||||
#include <gtk/gtkpaned.h>
|
||||
#include <gtk/gtkplacessidebar.h>
|
||||
#include <gtk/gtkpopover.h>
|
||||
#include <gtk/gtkpopovermenu.h>
|
||||
#include <gtk/gtkprintcontext.h>
|
||||
#include <gtk/gtkprintoperation.h>
|
||||
#include <gtk/gtkprintoperationpreview.h>
|
||||
#include <gtk/gtkprintsettings.h>
|
||||
#include <gtk/gtkprogressbar.h>
|
||||
#include <gtk/gtkradiobutton.h>
|
||||
#include <gtk/gtkradiomenuitem.h>
|
||||
#include <gtk/gtkradiotoolbutton.h>
|
||||
#include <gtk/gtkrange.h>
|
||||
#include <gtk/gtkrecentchooser.h>
|
||||
#include <gtk/gtkrecentchooserdialog.h>
|
||||
#include <gtk/gtkrecentchoosermenu.h>
|
||||
#include <gtk/gtkrecentchooserwidget.h>
|
||||
#include <gtk/gtkrecentfilter.h>
|
||||
#include <gtk/gtkrecentmanager.h>
|
||||
#include <gtk/gtkrender.h>
|
||||
#include <gtk/gtkrevealer.h>
|
||||
#include <gtk/gtkscale.h>
|
||||
#include <gtk/gtkscalebutton.h>
|
||||
#include <gtk/gtkscrollable.h>
|
||||
#include <gtk/gtkscrollbar.h>
|
||||
#include <gtk/gtkscrolledwindow.h>
|
||||
#include <gtk/gtksearchbar.h>
|
||||
#include <gtk/gtksearchentry.h>
|
||||
#include <gtk/gtkselection.h>
|
||||
#include <gtk/gtkseparator.h>
|
||||
#include <gtk/gtkseparatormenuitem.h>
|
||||
#include <gtk/gtkseparatortoolitem.h>
|
||||
#include <gtk/gtksettings.h>
|
||||
#include <gtk/gtkshow.h>
|
||||
#include <gtk/gtkstacksidebar.h>
|
||||
#include <gtk/gtksizegroup.h>
|
||||
#include <gtk/gtksizerequest.h>
|
||||
#include <gtk/gtkspinbutton.h>
|
||||
#include <gtk/gtkspinner.h>
|
||||
#include <gtk/gtkstack.h>
|
||||
#include <gtk/gtkstackswitcher.h>
|
||||
#include <gtk/gtkstatusbar.h>
|
||||
#include <gtk/gtkstylecontext.h>
|
||||
#include <gtk/gtkstyleprovider.h>
|
||||
#include <gtk/gtkswitch.h>
|
||||
#include <gtk/gtktextattributes.h>
|
||||
#include <gtk/gtktextbuffer.h>
|
||||
#include <gtk/gtktextbufferrichtext.h>
|
||||
#include <gtk/gtktextchild.h>
|
||||
#include <gtk/gtktextiter.h>
|
||||
#include <gtk/gtktextmark.h>
|
||||
#include <gtk/gtktexttag.h>
|
||||
#include <gtk/gtktexttagtable.h>
|
||||
#include <gtk/gtktextview.h>
|
||||
#include <gtk/gtktogglebutton.h>
|
||||
#include <gtk/gtktoggletoolbutton.h>
|
||||
#include <gtk/gtktoolbar.h>
|
||||
#include <gtk/gtktoolbutton.h>
|
||||
#include <gtk/gtktoolitem.h>
|
||||
#include <gtk/gtktoolitemgroup.h>
|
||||
#include <gtk/gtktoolpalette.h>
|
||||
#include <gtk/gtktoolshell.h>
|
||||
#include <gtk/gtktooltip.h>
|
||||
#include <gtk/gtktestutils.h>
|
||||
#include <gtk/gtktreednd.h>
|
||||
#include <gtk/gtktreemodel.h>
|
||||
#include <gtk/gtktreemodelfilter.h>
|
||||
#include <gtk/gtktreemodelsort.h>
|
||||
#include <gtk/gtktreeselection.h>
|
||||
#include <gtk/gtktreesortable.h>
|
||||
#include <gtk/gtktreestore.h>
|
||||
#include <gtk/gtktreeview.h>
|
||||
#include <gtk/gtktreeviewcolumn.h>
|
||||
#include <gtk/gtktypebuiltins.h>
|
||||
#include <gtk/gtktypes.h>
|
||||
#include <gtk/gtkversion.h>
|
||||
#include <gtk/gtkviewport.h>
|
||||
#include <gtk/gtkvolumebutton.h>
|
||||
#include <gtk/gtkwidget.h>
|
||||
#include <gtk/gtkwidgetpath.h>
|
||||
#include <gtk/gtkwindow.h>
|
||||
#include <gtk/gtkwindowgroup.h>
|
||||
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
#include <gtk/deprecated/gtkarrow.h>
|
||||
#include <gtk/deprecated/gtkactivatable.h>
|
||||
#include <gtk/deprecated/gtkaction.h>
|
||||
#include <gtk/deprecated/gtkactiongroup.h>
|
||||
#include <gtk/deprecated/gtkalignment.h>
|
||||
#include <gtk/deprecated/gtkcolorsel.h>
|
||||
#include <gtk/deprecated/gtkcolorseldialog.h>
|
||||
#include <gtk/deprecated/gtkfontsel.h>
|
||||
#include <gtk/deprecated/gtkgradient.h>
|
||||
#include <gtk/deprecated/gtkhandlebox.h>
|
||||
#include <gtk/deprecated/gtkhbbox.h>
|
||||
#include <gtk/deprecated/gtkhbox.h>
|
||||
#include <gtk/deprecated/gtkhpaned.h>
|
||||
#include <gtk/deprecated/gtkhsv.h>
|
||||
#include <gtk/deprecated/gtkhscale.h>
|
||||
#include <gtk/deprecated/gtkhscrollbar.h>
|
||||
#include <gtk/deprecated/gtkhseparator.h>
|
||||
#include <gtk/deprecated/gtkiconfactory.h>
|
||||
#include <gtk/deprecated/gtkimagemenuitem.h>
|
||||
#include <gtk/deprecated/gtkmisc.h>
|
||||
#include <gtk/deprecated/gtknumerableicon.h>
|
||||
#include <gtk/deprecated/gtkradioaction.h>
|
||||
#include <gtk/deprecated/gtkrc.h>
|
||||
#include <gtk/deprecated/gtkrecentaction.h>
|
||||
#include <gtk/deprecated/gtkstatusicon.h>
|
||||
#include <gtk/deprecated/gtkstock.h>
|
||||
#include <gtk/deprecated/gtkstyle.h>
|
||||
#include <gtk/deprecated/gtkstyleproperties.h>
|
||||
#include <gtk/deprecated/gtksymboliccolor.h>
|
||||
#include <gtk/deprecated/gtktable.h>
|
||||
#include <gtk/deprecated/gtktearoffmenuitem.h>
|
||||
#include <gtk/deprecated/gtkthemingengine.h>
|
||||
#include <gtk/deprecated/gtktoggleaction.h>
|
||||
#include <gtk/deprecated/gtkuimanager.h>
|
||||
#include <gtk/deprecated/gtkvbbox.h>
|
||||
#include <gtk/deprecated/gtkvbox.h>
|
||||
#include <gtk/deprecated/gtkvpaned.h>
|
||||
#include <gtk/deprecated/gtkvscale.h>
|
||||
#include <gtk/deprecated/gtkvscrollbar.h>
|
||||
#include <gtk/deprecated/gtkvseparator.h>
|
||||
#endif /* GTK_DISABLE_DEPRECATED */
|
||||
|
||||
#include <gtk/gtk-autocleanups.h>
|
||||
|
||||
#undef __GTK_H_INSIDE__
|
||||
|
||||
#endif /* __GTK_H__ */
|
||||
275
gtk.inc
Normal file
275
gtk.inc
Normal file
@@ -0,0 +1,275 @@
|
||||
; GTK - The GIMP Toolkit
|
||||
; Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
;
|
||||
; This library is free software; you can redistribute it and/or
|
||||
; modify it under the terms of the GNU Lesser General Public
|
||||
; License as published by the Free Software Foundation; either
|
||||
; version 2 of the License, or (at your option) any later version.
|
||||
;
|
||||
; This library is distributed in the hope that it will be useful,
|
||||
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
; MERCHANTABILITY or FITNESS A PARTICULAR PURPOSE. See the GNU
|
||||
; Lesser General Public License for more details.
|
||||
;
|
||||
; You should have received a copy of the GNU Lesser General Public
|
||||
; License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;
|
||||
; Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
; file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
; files for a list of changes. These files are distributed with
|
||||
; GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
|
||||
%ifndef __GTK_H__
|
||||
%define __GTK_H__
|
||||
%define __GTK_H_INSIDE__
|
||||
%include "gdk/gdk.inc"
|
||||
%include "gtk/gtkaboutdialog.inc"
|
||||
%include "gtk/gtkaccelgroup.inc"
|
||||
%include "gtk/gtkaccellabel.inc"
|
||||
%include "gtk/gtkaccelmap.inc"
|
||||
%include "gtk/gtkaccessible.inc"
|
||||
%include "gtk/gtkactionable.inc"
|
||||
%include "gtk/gtkactionbar.inc"
|
||||
%include "gtk/gtkadjustment.inc"
|
||||
%include "gtk/gtkappchooser.inc"
|
||||
%include "gtk/gtkappchooserdialog.inc"
|
||||
%include "gtk/gtkappchooserwidget.inc"
|
||||
%include "gtk/gtkappchooserbutton.inc"
|
||||
%include "gtk/gtkapplication.inc"
|
||||
%include "gtk/gtkapplicationwindow.inc"
|
||||
%include "gtk/gtkaspectframe.inc"
|
||||
%include "gtk/gtkassistant.inc"
|
||||
%include "gtk/gtkbbox.inc"
|
||||
%include "gtk/gtkbin.inc"
|
||||
%include "gtk/gtkbindings.inc"
|
||||
%include "gtk/gtkborder.inc"
|
||||
%include "gtk/gtkbox.inc"
|
||||
%include "gtk/gtkbuildable.inc"
|
||||
%include "gtk/gtkbuilder.inc"
|
||||
%include "gtk/gtkbutton.inc"
|
||||
%include "gtk/gtkcalendar.inc"
|
||||
%include "gtk/gtkcellarea.inc"
|
||||
%include "gtk/gtkcellareabox.inc"
|
||||
%include "gtk/gtkcellareacontext.inc"
|
||||
%include "gtk/gtkcelleditable.inc"
|
||||
%include "gtk/gtkcelllayout.inc"
|
||||
%include "gtk/gtkcellrenderer.inc"
|
||||
%include "gtk/gtkcellrendereraccel.inc"
|
||||
%include "gtk/gtkcellrenderercombo.inc"
|
||||
%include "gtk/gtkcellrendererpixbuf.inc"
|
||||
%include "gtk/gtkcellrendererprogress.inc"
|
||||
%include "gtk/gtkcellrendererspin.inc"
|
||||
%include "gtk/gtkcellrendererspinner.inc"
|
||||
%include "gtk/gtkcellrenderertext.inc"
|
||||
%include "gtk/gtkcellrenderertoggle.inc"
|
||||
%include "gtk/gtkcellview.inc"
|
||||
%include "gtk/gtkcheckbutton.inc"
|
||||
%include "gtk/gtkcheckmenuitem.inc"
|
||||
%include "gtk/gtkclipboard.inc"
|
||||
%include "gtk/gtkcolorbutton.inc"
|
||||
%include "gtk/gtkcolorchooser.inc"
|
||||
%include "gtk/gtkcolorchooserdialog.inc"
|
||||
%include "gtk/gtkcolorchooserwidget.inc"
|
||||
%include "gtk/gtkcolorutils.inc"
|
||||
%include "gtk/gtkcombobox.inc"
|
||||
%include "gtk/gtkcomboboxtext.inc"
|
||||
%include "gtk/gtkcontainer.inc"
|
||||
%include "gtk/gtkcssprovider.inc"
|
||||
%include "gtk/gtkcsssection.inc"
|
||||
%include "gtk/gtkdebug.inc"
|
||||
%include "gtk/gtkdialog.inc"
|
||||
%include "gtk/gtkdnd.inc"
|
||||
%include "gtk/gtkdrawingarea.inc"
|
||||
%include "gtk/gtkeditable.inc"
|
||||
%include "gtk/gtkentry.inc"
|
||||
%include "gtk/gtkentrybuffer.inc"
|
||||
%include "gtk/gtkentrycompletion.inc"
|
||||
%include "gtk/gtkenums.inc"
|
||||
%include "gtk/gtkeventbox.inc"
|
||||
%include "gtk/gtkeventcontroller.inc"
|
||||
%include "gtk/gtkexpander.inc"
|
||||
%include "gtk/gtkfixed.inc"
|
||||
%include "gtk/gtkfilechooser.inc"
|
||||
%include "gtk/gtkfilechooserbutton.inc"
|
||||
%include "gtk/gtkfilechooserdialog.inc"
|
||||
%include "gtk/gtkfilechooserwidget.inc"
|
||||
%include "gtk/gtkfilefilter.inc"
|
||||
%include "gtk/gtkflowbox.inc"
|
||||
%include "gtk/gtkfontbutton.inc"
|
||||
%include "gtk/gtkfontchooser.inc"
|
||||
%include "gtk/gtkfontchooserdialog.inc"
|
||||
%include "gtk/gtkfontchooserwidget.inc"
|
||||
%include "gtk/gtkframe.inc"
|
||||
%include "gtk/gtkgesture.inc"
|
||||
%include "gtk/gtkgesturedrag.inc"
|
||||
%include "gtk/gtkgesturelongpress.inc"
|
||||
%include "gtk/gtkgesturemultipress.inc"
|
||||
%include "gtk/gtkgesturepan.inc"
|
||||
%include "gtk/gtkgesturerotate.inc"
|
||||
%include "gtk/gtkgesturesingle.inc"
|
||||
%include "gtk/gtkgestureswipe.inc"
|
||||
%include "gtk/gtkgesturezoom.inc"
|
||||
%include "gtk/gtkglarea.inc"
|
||||
%include "gtk/gtkgrid.inc"
|
||||
%include "gtk/gtkheaderbar.inc"
|
||||
%include "gtk/gtkicontheme.inc"
|
||||
%include "gtk/gtkiconview.inc"
|
||||
%include "gtk/gtkimage.inc"
|
||||
%include "gtk/gtkimcontext.inc"
|
||||
%include "gtk/gtkimcontextinfo.inc"
|
||||
%include "gtk/gtkimcontextsimple.inc"
|
||||
%include "gtk/gtkimmulticontext.inc"
|
||||
%include "gtk/gtkinfobar.inc"
|
||||
%include "gtk/gtkinvisible.inc"
|
||||
%include "gtk/gtklabel.inc"
|
||||
%include "gtk/gtklayout.inc"
|
||||
%include "gtk/gtklevelbar.inc"
|
||||
%include "gtk/gtklinkbutton.inc"
|
||||
%include "gtk/gtklistbox.inc"
|
||||
%include "gtk/gtkliststore.inc"
|
||||
%include "gtk/gtklockbutton.inc"
|
||||
%include "gtk/gtkmain.inc"
|
||||
%include "gtk/gtkmenu.inc"
|
||||
%include "gtk/gtkmenubar.inc"
|
||||
%include "gtk/gtkmenubutton.inc"
|
||||
%include "gtk/gtkmenuitem.inc"
|
||||
%include "gtk/gtkmenushell.inc"
|
||||
%include "gtk/gtkmenutoolbutton.inc"
|
||||
%include "gtk/gtkmessagedialog.inc"
|
||||
%include "gtk/gtkmodelbutton.inc"
|
||||
%include "gtk/gtkmodules.inc"
|
||||
%include "gtk/gtkmountoperation.inc"
|
||||
%include "gtk/gtknotebook.inc"
|
||||
%include "gtk/gtkoffscreenwindow.inc"
|
||||
%include "gtk/gtkorientable.inc"
|
||||
%include "gtk/gtkoverlay.inc"
|
||||
%include "gtk/gtkpagesetup.inc"
|
||||
%include "gtk/gtkpapersize.inc"
|
||||
%include "gtk/gtkpaned.inc"
|
||||
%include "gtk/gtkplacessidebar.inc"
|
||||
%include "gtk/gtkpopover.inc"
|
||||
%include "gtk/gtkpopovermenu.inc"
|
||||
%include "gtk/gtkprintcontext.inc"
|
||||
%include "gtk/gtkprintoperation.inc"
|
||||
%include "gtk/gtkprintoperationpreview.inc"
|
||||
%include "gtk/gtkprintsettings.inc"
|
||||
%include "gtk/gtkprogressbar.inc"
|
||||
%include "gtk/gtkradiobutton.inc"
|
||||
%include "gtk/gtkradiomenuitem.inc"
|
||||
%include "gtk/gtkradiotoolbutton.inc"
|
||||
%include "gtk/gtkrange.inc"
|
||||
%include "gtk/gtkrecentchooser.inc"
|
||||
%include "gtk/gtkrecentchooserdialog.inc"
|
||||
%include "gtk/gtkrecentchoosermenu.inc"
|
||||
%include "gtk/gtkrecentchooserwidget.inc"
|
||||
%include "gtk/gtkrecentfilter.inc"
|
||||
%include "gtk/gtkrecentmanager.inc"
|
||||
%include "gtk/gtkrender.inc"
|
||||
%include "gtk/gtkrevealer.inc"
|
||||
%include "gtk/gtkscale.inc"
|
||||
%include "gtk/gtkscalebutton.inc"
|
||||
%include "gtk/gtkscrollable.inc"
|
||||
%include "gtk/gtkscrollbar.inc"
|
||||
%include "gtk/gtkscrolledwindow.inc"
|
||||
%include "gtk/gtksearchbar.inc"
|
||||
%include "gtk/gtksearchentry.inc"
|
||||
%include "gtk/gtkselection.inc"
|
||||
%include "gtk/gtkseparator.inc"
|
||||
%include "gtk/gtkseparatormenuitem.inc"
|
||||
%include "gtk/gtkseparatortoolitem.inc"
|
||||
%include "gtk/gtksettings.inc"
|
||||
%include "gtk/gtkshow.inc"
|
||||
%include "gtk/gtkstacksidebar.inc"
|
||||
%include "gtk/gtksizegroup.inc"
|
||||
%include "gtk/gtksizerequest.inc"
|
||||
%include "gtk/gtkspinbutton.inc"
|
||||
%include "gtk/gtkspinner.inc"
|
||||
%include "gtk/gtkstack.inc"
|
||||
%include "gtk/gtkstackswitcher.inc"
|
||||
%include "gtk/gtkstatusbar.inc"
|
||||
%include "gtk/gtkstylecontext.inc"
|
||||
%include "gtk/gtkstyleprovider.inc"
|
||||
%include "gtk/gtkswitch.inc"
|
||||
%include "gtk/gtktextattributes.inc"
|
||||
%include "gtk/gtktextbuffer.inc"
|
||||
%include "gtk/gtktextbufferrichtext.inc"
|
||||
%include "gtk/gtktextchild.inc"
|
||||
%include "gtk/gtktextiter.inc"
|
||||
%include "gtk/gtktextmark.inc"
|
||||
%include "gtk/gtktexttag.inc"
|
||||
%include "gtk/gtktexttagtable.inc"
|
||||
%include "gtk/gtktextview.inc"
|
||||
%include "gtk/gtktogglebutton.inc"
|
||||
%include "gtk/gtktoggletoolbutton.inc"
|
||||
%include "gtk/gtktoolbar.inc"
|
||||
%include "gtk/gtktoolbutton.inc"
|
||||
%include "gtk/gtktoolitem.inc"
|
||||
%include "gtk/gtktoolitemgroup.inc"
|
||||
%include "gtk/gtktoolpalette.inc"
|
||||
%include "gtk/gtktoolshell.inc"
|
||||
%include "gtk/gtktooltip.inc"
|
||||
%include "gtk/gtktestutils.inc"
|
||||
%include "gtk/gtktreednd.inc"
|
||||
%include "gtk/gtktreemodel.inc"
|
||||
%include "gtk/gtktreemodelfilter.inc"
|
||||
%include "gtk/gtktreemodelsort.inc"
|
||||
%include "gtk/gtktreeselection.inc"
|
||||
%include "gtk/gtktreesortable.inc"
|
||||
%include "gtk/gtktreestore.inc"
|
||||
%include "gtk/gtktreeview.inc"
|
||||
%include "gtk/gtktreeviewcolumn.inc"
|
||||
%include "gtk/gtktypebuiltins.inc"
|
||||
%include "gtk/gtktypes.inc"
|
||||
%include "gtk/gtkversion.inc"
|
||||
%include "gtk/gtkviewport.inc"
|
||||
%include "gtk/gtkvolumebutton.inc"
|
||||
%include "gtk/gtkwidget.inc"
|
||||
%include "gtk/gtkwidgetpath.inc"
|
||||
%include "gtk/gtkwindow.inc"
|
||||
%include "gtk/gtkwindowgroup.inc"
|
||||
%ifndef GTK_DISABLE_DEPRECATED
|
||||
%include "gtk/deprecated/gtkarrow.inc"
|
||||
%include "gtk/deprecated/gtkactivatable.inc"
|
||||
%include "gtk/deprecated/gtkaction.inc"
|
||||
%include "gtk/deprecated/gtkactiongroup.inc"
|
||||
%include "gtk/deprecated/gtkalignment.inc"
|
||||
%include "gtk/deprecated/gtkcolorsel.inc"
|
||||
%include "gtk/deprecated/gtkcolorseldialog.inc"
|
||||
%include "gtk/deprecated/gtkfontsel.inc"
|
||||
%include "gtk/deprecated/gtkgradient.inc"
|
||||
%include "gtk/deprecated/gtkhandlebox.inc"
|
||||
%include "gtk/deprecated/gtkhbbox.inc"
|
||||
%include "gtk/deprecated/gtkhbox.inc"
|
||||
%include "gtk/deprecated/gtkhpaned.inc"
|
||||
%include "gtk/deprecated/gtkhsv.inc"
|
||||
%include "gtk/deprecated/gtkhscale.inc"
|
||||
%include "gtk/deprecated/gtkhscrollbar.inc"
|
||||
%include "gtk/deprecated/gtkhseparator.inc"
|
||||
%include "gtk/deprecated/gtkiconfactory.inc"
|
||||
%include "gtk/deprecated/gtkimagemenuitem.inc"
|
||||
%include "gtk/deprecated/gtkmisc.inc"
|
||||
%include "gtk/deprecated/gtknumerableicon.inc"
|
||||
%include "gtk/deprecated/gtkradioaction.inc"
|
||||
%include "gtk/deprecated/gtkrc.inc"
|
||||
%include "gtk/deprecated/gtkrecentaction.inc"
|
||||
%include "gtk/deprecated/gtkstatusicon.inc"
|
||||
%include "gtk/deprecated/gtkstock.inc"
|
||||
%include "gtk/deprecated/gtkstyle.inc"
|
||||
%include "gtk/deprecated/gtkstyleproperties.inc"
|
||||
%include "gtk/deprecated/gtksymboliccolor.inc"
|
||||
%include "gtk/deprecated/gtktable.inc"
|
||||
%include "gtk/deprecated/gtktearoffmenuitem.inc"
|
||||
%include "gtk/deprecated/gtkthemingengine.inc"
|
||||
%include "gtk/deprecated/gtktoggleaction.inc"
|
||||
%include "gtk/deprecated/gtkuimanager.inc"
|
||||
%include "gtk/deprecated/gtkvbbox.inc"
|
||||
%include "gtk/deprecated/gtkvbox.inc"
|
||||
%include "gtk/deprecated/gtkvpaned.inc"
|
||||
%include "gtk/deprecated/gtkvscale.inc"
|
||||
%include "gtk/deprecated/gtkvscrollbar.inc"
|
||||
%include "gtk/deprecated/gtkvseparator.inc"
|
||||
%endif ; GTK_DISABLE_DEPRECATED
|
||||
%include "gtk/gtk-autocleanups.inc"
|
||||
%undef __GTK_H_INSIDE__
|
||||
%endif ; __GTK_H__
|
||||
56
h2inc.py
56
h2inc.py
@@ -1,15 +1,18 @@
|
||||
"""Script for translating C-header files into nasm syntax include files"""
|
||||
import os
|
||||
import errno
|
||||
from parser import PARSER
|
||||
|
||||
class H2INC:
|
||||
def __init__(self):
|
||||
self.filelist = []
|
||||
self.folderlist = []
|
||||
self.sourcedir = "/usr/src"
|
||||
self.destdir = "~/include"
|
||||
self.sourcedir = "/usr/include"
|
||||
self.destdir = "/data/include"
|
||||
self.filecnt = 0
|
||||
self.foldercnt = 0
|
||||
|
||||
def srcfilecnt(self.sourcedir):
|
||||
def srcfilecnt(self, sourcedir):
|
||||
### Return the number of files, ending with '.h', in sourcedir - including subdirectories ###
|
||||
for folderName, subfolders, files in os.walk(self.sourcedir):
|
||||
for file in files:
|
||||
@@ -21,12 +24,12 @@ class H2INC:
|
||||
else:
|
||||
return False
|
||||
|
||||
def srcfoldercnt(self.sourcedir):
|
||||
def srcfoldercnt(self, src):
|
||||
### Return the number of folders, if it contains '*.h' files, in sourcedir - including subdirectories ###
|
||||
for folderName, subfolders, files in os.walk(self.sourcedir):
|
||||
for folderName, subfolders, files in os.walk(src):
|
||||
if subfolders:
|
||||
for subfolder in subfolders:
|
||||
sourcedir_foldercnt(subfolder)
|
||||
self.srcfoldercnt(subfolder)
|
||||
tempf = [file for file in files if file.lower().endswith('.h')]
|
||||
if tempf:
|
||||
self.foldercnt = self.foldercnt+1
|
||||
@@ -36,9 +39,13 @@ class H2INC:
|
||||
else:
|
||||
return False
|
||||
|
||||
def read_file(fn):
|
||||
def read_file(self, fn):
|
||||
parse = PARSER()
|
||||
outfile = ''
|
||||
inputfile = fn
|
||||
passes = 0
|
||||
tempfile = []
|
||||
templine = []
|
||||
encodings = ['utf-8', 'latin-1', 'windows-1250', 'windows-1252', 'ascii',
|
||||
'big5', 'big5hkscs', 'cp037', 'cp273', 'cp424', 'cp437', 'cp500',
|
||||
'cp720', 'cp737', 'cp775', 'cp850', 'cp852', 'cp855', 'cp856',
|
||||
@@ -57,23 +64,30 @@ class H2INC:
|
||||
'utf-32-le', 'utf-16', 'utf-16-be', 'utf-16-le', 'utf-7', 'utf-8-sig']
|
||||
for e in encodings:
|
||||
try:
|
||||
fh = io.open(fn, 'r', encoding=e)
|
||||
fh = open(fn, 'r', encoding=e)
|
||||
fh.readlines()
|
||||
fh.seek(0)
|
||||
except UnicodeDecodeError:
|
||||
print('got unicode error with %s , trying different encoding' % e)
|
||||
else:
|
||||
#print('opening the file with encoding: %s ' % e)
|
||||
break
|
||||
#print(os.path.basename(data))
|
||||
self.tupfile = []
|
||||
for lines in fh:
|
||||
outfile = outfile+lines
|
||||
self.tupfile.append(lines)
|
||||
fh.close()
|
||||
resultfile = parse.parseheader(self.tupfile)
|
||||
print(resultfile)
|
||||
for l in resultfile:
|
||||
for w in l:
|
||||
outfile += w+" "
|
||||
outfile += "\n"
|
||||
outputfile = os.path.splitext(inputfile)[0]+'.inc'
|
||||
outputfile = str(outputfile).replace(sourcedir, destdir)
|
||||
write_file(outputfile,outfile)
|
||||
outputfile = str(outputfile).replace(self.sourcedir, self.destdir)
|
||||
print(outputfile)
|
||||
print(os.path.dirname(outputfile))
|
||||
self.write_file(outputfile,outfile)
|
||||
|
||||
def write_file(fn, data):
|
||||
def write_file(self, fn, data):
|
||||
if not os.path.exists(os.path.dirname(fn)):
|
||||
try:
|
||||
os.makedirs(os.path.dirname(fn))
|
||||
@@ -83,4 +97,16 @@ class H2INC:
|
||||
newfile = open(fn, "w")
|
||||
newfile.write(data)
|
||||
newfile.close()
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = H2INC()
|
||||
if app.srcfilecnt(app.sourcedir) == True:
|
||||
print(app.filecnt)
|
||||
#print(app.filelist)
|
||||
if app.srcfoldercnt(app.sourcedir) == True:
|
||||
print(app.foldercnt)
|
||||
#print(app.folderlist)
|
||||
#for f in app.filelist:
|
||||
#app.read_file(f)
|
||||
app.read_file("./gtk.h") #testfile for comments and header includes
|
||||
159
parser.py
Normal file
159
parser.py
Normal file
@@ -0,0 +1,159 @@
|
||||
"""Contains class PARSER"""
|
||||
from itertools import count
|
||||
|
||||
#Element type definitions. Used in the parse process.
|
||||
ELEMENT_TYPE_PREPROCESS = 1
|
||||
ELEMENT_TYPE_REGULAR = 2
|
||||
|
||||
TOKENS = ['TOKEN_CSTART','TOKEN_CMID','TOKEN_CEND','TOKEN_RPAREN',
|
||||
'TOKEN_LPAREN','TOKEN_ENDLINE','TOKEN_RETVAL','TOKEN_PREPROCESS',
|
||||
'TOKEN_ID','TOKEN_PLUS','TOKEN_MINUS','TOKEN_DIV','TOKEN_MULT',
|
||||
'TOKEN_ASSIGN','TOKEN_EQUAL','TOKEN_LBRACE','TOKEN_RBRACE',
|
||||
'TOKEN_COMMA','TOKEN_SEMICOLON','TOKEN_LANGLE','TOKEN_RANGLE','TOKEN_POINTER']
|
||||
|
||||
RESERVED = {'auto' : 'AUTO','break' : 'BREAK','case' : 'CASE','char' : 'CHAR',
|
||||
'const' : 'CONST','continue' : 'CONTINUE','default' : 'DEFAULT','do' : 'DO',
|
||||
'int' : 'INT','long' : 'LONG','register' : 'REGISTER','return' : 'RETURN',
|
||||
'short' : 'SHORT','signed' : 'SIGNED','sizeof' : 'SIZEOF','static' : 'STATIC',
|
||||
'struct' : 'STRUCT','switch' : 'SWITCH','typedef' : 'TYPEDEF','union' : 'UNION',
|
||||
'unsigned' : 'UNSIGNED','void' : 'VOID','volatile' : 'VOLATILE','while' : 'WHILE',
|
||||
'double' : 'DOUBLE','else' : 'ELSE','enum' : 'ENUM','extern' : 'EXTERN',
|
||||
'float' : 'FLOAT','for' : 'FOR','goto' : 'GOTO','if' : 'IF'}
|
||||
|
||||
PREPROCESSOR_DIRECTIVES = {'#include' : 'TOKEN_PREPROCESS','#define' : 'TOKEN_PREPROCESS','#undef' : 'TOKEN_PREPROCESS',
|
||||
'#if' : 'TOKEN_PREPROCESS','#ifdef' : 'TOKEN_PREPROCESS','#ifndef' : 'TOKEN_PREPROCESS','#error' : 'TOKEN_PREPROCESS',
|
||||
'__FILE__' : 'TOKEN_PREPROCESS','__LINE__' : 'TOKEN_PREPROCESS','__DATE__' : 'TOKEN_PREPROCESS',
|
||||
'__TIME__' : 'TOKEN_PREPROCESS','__TIMESTAMP__' : 'TOKEN_PREPROCESS','pragma' : 'TOKEN_PREPROCESS',
|
||||
'#' : 'TOKEN_PREPROCESS','##' : 'TOKEN_PREPROCESS','#endif' : 'TOKEN_PREPROCESS'}
|
||||
|
||||
REGULAR = {'/*' : 'TOKEN_CSTART','*/' : 'TOKEN_CEND', '*' : 'TOKEN_CMID', '=' : 'TOKEN_ASSIGN','==' : 'TOKEN_EQUAL',
|
||||
'{' : 'TOKEN_LBRACE','}' : 'TOKEN_RBRACE','\+' : 'TOKEN_PLUS','-' : 'TOKEN_MINUS',
|
||||
'\*' : 'TOKEN_MULT','/' : 'TOKEN_DIV','\(' : 'TOKEN_LPAREN','\)' : 'TOKEN_RPAREN',
|
||||
',' : 'TOKEN_COMMA',';' : 'TOKEN_SEMICOLON','\<' : 'TOKEN_LANGLE','\>' : 'TOKEN_RANGLE'}
|
||||
|
||||
NASM_PREPROCESS_DIRECTIVES = {'#include' : '%include','#define' : '%define','#undef' : '%undef',
|
||||
'#if' : '%if','#ifdef' : '%ifdef','#ifndef' : '%ifndef','#endif' : '%endif',
|
||||
'#error' : '%error','__FILE__' : '__FILE__','__LINE__' : '__LINE__',
|
||||
'__DATE__' : '__DATE__','__TIME__' : '__TIME__','__TIMESTAMP__' : '__TIMESTAMP__',
|
||||
'pragma' : 'pragma','#' : '#','##' : '##'}
|
||||
|
||||
NASM_REGULAR = {'/*' : ';', '*' : ';', '*/' : ''}
|
||||
|
||||
TOKENS += RESERVED.values()
|
||||
|
||||
COMMENT_SINGLE_LINE = 0
|
||||
COMMENT_MULTI_LINE = 1
|
||||
|
||||
class PARSEOBJECT:
|
||||
_passes = count(0)
|
||||
|
||||
def __init__(self):
|
||||
self.parseline = []
|
||||
self.parsefile = []
|
||||
self.passes = 0
|
||||
|
||||
def parse_reset(self):
|
||||
self.parseline = []
|
||||
self.parsefile = []
|
||||
self._passes = count(0)
|
||||
self.inside_comment = False
|
||||
|
||||
def inc_passes(self):
|
||||
self.passes = next(self._passes)
|
||||
|
||||
def parseheader(self, fl):
|
||||
tempfile = []
|
||||
self.parse_reset()
|
||||
for l in fl:
|
||||
analyzed_line = self.analyzer(l)
|
||||
tempfile.append(analyzed_line)
|
||||
self.inc_passes()
|
||||
self.parsefile = self.parsetokens(tempfile)
|
||||
return self.parsefile
|
||||
|
||||
def parseinclude(self, data):
|
||||
tempstr = str(data)
|
||||
if tempstr.startswith('<'):
|
||||
tempstr = tempstr.replace('<', '"')
|
||||
tempstr = tempstr.replace('.h>', '.inc"')
|
||||
if tempstr.endswith('.h'):
|
||||
tempstr = '"'+tempstr
|
||||
tempstr = tempstr.replace('.h', '.inc"')
|
||||
return tempstr
|
||||
|
||||
def tokenizer(self, w):
|
||||
token = ""
|
||||
if w in PREPROCESSOR_DIRECTIVES:
|
||||
token = PREPROCESSOR_DIRECTIVES.get(w)
|
||||
return token
|
||||
if w in REGULAR:
|
||||
token = REGULAR.get(w)
|
||||
return token
|
||||
return False
|
||||
|
||||
def analyzer(self, ln):
|
||||
analysed = []
|
||||
word = [w for w in ln.split()]
|
||||
for w in word:
|
||||
t = self.tokenizer(w)
|
||||
if t == False:
|
||||
analysed.append(w)
|
||||
continue
|
||||
else:
|
||||
analysed.append(t)
|
||||
analysed.append(w)
|
||||
return analysed
|
||||
|
||||
def parsetokens(self, fl):
|
||||
templine = []
|
||||
tempfile = []
|
||||
for l in fl:
|
||||
if len(l) == 0:
|
||||
templine.append("\n")
|
||||
continue
|
||||
if l[0] == "TOKEN_CSTART" or l[0] == "TOKEN_CMID" or l[0] == "TOKEN_CEND":
|
||||
self.inside_comment = True
|
||||
tempfile.append(self.parse_comment(l))
|
||||
continue
|
||||
if l[0] == "TOKEN_PREPROCESS":
|
||||
tempfile.append(self.parse_preprocess(l))
|
||||
return tempfile
|
||||
|
||||
def parse_comment(self, l):
|
||||
templine = []
|
||||
for w in l:
|
||||
if w in TOKENS:
|
||||
continue
|
||||
if w in NASM_REGULAR:
|
||||
templine.append(NASM_REGULAR.get(w))
|
||||
continue
|
||||
templine.append(w)
|
||||
return templine
|
||||
|
||||
def parse_preprocess(self, l):
|
||||
newline = []
|
||||
for w in l:
|
||||
if w in TOKENS:
|
||||
continue
|
||||
if w in PREPROCESSOR_DIRECTIVES:
|
||||
newline.append(NASM_PREPROCESS_DIRECTIVES.get(w))
|
||||
continue
|
||||
if w.startswith("<"):
|
||||
newline.append(self.parseinclude(w))
|
||||
continue
|
||||
if w in NASM_REGULAR:
|
||||
newline.append(NASM_REGULAR.get(w))
|
||||
continue
|
||||
newline.append(w)
|
||||
return newline
|
||||
|
||||
|
||||
class PARSER(PARSEOBJECT):
|
||||
_ids = count(0)
|
||||
_passes = count(0)
|
||||
|
||||
def __init__(self):
|
||||
self.id = next(self._ids)
|
||||
self.tupline = []
|
||||
self.tupfile = []
|
||||
self.passes = next(self._passes)
|
||||
Reference in New Issue
Block a user