#include <Elementary.h>
typedef struct
{
} App_Data;
typedef struct
{
int size;
int vsize;
int width, height;
const char *emo;
App_Data *ad;
} App_Inwin_Data;
static void
{
}
static void
{
App_Inwin_Data *aid = data;
}
static char *
{
return strdup(data);
}
_emo_content_get(
void *data,
Evas_Object *obj,
const char *part)
{
if (strcmp(part, "elm.swallow.icon"))
return NULL;
{
fprintf(stderr, "Failed to set layout");
return NULL;
}
return o;
}
static void
{
free(data);
}
_page_grid_add(
Evas_Object *parent, App_Inwin_Data *aid)
{
char *theme, *emo;
if (!theme) return NULL;
free(theme);
if (!emos) return NULL;
{
char name[512];
if (strncmp(emo, "elm/entry/emoticon/", 19))
continue;
sscanf(emo, "elm/entry/emoticon/%[^/]/default", name);
}
return grid;
}
static void
{
App_Inwin_Data *aid = data;
const char *size[] = {
"size",
"absize",
"relsize"
};
const char *vsize[] = {
"full",
"ascent"
};
char buf[512];
snprintf(buf, sizeof(buf), "<item %s=%dx%d vsize=%s href=emoticon/%s>"
"</item>", size[aid->size], aid->width, aid->height,
vsize[aid->vsize], aid->emo);
_edit_buffer_insert(aid->ad->edit_buffer, buf);
}
static void
{
App_Inwin_Data *aid = data;
aid->width = atoi(elm_object_text_get(obj));
}
static void
{
App_Inwin_Data *aid = data;
aid->height = atoi(elm_object_text_get(obj));
}
_page_settings_add(
Evas_Object *parent, App_Inwin_Data *aid)
{
Evas_Object *box, *sizeopts, *box2, *sizebox, *vsizebox,
*rsize, *rabsize, *rrelsize, *rvfull, *rvascent,
*fwidth, *ewidth, *fheight, *eheight,
*binsert;
char buf[100];
.rejected = NULL
};
.max_byte_count = 0
};
elm_object_text_set(sizeopts, "Size");
elm_object_content_set(sizeopts, box2);
elm_object_text_set(rsize, "Scale adjusted (size)");
elm_object_text_set(rabsize, "Absolute size (absize)");
elm_object_text_set(rrelsize, "Relative to line (relsize)");
elm_object_text_set(rvfull, "Full height (vsize=full)");
elm_object_text_set(rvascent, "Ascent only (vsize=ascent)");
elm_object_text_set(fwidth, "Width");
snprintf(buf, sizeof(buf), "%d", aid->width);
&accept_set);
&limit_size);
elm_object_text_set(ewidth, buf);
elm_object_content_set(fwidth, ewidth);
elm_object_text_set(fheight, "Height");
snprintf(buf, sizeof(buf), "%d", aid->height);
&accept_set);
&limit_size);
elm_object_text_set(eheight, buf);
elm_object_content_set(fheight, eheight);
elm_object_text_set(binsert, "Insert");
return box;
}
static void
{
App_Inwin_Data *aid = data;
}
static void
{
free(data);
}
static void
{
App_Data *ad = data;
App_Inwin_Data *aid;
aid = calloc(1, sizeof(App_Inwin_Data));
if (!aid) return;
aid->ad = ad;
aid->size = 1;
aid->vsize = 1;
aid->width = 64;
aid->height = 64;
aid);
o = _page_grid_add(ad->win, aid);
elm_naviframe_item_simple_push(naviframe, o);
aid->grid = o;
o = _page_settings_add(ad->win, aid);
elm_naviframe_item_simple_push(naviframe, o);
aid->settings = o;
elm_object_text_set(o, "Cancel");
aid->inwin = inwin;
aid->naviframe = naviframe;
}
static void
{
App_Data *ad = data;
char fmt_open[5], fmt_close[6];
const char *sel;
int cursor;
char *s;
const char *ptr, *what;
sel = elm_object_text_get(obj);
snprintf(fmt_open, sizeof(fmt_open), "<%s>", sel);
snprintf(fmt_close, sizeof(fmt_close), "</%s>", sel);
if (!sel || !sel[0])
{
goto all_done;
}
what = fmt_open;
ptr = sel;
while ((s = strstr(ptr, what)))
{
ptr = s + strlen(what);
if (what == fmt_open) what = fmt_close;
else what = fmt_open;
}
if (what == fmt_close)
{
if (sel)
{
}
}
all_done:
}
static void
{
App_Data *ad = data;
}
static void
{
int current_cursor;
{
const char *content;
break;
if (content && (content[0] == ' '))
break;
}
return;
{
const char *content;
break;
if (content && (content[0] == ' '))
break;
}
}
static void
{
}
EAPI_MAIN int
{
App_Data app;
memset(&app, 0, sizeof(app));
elm_object_text_set(o, "Autosave");
elm_object_text_set(o, "b");
elm_object_text_set(o, "em");
icon, "entry", "emoticon/haha", "default"))
fprintf(stderr, "Failed to set layout");
app.win = win;
app.edit_buffer = en;
NULL);
NULL);
return 0;
}
#define EVAS_HINT_EXPAND
Use with evas_object_size_hint_weight_set(), evas_object_size_hint_weight_get(), evas_object_size_hin...
Definition: Evas_Common.h:297
@ EVAS_CALLBACK_DEL
Object Being Deleted (called before Free)
Definition: Evas_Common.h:439
#define EVAS_HINT_FILL
Use with evas_object_size_hint_align_set(), evas_object_size_hint_align_get(), evas_object_size_hint_...
Definition: Evas_Common.h:298
void edje_file_collection_list_free(Eina_List *lst)
Frees file collection list.
Definition: edje_load.c:195
Eina_List * edje_file_collection_list(const char *file)
Gets a list of groups in an edje file.
Definition: edje_load.c:175
#define EINA_LIST_FOREACH(list, l, _data)
Definition for the macro to iterate over a list.
Definition: eina_list.h:1415
EINA_API Eina_Strbuf * eina_strbuf_new(void)
Creates a new string buffer.
EINA_API void eina_strbuf_free(Eina_Strbuf *buf)
Frees a string buffer.
EINA_API Eina_Bool eina_strbuf_append(Eina_Strbuf *buf, const char *str)
Appends a string to a buffer, reallocating as necessary.
#define eina_strbuf_replace_first(buf, str, with)
Replaces the first occurrence of a substring with another string.
Definition: eina_strbuf.h:609
EINA_API const char * eina_strbuf_string_get(const Eina_Strbuf *buf)
Retrieves a pointer to the contents of a string buffer.
#define EINA_TRUE
boolean value TRUE (numerical value 1)
Definition: eina_types.h:539
#define EINA_FALSE
boolean value FALSE (numerical value 0)
Definition: eina_types.h:533
unsigned char Eina_Bool
Type to mimic a boolean.
Definition: eina_types.h:527
#define EINA_UNUSED
Used to indicate that a function parameter is purposely unused.
Definition: eina_types.h:339
void elm_box_horizontal_set(Elm_Box *obj, Eina_Bool horizontal)
Set the horizontal orientation.
Definition: elm_box_eo.legacy.c:27
Evas_Object * elm_box_add(Evas_Object *parent)
Add a new box to the parent.
Definition: elm_box.c:363
void elm_box_pack_end(Elm_Box *obj, Efl_Canvas_Object *subobj)
Add an object at the end of the pack list.
Definition: elm_box_eo.legacy.c:57
Eina_Bool elm_check_state_get(const Evas_Object *obj)
Get the state of the check object.
Definition: efl_ui_check.c:381
Evas_Object * elm_check_add(Evas_Object *parent)
Add a new Check object.
Definition: efl_ui_check.c:516
void elm_check_state_set(Evas_Object *obj, Eina_Bool state)
Set the on/off state of the check object.
Definition: efl_ui_check.c:372
void elm_entry_cursor_selection_end(Elm_Entry *obj)
This ends a selection within the entry as though the user had just released the mouse button while ma...
Definition: elm_entry_eo.legacy.c:513
void elm_entry_cursor_pos_set(Elm_Entry *obj, int pos)
Sets the cursor position in the entry to the given value.
Definition: elm_entry_eo.legacy.c:255
void elm_entry_markup_filter_append(Elm_Entry *obj, Elm_Entry_Filter_Cb func, void *data)
Append a markup filter function for text inserted in the entry.
Definition: elm_entry_eo.legacy.c:543
void elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text)
Filter inserted text based on accepted or rejected sets of characters.
Definition: elm_entry.c:4926
const char * elm_entry_selection_get(const Elm_Entry *obj)
Get any selected text within the entry.
Definition: elm_entry_eo.legacy.c:351
void elm_entry_cursor_line_end_set(Elm_Entry *obj)
This moves the cursor to the end of the current line.
Definition: elm_entry_eo.legacy.c:273
void elm_entry_cursor_end_set(Elm_Entry *obj)
This moves the cursor to the end of the entry.
Definition: elm_entry_eo.legacy.c:315
Eina_Bool elm_entry_cursor_is_visible_format_get(const Elm_Entry *obj)
Get if the current cursor position holds a visible format node.
Definition: elm_entry_eo.legacy.c:357
int elm_entry_cursor_pos_get(const Elm_Entry *obj)
Get the current position of the cursor in the entry.
Definition: elm_entry_eo.legacy.c:261
Eina_Bool elm_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format)
This sets the file (and implicitly loads it) for the text to display and then edit.
Definition: elm_entry.c:5054
void elm_entry_cursor_begin_set(Elm_Entry *obj)
This moves the cursor to the beginning of the entry.
Definition: elm_entry_eo.legacy.c:303
Eina_Bool elm_entry_cursor_prev(Elm_Entry *obj)
This moves the cursor one place to the left within the entry.
Definition: elm_entry_eo.legacy.c:375
void elm_entry_single_line_set(Elm_Entry *obj, Eina_Bool single_line)
Sets the entry to single line mode.
Definition: elm_entry_eo.legacy.c:123
void elm_entry_file_save(Elm_Entry *obj)
This function writes any changes made to the file set with elm_entry_file_set.
Definition: elm_entry_eo.legacy.c:423
void elm_entry_select_none(Elm_Entry *obj)
This drops any existing text selection within the entry.
Definition: elm_entry_eo.legacy.c:495
void elm_entry_cursor_selection_begin(Elm_Entry *obj)
This begins a selection within the entry as though the user were holding down the mouse button to mak...
Definition: elm_entry_eo.legacy.c:411
Eina_Bool elm_entry_cursor_next(Elm_Entry *obj)
This moves the cursor one place to the right within the entry.
Definition: elm_entry_eo.legacy.c:489
void elm_entry_entry_insert(Elm_Entry *obj, const char *entry)
Inserts the given text into the entry at the current cursor position.
Definition: elm_entry_eo.legacy.c:465
void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text)
Filter inserted text based on user defined character and byte limits.
Definition: elm_entry.c:4866
char * elm_entry_cursor_content_get(const Elm_Entry *obj)
Get the character pointed by the cursor at its current position.
Definition: elm_entry_eo.legacy.c:345
void elm_entry_autosave_set(Elm_Entry *obj, Eina_Bool auto_save)
This sets the entry object to 'autosave' the loaded text file or not.
Definition: elm_entry_eo.legacy.c:159
void elm_entry_cursor_line_begin_set(Elm_Entry *obj)
This moves the cursor to the beginning of the current line.
Definition: elm_entry_eo.legacy.c:309
Evas_Object * elm_entry_add(Evas_Object *parent)
This adds an entry to parent object.
Definition: elm_entry.c:4184
void elm_object_focus_set(Evas_Object *obj, Eina_Bool focus)
Set/unset focus to a given Elementary object.
Definition: elm_focus_legacy.c:374
Evas_Object * elm_frame_add(Evas_Object *parent)
Add a new frame to the parent.
Definition: efl_ui_frame.c:274
void elm_object_part_content_set(Evas_Object *obj, const char *part, Evas_Object *content)
Set the content on part of a given container widget.
Definition: elm_main.c:1562
Eo Elm_Object_Item
An Elementary Object item handle.
Definition: elm_object_item.h:6
#define ELM_MAIN()
macro to be used after the elm_main() function
Definition: elm_general.h:556
void * elm_object_item_data_get(const Elm_Object_Item *it)
Get the data associated with an object item.
Definition: efl_ui_widget.c:3796
Eina_Bool elm_policy_set(unsigned int policy, int value)
Set a new policy's value (for a given policy group/identifier).
Definition: elm_main.c:1380
void elm_run(void)
Run Elementary's main loop.
Definition: elm_main.c:1357
@ ELM_TEXT_FORMAT_MARKUP_UTF8
Markup UTF8 type.
Definition: elm_general.h:328
@ ELM_POLICY_QUIT_LAST_WINDOW_CLOSED
quit when the application's last window is closed
Definition: elm_general.h:248
@ ELM_POLICY_QUIT
under which circumstances the application should quit automatically.
Definition: elm_general.h:227
Elm_Widget_Item * elm_gengrid_item_append(Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data)
Append a new item in a given gengrid widget.
Definition: elm_gengrid_eo.legacy.c:189
void elm_gengrid_item_class_free(Elm_Gengrid_Item_Class *itc)
Remove an item class in a given gengrid widget.
Definition: elm_gengrid.c:5424
Evas_Object * elm_gengrid_add(Evas_Object *parent)
Add a new gengrid widget to the given parent Elementary (container) object.
Definition: elm_gengrid.c:4254
Elm_Gengrid_Item_Class * elm_gengrid_item_class_new(void)
Add a new gengrid item class in a given gengrid widget.
Definition: elm_gengrid.c:5409
void elm_gengrid_item_size_set(Elm_Gengrid *obj, int w, int h)
Set the size for the items of a given gengrid widget.
Definition: elm_gengrid_eo.legacy.c:93
Evas_Object * elm_win_inwin_add(Evas_Object *parent)
Adds an inwin to the current window.
Definition: elm_inwin.c:50
void elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
Set the content of an inwin object.
Definition: elm_inwin.c:93
Evas_Object * elm_layout_add(Evas_Object *parent)
Add a new layout to the parent.
Definition: efl_ui_layout.c:3067
Eina_Bool elm_layout_theme_set(Evas_Object *obj, const char *klass, const char *group, const char *style)
Set the edje group from the elementary theme that will be used as layout.
Definition: efl_ui_layout.c:3400
Evas_Object * elm_naviframe_add(Evas_Object *parent)
Add a new Naviframe object to the parent.
Definition: elc_naviframe.c:1605
void elm_naviframe_item_simple_promote(Elm_Naviframe *obj, Efl_Canvas_Object *content)
Simple version of item_promote.
Definition: elm_naviframe_eo.legacy.c:75
Evas_Object * elm_radio_add(Evas_Object *parent)
Add a new radio to the parent.
Definition: efl_ui_radio.c:401
void elm_radio_group_add(Efl_Ui_Radio *obj, Efl_Ui_Radio *group)
Add this radio to a group of other radio objects.
Definition: efl_ui_radio.c:465
void elm_radio_state_value_set(Efl_Ui_Radio *obj, int value)
Set the integer value that this radio object represents.
Definition: efl_ui_radio_eo.legacy.c:3
void elm_radio_value_pointer_set(Efl_Ui_Radio *obj, int *valuep)
Set a convenience pointer to an integer, which changes when radio group value changes.
Definition: efl_ui_radio.c:428
char * elm_theme_list_item_path_get(const char *f, Eina_Bool *in_search_path)
Return the full path for a theme element.
Definition: elm_theme.c:884
Evas_Object * elm_win_util_standard_add(const char *name, const char *title)
Adds a window object with standard setup.
Definition: efl_ui_win.c:9582
void elm_win_resize_object_add(Eo *obj, Evas_Object *subobj)
Add subobj as a resize object of window obj.
Definition: efl_ui_win.c:8997
void elm_win_autodel_set(Eo *obj, Eina_Bool autodel)
Set the window's autodel state.
Definition: efl_ui_win.c:6194
Eo Evas
An opaque handle to an Evas canvas.
Definition: Evas_Common.h:163
EVAS_API void evas_object_show(Evas_Object *eo_obj)
Makes the given Evas object visible.
Definition: evas_object_main.c:1814
EVAS_API void evas_object_del(Evas_Object *obj)
Marks the given Evas object for deletion (when Evas will free its memory).
Definition: evas_object_main.c:928
EVAS_API void evas_object_event_callback_add(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
Add (register) a callback function to a given Evas object event.
Definition: evas_callbacks.c:478
EVAS_API void evas_object_size_hint_weight_set(Evas_Object *obj, double x, double y)
Sets the hints for an object's weight.
Definition: evas_object_main.c:2638
Efl_Canvas_Object Evas_Object
An Evas Object handle.
Definition: Evas_Common.h:185
EVAS_API void evas_object_size_hint_align_set(Evas_Object *obj, double x, double y)
Sets the hints for an object's alignment.
Definition: evas_object_main.c:2650
EVAS_API void evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
Changes the size of the given Evas object.
Definition: evas_object_main.c:1236
EVAS_API void evas_object_smart_callback_add(Evas_Object *eo_obj, const char *event, Evas_Smart_Cb func, const void *data)
Add (register) a callback function to the smart event specified by event on the smart object obj.
Definition: evas_object_smart.c:1040
Type for a generic double linked list.
Definition: eina_list.h:318
String buffer to facilitate string operations.
Definition: eina_strbuf_common.h:15
Data for the elm_entry_filter_accept_set() entry filter.
Definition: elm_entry_common.h:228
const char * accepted
Set of characters accepted in the entry.
Definition: elm_entry_common.h:229
Data for the elm_entry_filter_limit_size() entry filter.
Definition: elm_entry_common.h:184
int max_char_count
The maximum number of characters allowed.
Definition: elm_entry_common.h:185
Elm_Gen_Item_Del_Cb del
Deletion class function for genlist/gengrid item classes.
Definition: elm_gen.h:102
Elm_Gen_Item_Content_Get_Cb content_get
Content fetching class function for genlist/gengrid item classes.
Definition: elm_gen.h:100
Elm_Gen_Item_Text_Get_Cb text_get
Text fetching class function for genlist/gengrid item classes.
Definition: elm_gen.h:99
Gengrid or Genlist item class definition.
Definition: elm_gen.h:109
Elm_Gen_Item_Class_Functions func
Set of callbacks.
Definition: elm_gen.h:126
const char * item_style
Name of the visual style to use for this item.
Definition: elm_gen.h:118