How to use the etk.Embed function in etk

To help you get started, we’ve selected a few etk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github drf / amsn2 / amsn2 / gui / efl.py View on Github external
raise SystemExit("error loading %s: %s" % (THEME_FILE, e))

        self._edje.size = self._evas.size
        self._evas.data["login_window"] = self._edje
        
        self._edje.on_key_down_add(self.__on_key_down)

        self.password = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.password)
        embed.show_all()
        self.password.password_mode = True
        self._edje.part_swallow("login_screen.password", embed.object)

        self.status = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.status)
        embed.show_all()
        self._edje.part_swallow("login_screen.status", embed.object)

        self.username = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.username)
        embed.show_all()
        self._edje.part_swallow("login_screen.username", embed.object)
        
        if self._edje.part_exists("login_screen.signin"):
           self.signin = etk.Button()
           embed = etk.Embed(self._evas.evas)
           embed.add(self.signin)
           embed.show_all()
           self._edje.part_swallow("login_screen.signin", embed.object)
github kakaroto / e17 / OLD / BINDINGS / python / python-etk / examples / 06-embed / 06-embed.py View on Github external
# Setup callback for resize
def resize_cb(ee):
    r = ee.evas.rect
    ee.data["edje"].size = r.size

ecore_evas.callback_resize = resize_cb

def item_cb(e):
    print "Item changed in combobox %s into item : %s" % (e, e.active_item)
    return True

ecore_evas.show()
edj.show()

embed1 = etk.Embed(ecore_evas.evas)
entry1 = etk.ComboboxEntry()
embed1.add(entry1)
embed1.show_all()
embed1.pointer_method_set(set_pointer, ecore_evas)
embed1.position_method_set(get_position, ecore_evas)

entry1.item_append("First item")
entry1.item_append("2 item")
entry1.item_append("last item")

embed2 = etk.Embed(ecore_evas.evas)
entry2 = etk.Entry()
entry2.password_mode = True
embed2.add(entry2)
embed2.show_all()
github kakaroto / e17 / OLD / BINDINGS / python / python-etk / examples / 06-embed / 06-embed.py View on Github external
ecore_evas.show()
edj.show()

embed1 = etk.Embed(ecore_evas.evas)
entry1 = etk.ComboboxEntry()
embed1.add(entry1)
embed1.show_all()
embed1.pointer_method_set(set_pointer, ecore_evas)
embed1.position_method_set(get_position, ecore_evas)

entry1.item_append("First item")
entry1.item_append("2 item")
entry1.item_append("last item")

embed2 = etk.Embed(ecore_evas.evas)
entry2 = etk.Entry()
entry2.password_mode = True
embed2.add(entry2)
embed2.show_all()

embed2.pointer_method_set(set_pointer, ecore_evas)

edj.part_swallow("entry1", embed1.object)
edj.part_swallow("entry2", embed2.object)

edj.focus = True


def text_changed(o):
    print "Text changed : %s - %s" % (o, o.text)
    return True
github kakaroto / e17 / OLD / BINDINGS / python / python-etk / examples / 06-embed / 06-embed.py View on Github external
def set_pointer(user_data, pointer):
    if pointer == etk.Embed.POINTER_NONE:
        user_data.x_window_cursor_shape_set(0)
    elif pointer == etk.Embed.POINTER_TEXT_EDIT:
        user_data.x_window_cursor_shape_set(ecore.x.ECORE_X_CURSOR_XTERM)
    else:
        user_data.x_window_cursor_shape_set(ecore.x.ECORE_X_CURSOR_LEFT_PTR)
github drf / amsn2 / amsn2 / gui / efl.py View on Github external
self.password = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.password)
        embed.show_all()
        self.password.password_mode = True
        self._edje.part_swallow("login_screen.password", embed.object)

        self.status = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.status)
        embed.show_all()
        self._edje.part_swallow("login_screen.status", embed.object)

        self.username = etk.Entry()
        embed = etk.Embed(self._evas.evas)
        embed.add(self.username)
        embed.show_all()
        self._edje.part_swallow("login_screen.username", embed.object)
        
        if self._edje.part_exists("login_screen.signin"):
           self.signin = etk.Button()
           embed = etk.Embed(self._evas.evas)
           embed.add(self.signin)
           embed.show_all()
           self._edje.part_swallow("login_screen.signin", embed.object)
           self.signin.label = "Sign in"
           self.signin.connect("clicked", self.__signin_button_cb)
        else:
           self._edje.signal_callback_add("signin", "*", self.__signin_cb)

        self._edje.focus = True