forked from enlightenment/efl
ecore_cocoa: move MARKUP outside of ecore_cocoa
the elementary MARKUP stuff requires ecore_cocoa to be linked to evas to find the function. However, ecore_XXXXX things should stay unrelated to evas in most cases. Thus this was not a good idea and created a circular dependency, this is fixed now. Differential Revision: https://phab.enlightenment.org/D6865
This commit is contained in:
parent
a5ee487f03
commit
28423160d6
|
@ -3610,8 +3610,6 @@ EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [ecore])
|
|||
EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [eo])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [efl])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [eina])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [evas])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [emile])
|
||||
|
||||
### Checks for header files
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#endif
|
||||
|
||||
#include <Eina.h>
|
||||
#include <Evas.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "ecore_cocoa_window.h"
|
||||
#include "ecore_cocoa_private.h"
|
||||
|
@ -29,16 +28,9 @@ ecore_cocoa_clipboard_set(const void *data,
|
|||
}
|
||||
if (type & ECORE_COCOA_CNP_TYPE_MARKUP)
|
||||
{
|
||||
char *utf8;
|
||||
|
||||
utf8 = evas_textblock_text_markup_to_utf8(NULL, (const char *)data);
|
||||
str = [[NSString alloc] initWithBytes: utf8
|
||||
length: strlen(utf8) // XXX strlen() ?
|
||||
encoding: NSUTF8StringEncoding];
|
||||
free(utf8);
|
||||
if (str)
|
||||
[objects addObject: str];
|
||||
WRN("Markup CNP: NOT IMPLEMENTED");
|
||||
}
|
||||
|
||||
if (type & ECORE_COCOA_CNP_TYPE_IMAGE)
|
||||
{
|
||||
WRN("Image CNP: NOT IMPLEMENTED");
|
||||
|
@ -79,8 +71,7 @@ ecore_cocoa_clipboard_get(int *size,
|
|||
|
||||
classes = [[NSMutableArray alloc] init];
|
||||
|
||||
if ((type & ECORE_COCOA_CNP_TYPE_STRING) ||
|
||||
(type & ECORE_COCOA_CNP_TYPE_MARKUP))
|
||||
if (type & ECORE_COCOA_CNP_TYPE_STRING)
|
||||
{
|
||||
string_class = YES;
|
||||
[classes addObject: [NSString class]];
|
||||
|
|
|
@ -3872,8 +3872,6 @@ _sel_format_to_ecore_cocoa_cnp_type(Efl_Selection_Format fmt)
|
|||
if ((fmt & EFL_SELECTION_FORMAT_TEXT) ||
|
||||
(fmt & EFL_SELECTION_FORMAT_VCARD))
|
||||
type |= ECORE_COCOA_CNP_TYPE_STRING;
|
||||
if (fmt & EFL_SELECTION_FORMAT_MARKUP)
|
||||
type |= ECORE_COCOA_CNP_TYPE_MARKUP;
|
||||
if (fmt & EFL_SELECTION_FORMAT_HTML)
|
||||
type |= ECORE_COCOA_CNP_TYPE_HTML;
|
||||
if (fmt & EFL_SELECTION_FORMAT_IMAGE)
|
||||
|
@ -3927,8 +3925,6 @@ _job_pb_cb(void *data)
|
|||
ddata.format = EFL_SELECTION_FORMAT_NONE;
|
||||
if (get_type & ECORE_COCOA_CNP_TYPE_STRING)
|
||||
ddata.format |= EFL_SELECTION_FORMAT_TEXT;
|
||||
if (get_type & ECORE_COCOA_CNP_TYPE_MARKUP)
|
||||
ddata.format |= EFL_SELECTION_FORMAT_MARKUP;
|
||||
if (get_type & ECORE_COCOA_CNP_TYPE_IMAGE)
|
||||
ddata.format |= EFL_SELECTION_FORMAT_IMAGE;
|
||||
if (get_type & ECORE_COCOA_CNP_TYPE_HTML)
|
||||
|
@ -3989,7 +3985,20 @@ _cocoa_efl_sel_manager_selection_set(Efl_Selection_Manager_Data *pd,
|
|||
evas_object_event_callback_add(sel->owner, EVAS_CALLBACK_DEL,
|
||||
_cocoa_sel_obj_del_cb, sel);
|
||||
ELM_SAFE_FREE(sel->data.mem, free);
|
||||
sel->data = eina_slice_dup(data);
|
||||
|
||||
if (format == EFL_SELECTION_FORMAT_MARKUP)
|
||||
{
|
||||
//FIXME this code assumes that sel->data.mem has a \0 at the end
|
||||
sel->data.mem = evas_textblock_text_markup_to_utf8(NULL, data.mem);
|
||||
sel->data.len = strlen(sel->data.mem);
|
||||
//set the new text
|
||||
format = EFL_SELECTION_FORMAT_TEXT;
|
||||
}
|
||||
else
|
||||
{
|
||||
sel->data = eina_slice_dup(data);
|
||||
}
|
||||
|
||||
if (sel->data.mem)
|
||||
{
|
||||
ecore_type = _sel_format_to_ecore_cocoa_cnp_type(format);
|
||||
|
|
Loading…
Reference in New Issue