Updated parsetokens(), updated gtkwindow.inc. /Lerking
This commit is contained in:
321
gtkwindow.inc
321
gtkwindow.inc
@@ -14,32 +14,54 @@
|
||||
; 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_WINDOW_H__
|
||||
%define __GTK_WINDOW_H__
|
||||
|
||||
|
||||
|
||||
|
||||
%if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
%error "Only "gtk/gtk.inc" can be included directly."
|
||||
%endif
|
||||
|
||||
|
||||
%include "gtk/gtkapplication.inc"
|
||||
%include "gtk/gtkaccelgroup.inc"
|
||||
%include "gtk/gtkbin.inc"
|
||||
|
||||
|
||||
|
||||
|
||||
%define GTK_TYPE_WINDOW (gtk_window_get_type ())
|
||||
%define GTK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_WINDOW, GtkWindow))
|
||||
%define GTK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_WINDOW, GtkWindowClass))
|
||||
%define GTK_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_WINDOW))
|
||||
%define GTK_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_WINDOW))
|
||||
%define GTK_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_WINDOW, GtkWindowClass))
|
||||
; typedef struct _GtkWindowPrivate GtkWindowPrivate;
|
||||
; typedef struct _GtkWindowClass GtkWindowClass;
|
||||
; typedef struct _GtkWindowGeometryInfo GtkWindowGeometryInfo;
|
||||
; typedef struct _GtkWindowGroup GtkWindowGroup;
|
||||
; typedef struct _GtkWindowGroupClass GtkWindowGroupClass;
|
||||
; typedef struct _GtkWindowGroupPrivate GtkWindowGroupPrivate;
|
||||
|
||||
|
||||
struc GtkWindowPrivate;
|
||||
struc GtkWindowClass;
|
||||
struc GtkWindowGeometryInfo;
|
||||
struc GtkWindowGroup;
|
||||
struc GtkWindowGroupClass;
|
||||
struc GtkWindowGroupPrivate;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; GtkWindowClass:
|
||||
; @parent_class: The parent class.
|
||||
; @set_focus: Sets child as the focus widget for the window.
|
||||
@@ -50,8 +72,22 @@
|
||||
; @enable_debugging: Class handler for the #GtkWindow::enable-debugging
|
||||
; keybinding signal. Since: 3.14
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; G_SIGNAL_ACTION signals for keybindings
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; Padding for future expansion
|
||||
|
||||
|
||||
; GtkWindowType:
|
||||
; @GTK_WINDOW_TOPLEVEL: A regular window, such as a dialog.
|
||||
; @GTK_WINDOW_POPUP: A special window such as a tooltip.
|
||||
@@ -70,11 +106,9 @@
|
||||
; In particular, do not use #GTK_WINDOW_POPUP just to turn off
|
||||
; the window borders; use gtk_window_set_decorated() for that.
|
||||
|
||||
GTK_WINDOW_TOPLEVEL EQU 0
|
||||
|
||||
GTK_WINDOW_POPUP EQU 1
|
||||
|
||||
/** EQU 2
|
||||
GTK_WINDOW_TOPLEVEL EQU 0
|
||||
GTK_WINDOW_POPUP EQU 1
|
||||
|
||||
|
||||
; GtkWindowPosition:
|
||||
; @GTK_WIN_POS_NONE: No influence is made on placement.
|
||||
@@ -88,263 +122,82 @@ GTK_WINDOW_POPUP EQU 1
|
||||
; using #GTK_WIN_POS_CENTER_ALWAYS is almost always a bad idea.
|
||||
; It won’t necessarily work well with all window managers or on all windowing systems.
|
||||
|
||||
GTK_WIN_POS_NONE EQU 3
|
||||
GTK_WIN_POS_NONE EQU 0
|
||||
GTK_WIN_POS_CENTER EQU 1
|
||||
GTK_WIN_POS_MOUSE EQU 2
|
||||
GTK_WIN_POS_CENTER_ALWAYS EQU 3
|
||||
GTK_WIN_POS_CENTER_ON_PARENT EQU 4
|
||||
|
||||
|
||||
GTK_WIN_POS_CENTER EQU 4
|
||||
|
||||
|
||||
GTK_WIN_POS_MOUSE EQU 5
|
||||
const gchar ; gtk_window_get_title (GtkWindow *window);
|
||||
const gchar ; gtk_window_get_role (GtkWindow *window);
|
||||
|
||||
|
||||
GTK_WIN_POS_CENTER_ALWAYS EQU 6
|
||||
|
||||
|
||||
GTK_WIN_POS_CENTER_ON_PARENT EQU 7
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 8
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 9
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 10
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 11
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 12
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 13
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 14
|
||||
const gchar ; gtk_window_get_icon_name (GtkWindow *window);
|
||||
const gchar ; gtk_window_get_default_icon_name (void);
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 15
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 16
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 17
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 18
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 19
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 20
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 21
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 22
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 23
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 24
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 25
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 26
|
||||
|
||||
GDK_AVAILABLE_IN_3_4 EQU 27
|
||||
|
||||
GDK_AVAILABLE_IN_3_4 EQU 28
|
||||
|
||||
GDK_DEPRECATED_IN_3_8_FOR(gtk_widget_set_opacity) EQU 29
|
||||
|
||||
GDK_DEPRECATED_IN_3_8_FOR(gtk_widget_get_opacity) EQU 30
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 31
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 32
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 33
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 34
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 35
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 36
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 37
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 38
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 39
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 40
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 41
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 42
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 43
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 44
|
||||
|
||||
GDK_AVAILABLE_IN_3_4 EQU 45
|
||||
|
||||
GDK_AVAILABLE_IN_3_4 EQU 46
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 47
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 48
|
||||
|
||||
GDK_AVAILABLE_IN_3_2 EQU 49
|
||||
|
||||
GDK_AVAILABLE_IN_3_2 EQU 50
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 51
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 52
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 53
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 54
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 55
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 56
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 57
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 58
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 59
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 60
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 61
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 62
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 63
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 64
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 65
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 66
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 67
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 68
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 69
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 70
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 71
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 72
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 73
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 74
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 75
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 76
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 77
|
||||
|
||||
|
||||
; If window is set modal, input will be grabbed when show and released when hide
|
||||
GDK_AVAILABLE_IN_ALL EQU 78
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 79
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 80
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 81
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 82
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 83
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 84
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 85
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 86
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 87
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 88
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 89
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 90
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 91
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 92
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 93
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 94
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 95
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 96
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 97
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 98
|
||||
|
||||
GDK_AVAILABLE_IN_3_18 EQU 99
|
||||
|
||||
GDK_AVAILABLE_IN_3_10 EQU 100
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 101
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 102
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 103
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 104
|
||||
|
||||
|
||||
; Set initial default size of the window (does not constrain user
|
||||
; resize operations)
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 105
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 106
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 107
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 108
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 109
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 110
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 111
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 112
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 113
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 114
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 115
|
||||
|
||||
|
||||
; Ignore this unless you are writing a GUI builder
|
||||
GDK_DEPRECATED_IN_3_10 EQU 116
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 117
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 118
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL EQU 119
|
||||
|
||||
|
||||
|
||||
|
||||
; Window grips
|
||||
|
||||
GDK_DEPRECATED_IN_3_14 EQU 120
|
||||
|
||||
|
||||
GDK_DEPRECATED_IN_3_14 EQU 121
|
||||
|
||||
|
||||
GDK_DEPRECATED_IN_3_14 EQU 122
|
||||
|
||||
|
||||
GDK_DEPRECATED_IN_3_14 EQU 123
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_3_10 EQU 124
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_3_16 EQU 125
|
||||
|
||||
GDK_AVAILABLE_IN_3_12 EQU 126
|
||||
|
||||
GDK_AVAILABLE_IN_3_14 EQU 127
|
||||
|
||||
G_END_DECLS EQU 128
|
||||
|
||||
%endif ; __GTK_WINDOW_H__
|
||||
#endif ; __GTK_WINDOW_H__
|
||||
|
||||
52
parser.py
52
parser.py
@@ -11,7 +11,8 @@ 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']
|
||||
'TOKEN_COMMA','TOKEN_SEMICOLON','TOKEN_LANGLE','TOKEN_RANGLE',
|
||||
'TOKEN_POINTER', 'TOKEN_STRUCT']
|
||||
|
||||
RESERVED = {'auto' : 'AUTO','break' : 'BREAK','case' : 'CASE','char' : 'CHAR',
|
||||
'const' : 'CONST','continue' : 'CONTINUE','default' : 'DEFAULT','do' : 'DO',
|
||||
@@ -63,6 +64,8 @@ class PARSEOBJECT:
|
||||
self.inside_comment = False
|
||||
self.inside_typedef = False
|
||||
self.typedef_enum = False
|
||||
self.typedef_struct = False
|
||||
self.struct_begin = False
|
||||
self.enum_begin = False
|
||||
|
||||
def inc_passes(self):
|
||||
@@ -119,22 +122,46 @@ class PARSEOBJECT:
|
||||
for l in fl:
|
||||
templine = []
|
||||
tempstr = ""
|
||||
if len(l) == 0:
|
||||
templine.append("\n")
|
||||
if l == []:
|
||||
tempfile.append("\n")
|
||||
continue
|
||||
if l[0] == "TOKEN_CSTART" or l[0] == "TOKEN_CMID" or l[0] == "TOKEN_CEND":
|
||||
if "TOKEN_CSTART" in l:
|
||||
self.inside_comment = True
|
||||
tempfile.append(self.parse_comment(l))
|
||||
continue
|
||||
if l[0] == "TYPEDEF" or l[0] == "typedef":
|
||||
if "TOKEN_CMID" in l:
|
||||
self.inside_comment = True
|
||||
tempfile.append(self.parse_comment(l))
|
||||
continue
|
||||
if "TOKEN_CEND" in l:
|
||||
self.inside_comment = True
|
||||
tempfile.append(self.parse_comment(l))
|
||||
continue
|
||||
if "TYPEDEF" in l:
|
||||
self.parse_typedef(l)
|
||||
if self.typedef_enum == False:
|
||||
if self.typedef_enum == False and self.typedef_struct == False:
|
||||
templine.append("; ")
|
||||
for e in l:
|
||||
templine.append(e)
|
||||
tempfile.append(templine)
|
||||
if self.typedef_struct == True:
|
||||
templine.append('struc')
|
||||
templine.append(l[-1])
|
||||
tempfile.append(templine)
|
||||
continue
|
||||
if l[0] == "TOKEN_PREPROCESS":
|
||||
if "typedef" in l:
|
||||
self.parse_typedef(l)
|
||||
if self.typedef_enum == False and self.typedef_struct == False:
|
||||
templine.append("; ")
|
||||
for e in l:
|
||||
templine.append(e)
|
||||
tempfile.append(templine)
|
||||
if self.typedef_struct == True:
|
||||
templine.append('struc')
|
||||
templine.append(l[-1])
|
||||
tempfile.append(templine)
|
||||
continue
|
||||
if "TOKEN_PREPROCESS" in l:
|
||||
tempfile.append(self.parse_preprocess(l))
|
||||
continue
|
||||
if self.inside_typedef == True:
|
||||
@@ -148,16 +175,15 @@ class PARSEOBJECT:
|
||||
tempstr = l[0]
|
||||
templine.append(tempstr[:-1]+"\t")
|
||||
templine.append("EQU\t")
|
||||
templine.append(str(enum_cnt)+"\n")
|
||||
templine.append(str(enum_cnt))
|
||||
tempfile.append(templine)
|
||||
enum_cnt += 1
|
||||
continue
|
||||
else:
|
||||
templine.append(l[0]+"\t")
|
||||
templine.append("EQU\t")
|
||||
templine.append(str(enum_cnt)+"\n")
|
||||
templine.append(str(enum_cnt))
|
||||
tempfile.append(templine)
|
||||
enum_cnt += 1
|
||||
continue
|
||||
if len(l) == 3:
|
||||
if l[0].endswith(","):
|
||||
@@ -165,7 +191,7 @@ class PARSEOBJECT:
|
||||
enum_cnt = l[2]
|
||||
templine.append(tempstr[:-1]+"\t")
|
||||
templine.append("EQU"+"\t")
|
||||
templine.append(enum_cnt+"\n")
|
||||
templine.append(enum_cnt)
|
||||
tempfile.append(templine)
|
||||
continue
|
||||
if l[0] == "TOKEN_RBRACE" and len(l) == 3:
|
||||
@@ -184,9 +210,11 @@ class PARSEOBJECT:
|
||||
continue
|
||||
if w == "ENUM" or w == "enum":
|
||||
self.typedef_enum = True
|
||||
self.typedef_struct = False
|
||||
continue
|
||||
if w == "STRUCT" or w == "struct":
|
||||
self.inside_typedef = False
|
||||
self.typedef_struct = True
|
||||
self.typedef_enum = False
|
||||
continue
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user