Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
bla = c.object_add(r)
print bla
def mover(obj):
(x, y) = c.child_position_get(bla)
c.move(bla, x + 1, y + 1)
return True
ecore.animator_add(mover, r)
def quit(obj):
etk.main_quit()
w.on_destroyed(quit)
etk.main()
print "%s -> z: %d pos: (%d, %d)" % (ev.__class__, ev.z, ev.widget[0], ev.widget[1])
return True
w.on_mouse_wheel(mouse_event_wheel)
def key_event(o, ev):
print "%s -> key: %s" % (ev.__class__, ev.keyname)
return True
w.on_key_down(key_event)
w.on_key_up(key_event)
def quit(obj):
etk.main_quit()
w.on_destroyed(quit)
etk.main()
def show_active_item(c):
print c.active_item.field_get(0)
ce.on_active_item_changed(show_active_item)
# Main
box = etk.VBox()
box.append(combo, etk.VBox.START, etk.VBox.FILL, 0)
box.append(ce, etk.VBox.END, etk.VBox.FILL, 0)
w = etk.Window(title="Hello World", size_request=(300, 200), child=box)
w.on_destroyed(lambda x: etk.main_quit())
w.show_all()
etk.main()
#!/usr/bin/python
import etk
icon = etk.Image()
icon.set_from_file('icon.png')
box = etk.VBox()
box.append(icon, etk.VBox.START, etk.VBox.FILL, 0)
w = etk.Window(title="Hello World", size_request=(300, 300), child=box)
w.on_destroyed(lambda x: etk.main_quit())
w.show_all()
etk.main()
print text
out_tb.insert(iter_out, text)
b.on_clicked(sendButton_cb)
def on_destroyed(obj):
etk.main_quit()
w.connect("destroyed", on_destroyed)
w.show_all()
w.resize(600,600)
v.position = 420
etk.main()
w = etk.Window(title="Button", size_request=(200, 200), child=b)
w.show_all()
def count(button):
global counter
counter += 1
b.label = msg % counter
print "button %s clicked" % button
return True
b.on_clicked(count)
def quit(obj):
etk.main_quit()
w.on_destroyed(quit)
etk.main()
def _size_request(self):
return (500, 500)
def _theme_signal_emit(self, signal, size_recalc):
print "signal=\"%s\" size_recalc=%d" % (signal, size_recalc)
new = MyButton(label="lalalla")
w = etk.Window(title="Hello World", child=new)
w.show_all()
def quit(obj):
etk.main_quit()
w.on_destroyed(quit)
etk.main()
dialog.pack_widget_in_action_area(show_hidden, etk.VBox.START, etk.VBox.NONE, 0)
dialog.pack_widget_in_action_area(is_save, etk.VBox.START, etk.VBox.NONE, 0)
open = dialog.button_add_from_stock(etk.c_etk.StockEnums.DOCUMENT_OPEN, 1)
close = dialog.button_add_from_stock(etk.c_etk.StockEnums.DIALOG_CLOSE, 2)
# Events catchers
select_multiple.connect("toggled", chk_btns, "multiple")
show_hidden.connect("toggled", chk_btns, "hidden")
is_save.connect("toggled", chk_btns, "save")
open.connect("clicked", print_selected)
close.connect("clicked", lambda x: etk.main_quit())
dialog.on_destroyed(lambda x: etk.main_quit())
dialog.show_all()
etk.main()
#!/usr/bin/python
import etk
l = etk.Label(text="Hello World", alignment=(0.5, 0.5))
w = etk.Window(title="Hello World", size_request=(200, 200), child=l)
w.show_all()
def quit(obj):
etk.main_quit()
w.on_destroyed(quit)
etk.main()
bla = c.object_add(r)
print bla
def mover(obj):
(x, y) = c.child_position_get(bla)
c.move(bla, x + 1, y + 1)
return True
ecore.animator_add(mover, r)
def quit(obj):
etk.main_quit()
w.on_destroyed(quit)
etk.main()