On Sat, September 22, 2012 9:42 pm, Patrick Shirkey wrote:
>
> On Sat, September 22, 2012 3:56 pm, Patrick Shirkey wrote:
>> Hi,
>>
>> I have found the pyclutter-widgets project but none of the examples will
>> run for me with python2.7 and gtk3
>>
>> Can anyone suggest an example project that will run with that
>> combination?
>>
>>
>
> I have clutter 1.8.4, pyclutter-1.3.2
>
> I get this error when I run the code below.
>
> (process:17063): Clutter-CRITICAL **: _clutter_id_pool_add: assertion
> `id_pool != NULL' failed
>
> (process:17063): Clutter-CRITICAL **: Unable to check features. Have you
> initialized Clutter?
>
> (process:17063): Clutter-CRITICAL **: Unable to check features. Have you
> initialized Clutter?
> Segmentation fault
>
>
> ----
>
> #!/usr/bin/python
>
> from gi.repository import Clutter
>
> import os
>
> def main(image_directory):
> stage = Clutter.Stage()
> stage.set_size(1024, 768)
> stage.connect('destroy', Clutter.main_quit)
>
> stage.show()
> Clutter.main()
>
> if __name__ == '__main__':
> main("./images")
>
> ----
>
>
- Eric Colleu provided the updated fix for pyclutter-widgets. (see below) [a]
- That led me to this snippet for embedding clutter to VBox. [b]
https://gist.github.com/1759658
- I found a reference to the doctool so I am trying to generate the API docs.
https://live.gnome.org/GObjectIntrospection/Doctools
I have generated the xml file but yelp can't parse it and it just displays
as raw xml in a browser. Am I correct that no one has automated the
"python* API docs build and put them online yet?
-----
Fixed - simple example
-----
#!/usr/bin/python
from gi.repository import Clutter
import os
import sys
def do_quit(*args):
Clutter.main_quit()
def main(image_directory):
Clutter.init(sys.argv)
stage = Clutter.Stage()
stage.set_size(1024, 768)
stage.connect('destroy', do_quit)
stage.show()
Clutter.main()
if __name__ == '__main__':
main("./images")
----
-----
[b] Embed in VBox - GtkClutter
-----
from gi.repository import Gtk, Clutter, GtkClutter
def pressed(w, e):
print w, e
GtkClutter.init([])
window = Gtk.Window.new(Gtk.WindowType.TOPLEVEL)
vbox = Gtk.VBox.new(False, 6)
window.add(vbox)
vbox.show()
button = Gtk.Button("New BUtton")
vbox.pack_end(button, False, False, 0)
button.show()
window.connect("hide", Gtk.main_quit)
embed = GtkClutter.Embed.new()
vbox.pack_start(embed, True, True, 0)
embed.show()
embed.set_size_request(200, 200)
stage = embed.get_stage()
stage.set_color(Clutter.Color.new(0x00,0x00,0x00,0xff))
stage.show()
stage.connect("button-press-event", pressed)
window.show()
Gtk.main()
----
--
Patrick Shirkey
Boost Hardware Ltd
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list