/*
* Copyright © 2012 Openismus GmbH
+ * Copyright © 2012 Intel Corporation
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
text_entry_create(struct editor *editor, const char *text)
{
struct text_entry *entry;
- struct wl_surface *surface;
entry = malloc(sizeof *entry);
- surface = window_get_wl_surface(editor->window);
-
entry->widget = editor->widget;
entry->window = editor->window;
entry->text = strdup(text);
entry->active = 0;
- entry->model = text_model_factory_create_text_model(editor->text_model_factory, surface);
+ entry->model = text_model_factory_create_text_model(editor->text_model_factory);
text_model_add_listener(entry->model, &text_model_listener, entry);
return entry;
<interface name="text_model_factory" version="1">
<request name="create_text_model">
<arg name="id" type="new_id" interface="text_model"/>
- <arg name="surface" type="object" interface="wl_surface"/>
</request>
</interface>
/*
* Copyright © 2012 Openismus GmbH
+ * Copyright © 2012 Intel Corporation
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
static void text_model_factory_create_text_model(struct wl_client *client,
struct wl_resource *resource,
- uint32_t id,
- struct wl_resource *surface)
+ uint32_t id)
{
struct input_method *input_method = resource->data;
struct text_model *text_model;
/*
- * Copyright © 2012 Openismus GmbH
+ * Copyright © 2012 Intel Corporation
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
char buf[64];
int len;
- display->text_model = text_model_factory_create_text_model(display->factory, display->surface);
+ display->text_model = text_model_factory_create_text_model(display->factory);
text_model_add_listener(display->text_model, &text_model_listener, display);
wl_display_flush(display->display);
/*
- * Copyright © 2012 Openismus GmbH
+ * Copyright © 2012 Intel Corporation
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided