gtk-stream 0.5.1__py3-none-any.whl → 0.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gtk_stream/application.py +17 -2
- gtk_stream/command_line.py +16 -0
- gtk_stream/common.py +16 -0
- gtk_stream/documents/__init__.py +1 -0
- gtk_stream/documents/classes/Box.py +16 -0
- gtk_stream/documents/classes/Button.py +16 -0
- gtk_stream/documents/classes/Document.py +17 -1
- gtk_stream/documents/classes/Dropdown.py +16 -0
- gtk_stream/documents/classes/Frame.py +16 -0
- gtk_stream/documents/classes/Grid.py +16 -0
- gtk_stream/documents/classes/Label.py +16 -0
- gtk_stream/documents/classes/Paned.py +16 -0
- gtk_stream/documents/classes/Picture.py +16 -0
- gtk_stream/documents/classes/ProgressBar.py +16 -0
- gtk_stream/documents/classes/ScrolledWindow.py +16 -0
- gtk_stream/documents/classes/Separator.py +16 -0
- gtk_stream/documents/classes/Stack.py +27 -0
- gtk_stream/documents/classes/Switch.py +17 -1
- gtk_stream/parser.py +18 -1
- gtk_stream/properties.py +32 -10
- {gtk_stream-0.5.1.dist-info → gtk_stream-0.6.1.dist-info}/METADATA +9 -2
- gtk_stream-0.6.1.dist-info/RECORD +27 -0
- gtk_stream-0.5.1.dist-info/RECORD +0 -26
- {gtk_stream-0.5.1.dist-info → gtk_stream-0.6.1.dist-info}/WHEEL +0 -0
- {gtk_stream-0.5.1.dist-info → gtk_stream-0.6.1.dist-info}/entry_points.txt +0 -0
- {gtk_stream-0.5.1.dist-info → gtk_stream-0.6.1.dist-info}/top_level.txt +0 -0
gtk_stream/application.py
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
2
16
|
|
|
17
|
+
import sys
|
|
3
18
|
from . import Gtk, GLib, Gdk
|
|
4
19
|
from .common import printEvent
|
|
5
20
|
from .properties import parse_property, get_prop_type
|
|
@@ -81,5 +96,5 @@ class GtkStreamApp(Gtk.Application):
|
|
|
81
96
|
def setProp(self, id, name, value):
|
|
82
97
|
def cb():
|
|
83
98
|
w = self.namedWidgets[id]
|
|
84
|
-
w.set_property(name, parse_property(get_prop_type(w.__class__, name), value))
|
|
99
|
+
w.set_property(name, parse_property(get_prop_type(w.__class__, name), value)(self))
|
|
85
100
|
self.run_when_idle(cb)
|
gtk_stream/command_line.py
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
import io
|
|
2
18
|
import xml.sax as sax
|
|
3
19
|
import signal
|
gtk_stream/common.py
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
import sys
|
|
2
18
|
|
|
3
19
|
def _data_str_default(*args):
|
gtk_stream/documents/__init__.py
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
from ... import Gtk
|
|
2
18
|
from .. import Document, PseudoDocument
|
|
3
19
|
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
from ... import Gtk
|
|
2
18
|
from ...common import printEvent
|
|
3
19
|
from .. import Document
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
from ...properties import parse_property, get_prop_type
|
|
2
18
|
|
|
3
19
|
class Document:
|
|
@@ -18,7 +34,7 @@ class Document:
|
|
|
18
34
|
self.app.nameWidget(self.id, w)
|
|
19
35
|
for (p,v) in self.props.items():
|
|
20
36
|
# print(f"Setting property '{p}' to '{v}' in widget {self.__class__}", file=sys.stderr)
|
|
21
|
-
w.set_property(p, v)
|
|
37
|
+
w.set_property(p, v(self.app))
|
|
22
38
|
w.insert_child = lambda d: self.insert_child(w, d)
|
|
23
39
|
def render(self):
|
|
24
40
|
w = self.render_raw()
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
from ... import Gtk, Gio, GObject
|
|
2
18
|
from .. import Document
|
|
3
19
|
from ...common import printEvent
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
from ... import Gtk
|
|
2
18
|
from .. import Document, PseudoDocument
|
|
3
19
|
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
from ... import Gtk
|
|
2
18
|
from .. import Document, PseudoDocument
|
|
3
19
|
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
from ... import Gtk
|
|
2
18
|
from .. import Document
|
|
3
19
|
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
from ... import Gtk
|
|
2
18
|
from .. import Document
|
|
3
19
|
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
import sys
|
|
2
18
|
from ... import Gtk
|
|
3
19
|
from .. import Document
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
from ... import Gtk
|
|
2
18
|
from .. import Document
|
|
3
19
|
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
from ... import Gtk
|
|
2
18
|
from .. import Document
|
|
3
19
|
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
from ... import Gtk
|
|
2
18
|
from .. import Document
|
|
3
19
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
17
|
+
from ... import Gtk
|
|
18
|
+
from .. import Document, PseudoDocument
|
|
19
|
+
|
|
20
|
+
class Stack(Document):
|
|
21
|
+
__g_class__ = Gtk.Stack
|
|
22
|
+
def __init__(self, app, **kwargs):
|
|
23
|
+
super().__init__(app, **kwargs)
|
|
24
|
+
def render_raw(self):
|
|
25
|
+
return Gtk.Stack()
|
|
26
|
+
def insert_child(self, w, d):
|
|
27
|
+
w.add_child(d.render())
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
from ... import Gtk
|
|
2
18
|
from ...common import printEvent
|
|
3
19
|
from .. import Document
|
|
@@ -7,7 +23,7 @@ class Switch(Document):
|
|
|
7
23
|
__g_class__ = Gtk.Switch
|
|
8
24
|
def __init__(self, app, id, managed = "false", **kwargs):
|
|
9
25
|
super().__init__(app, id=id, **kwargs)
|
|
10
|
-
self.managed = parse_property('gboolean', managed)
|
|
26
|
+
self.managed = parse_property('gboolean', managed)(app)
|
|
11
27
|
def render_raw(self):
|
|
12
28
|
ret = Gtk.Switch()
|
|
13
29
|
ret.connect('state-set', printEvent('switch', self.id,
|
gtk_stream/parser.py
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
import threading
|
|
2
18
|
import signal
|
|
3
19
|
import sys
|
|
@@ -28,7 +44,8 @@ WIDGET_DOCUMENTS = {
|
|
|
28
44
|
'switch' : docs.Switch,
|
|
29
45
|
'picture' : docs.Picture,
|
|
30
46
|
'separator' : docs.Separator,
|
|
31
|
-
'scrolled-window' : docs.ScrolledWindow
|
|
47
|
+
'scrolled-window' : docs.ScrolledWindow,
|
|
48
|
+
'stack' : docs.Stack
|
|
32
49
|
}
|
|
33
50
|
|
|
34
51
|
class GtkStreamXMLHandler(sax.ContentHandler):
|
gtk_stream/properties.py
CHANGED
|
@@ -1,25 +1,45 @@
|
|
|
1
|
+
# Gtk-Stream : A stream-based GUI protocol
|
|
2
|
+
# Copyright (C) 2024 Marc Coiffier
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
1
17
|
import sys
|
|
2
18
|
|
|
3
19
|
from . import Gtk
|
|
4
20
|
|
|
21
|
+
def _const(x):
|
|
22
|
+
return lambda _: x
|
|
5
23
|
def _parse_orientation_property(val):
|
|
6
|
-
return (Gtk.Orientation.HORIZONTAL) if val == "horizontal" else (Gtk.Orientation.VERTICAL)
|
|
24
|
+
return _const((Gtk.Orientation.HORIZONTAL) if val == "horizontal" else (Gtk.Orientation.VERTICAL))
|
|
7
25
|
def _parse_boolean_property(val):
|
|
8
|
-
return True if val == "true" else False
|
|
26
|
+
return _const(True if val == "true" else False)
|
|
9
27
|
def _parse_float_property(val):
|
|
10
|
-
return float(val)
|
|
28
|
+
return _const(float(val))
|
|
11
29
|
def _parse_int_property(val):
|
|
12
|
-
return int(val)
|
|
30
|
+
return _const(int(val))
|
|
13
31
|
def _parse_searchMode_property(val):
|
|
14
32
|
match val:
|
|
15
33
|
case 'exact':
|
|
16
|
-
return Gtk.StringFilterMatchMode.EXACT
|
|
34
|
+
return _const(Gtk.StringFilterMatchMode.EXACT)
|
|
17
35
|
case 'substring':
|
|
18
|
-
return Gtk.StringFilterMatchMode.SUBSTRING
|
|
36
|
+
return _const(Gtk.StringFilterMatchMode.SUBSTRING)
|
|
19
37
|
case _:
|
|
20
|
-
return Gtk.StringFilterMatchMode.PREFIX
|
|
38
|
+
return _const(Gtk.StringFilterMatchMode.PREFIX)
|
|
21
39
|
def _parse_css_classes_property(val):
|
|
22
|
-
return val.split()
|
|
40
|
+
return _const(val.split())
|
|
41
|
+
def _parse_widget_property(val):
|
|
42
|
+
return lambda app: app.namedWidgets[val]
|
|
23
43
|
|
|
24
44
|
_PARSE_TYPE_PROPERTY = {
|
|
25
45
|
'GStrv' : _parse_css_classes_property,
|
|
@@ -28,11 +48,13 @@ _PARSE_TYPE_PROPERTY = {
|
|
|
28
48
|
'gfloat' : _parse_float_property,
|
|
29
49
|
'gint' : _parse_int_property,
|
|
30
50
|
'gboolean' : _parse_boolean_property,
|
|
31
|
-
'GtkStringFilterMatchMode' : _parse_searchMode_property
|
|
51
|
+
'GtkStringFilterMatchMode' : _parse_searchMode_property,
|
|
52
|
+
'GtkWidget' : _parse_widget_property,
|
|
53
|
+
'gchararray' : _const,
|
|
32
54
|
}
|
|
33
55
|
|
|
34
56
|
def parse_property(prop_type, val):
|
|
35
57
|
# print(f"Parsing property '{val}' of type '{prop_type}'", file=sys.stderr)
|
|
36
|
-
return _PARSE_TYPE_PROPERTY
|
|
58
|
+
return _PARSE_TYPE_PROPERTY[prop_type](val)
|
|
37
59
|
def get_prop_type(klass, prop):
|
|
38
60
|
return klass.find_property(prop).value_type.name
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gtk-stream
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.1
|
|
4
4
|
Summary: A simple stream-oriented GUI protocol
|
|
5
5
|
Author-email: Marc Coiffier <marc.coiffier@univ-grenoble-alpes.fr>
|
|
6
6
|
Project-URL: Homepage, https://coiffier.net/projects/gtk-stream/
|
|
@@ -9,5 +9,12 @@ Classifier: Development Status :: 4 - Beta
|
|
|
9
9
|
Classifier: Intended Audience :: Developers
|
|
10
10
|
Classifier: Environment :: X11 Applications :: GTK
|
|
11
11
|
Classifier: Topic :: Software Development :: User Interfaces
|
|
12
|
-
Classifier: License :: OSI Approved :: GNU General Public License
|
|
12
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
13
14
|
Requires-Dist: pygobject
|
|
15
|
+
|
|
16
|
+
GTK-Stream
|
|
17
|
+
==========
|
|
18
|
+
|
|
19
|
+
- Pretty documentation : [link](https://coiffier.net/projects/gtk-stream/)
|
|
20
|
+
- Same documentation, but less pretty : [link](doc/index.md)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
gtk_stream/__init__.py,sha256=pDhUSN4AYNsP8_tilU1zmDCYdiv7ak4PE1TW0qFrDlg,99
|
|
2
|
+
gtk_stream/application.py,sha256=g95IbeV2fjKf55bRqBCl9EpdiA-sR9XHmp6BMGZBAbo,3836
|
|
3
|
+
gtk_stream/command_line.py,sha256=tnMvtDsQrTc8zr3zTvwAEWuuhNMgxAaF9qDjAyiW9yM,1032
|
|
4
|
+
gtk_stream/common.py,sha256=wjByU_xhzgCKJFSkEr0gNsi2dqv38kA9_2DodRRrBw4,1310
|
|
5
|
+
gtk_stream/parser.py,sha256=75tSJtvQrwQd34K8P18OAQUEjkmmPt8z7sVBOf47VAU,7914
|
|
6
|
+
gtk_stream/properties.py,sha256=r_zxYIBe5g8SGueuhtf5CIAWesmm2tXv6llh6657a74,2374
|
|
7
|
+
gtk_stream/documents/__init__.py,sha256=jqjJ4yY4fzpFbDfhe0pwR1ahg2jLaeLC-eyH6YTuLpQ,681
|
|
8
|
+
gtk_stream/documents/classes/Box.py,sha256=d01o2-JQ3-k0VjvvY8E7mly-u_f1v1NqYz1IDjHZLUo,1381
|
|
9
|
+
gtk_stream/documents/classes/Button.py,sha256=NoDuAwd2XqXY8ZvyOg9xeKIru71JBi4ZFS3Oe6P478Q,1529
|
|
10
|
+
gtk_stream/documents/classes/Document.py,sha256=m_N7UCxHmdlQ34OvP91EvUEdl40CzuRngeJRj9w3dPU,2109
|
|
11
|
+
gtk_stream/documents/classes/Dropdown.py,sha256=NUUQ24yrJomlwcXWgm73kEsAsy4Eej6udg77HFBgiZs,2426
|
|
12
|
+
gtk_stream/documents/classes/Frame.py,sha256=zAZvsT-YTZMijsgk7p0YVf6siAmFoCCSXouZo9XDpsA,1222
|
|
13
|
+
gtk_stream/documents/classes/Grid.py,sha256=jDJ9U1GJZ45hi1VvPsCwFILN7CwEkgjqYqhTzMdtX9o,1249
|
|
14
|
+
gtk_stream/documents/classes/Label.py,sha256=bBNBTvGs6fM8uLf4EDb2Ro8FmCeS27cnU1Ao-44nRYs,1023
|
|
15
|
+
gtk_stream/documents/classes/Paned.py,sha256=q1goKJMWBg1d3hS0eanPBxzBqLB-Pz5hUnH9N-RXXh8,1392
|
|
16
|
+
gtk_stream/documents/classes/Picture.py,sha256=kqrlGPeMrqjzeyKzjbMJschQA2akJI0ZXd4PbEfmGPY,1018
|
|
17
|
+
gtk_stream/documents/classes/ProgressBar.py,sha256=NPJtP3qaKiZUEAYEHZk4FEoWSFn2KVorI2SVb8cDnW0,966
|
|
18
|
+
gtk_stream/documents/classes/ScrolledWindow.py,sha256=WaTPgz6GBC-hjH83SQT2OGUdCapHAgO3xEmSMJZ8q70,1041
|
|
19
|
+
gtk_stream/documents/classes/Separator.py,sha256=uw_EgAKs_6pNA8nrOLzruIlJfk4uaogB0p_jeoY0PHM,960
|
|
20
|
+
gtk_stream/documents/classes/Stack.py,sha256=YA6NDzZL2u4Ko8GXtx8Or-jEWGMCEw2cC1HNkAMRw-8,1030
|
|
21
|
+
gtk_stream/documents/classes/Switch.py,sha256=bLOkyAy_v2T_Gli9c6TAhnUJcqhbnxbD9oswPdTAsGo,1365
|
|
22
|
+
gtk_stream/documents/classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
+
gtk_stream-0.6.1.dist-info/METADATA,sha256=2x5RAxnuDZ-AMqBf__ETYAetTKUTJaIfzFGI3R1Ojm0,806
|
|
24
|
+
gtk_stream-0.6.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
25
|
+
gtk_stream-0.6.1.dist-info/entry_points.txt,sha256=PmhKTb4MMQM6dN2HJcoDSMI8L0lZIFIlFn-BgdfPDpo,60
|
|
26
|
+
gtk_stream-0.6.1.dist-info/top_level.txt,sha256=vE9zfHGe9Ke7FSe0wBK2WYJI-BpcQNu6xDC3Cu5O8rQ,11
|
|
27
|
+
gtk_stream-0.6.1.dist-info/RECORD,,
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
gtk_stream/__init__.py,sha256=pDhUSN4AYNsP8_tilU1zmDCYdiv7ak4PE1TW0qFrDlg,99
|
|
2
|
-
gtk_stream/application.py,sha256=e_Xvi9xG1kCD979CnZyAZlFj0F8cDUf_9_Tad2bmirs,3111
|
|
3
|
-
gtk_stream/command_line.py,sha256=c2ghqIQB5hYxtCszss1z84yKoeRYvaMJJMi4aiTspWg,312
|
|
4
|
-
gtk_stream/common.py,sha256=sEw15nVw9SVp8eLVOB5Zj1JITVhUhCF0i3PSwpd8lis,590
|
|
5
|
-
gtk_stream/parser.py,sha256=W0I9P6imw5HQ11Yd6lJsEOtsZyfTlHPCoHLb2sRBT9I,7158
|
|
6
|
-
gtk_stream/properties.py,sha256=jxd7f-9Xl2cfMQpXuVEc_0VrgjfWcRjES7EzfhjQ5Rw,1392
|
|
7
|
-
gtk_stream/documents/__init__.py,sha256=fPfffVh90czgded8wxI-KFLyw0ZG0tfQ-v3_E5JawQE,639
|
|
8
|
-
gtk_stream/documents/classes/Box.py,sha256=-L0OSIcPCOYedJqD9zPpe183EJJkClboX1-3yGHmnL0,661
|
|
9
|
-
gtk_stream/documents/classes/Button.py,sha256=HeIYBix4qLVZc_a6Fs_MofyqxHeXbuZzsk_FneGLGb4,809
|
|
10
|
-
gtk_stream/documents/classes/Document.py,sha256=w3DXEmEvqRO8efJ5ovre_ToGylSVjN5C1vu81LiNl1U,1379
|
|
11
|
-
gtk_stream/documents/classes/Dropdown.py,sha256=-H344e7PsfwlnHT7eYBC35rVFkwVPSRJL3szU6w2A8U,1706
|
|
12
|
-
gtk_stream/documents/classes/Frame.py,sha256=xG8Wts9xBw0Kk7VKv_YHSq-zf2coeRRtQKQkdtJMXAc,502
|
|
13
|
-
gtk_stream/documents/classes/Grid.py,sha256=HG7zW6i4h9MMVnmBwvDI8A1mspmRk35HOc0lwGYxPQc,529
|
|
14
|
-
gtk_stream/documents/classes/Label.py,sha256=3KI9JyVaBhgw0RZ7jK1NEn6mZg7GG0LrZz-Y_NSS2Kg,303
|
|
15
|
-
gtk_stream/documents/classes/Paned.py,sha256=4xG_BWNlOn3Esd_99953OAMGmjWkdkGSHKJhnprtzG8,672
|
|
16
|
-
gtk_stream/documents/classes/Picture.py,sha256=fNtM3TLkr2au92m8MCJmE3fYvyajFgw1VxMfj7dYV3s,298
|
|
17
|
-
gtk_stream/documents/classes/ProgressBar.py,sha256=aegonsruP3jPGA6Wguk-MdIm5e3y-4Ug3q_cGglDcAA,246
|
|
18
|
-
gtk_stream/documents/classes/ScrolledWindow.py,sha256=XX5tZDC5SlxAPMrzSscO3O3KzwZZDWKw02Q_bp0M6OE,321
|
|
19
|
-
gtk_stream/documents/classes/Separator.py,sha256=LKjh0BX5DZ-1dn5KL4Yu6anGL9AevnIrq9a52F2fKr4,240
|
|
20
|
-
gtk_stream/documents/classes/Switch.py,sha256=AQYK8MTwiB7vzJpv1JB8RTgWpW3bZ-EGY7_8MX-29TY,640
|
|
21
|
-
gtk_stream/documents/classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
-
gtk_stream-0.5.1.dist-info/METADATA,sha256=pI8FiiSfT3IxzoDX3CSk4U_6jWhpcoPaF3QxHhk6Cws,602
|
|
23
|
-
gtk_stream-0.5.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
24
|
-
gtk_stream-0.5.1.dist-info/entry_points.txt,sha256=PmhKTb4MMQM6dN2HJcoDSMI8L0lZIFIlFn-BgdfPDpo,60
|
|
25
|
-
gtk_stream-0.5.1.dist-info/top_level.txt,sha256=vE9zfHGe9Ke7FSe0wBK2WYJI-BpcQNu6xDC3Cu5O8rQ,11
|
|
26
|
-
gtk_stream-0.5.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|