summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean@guyomarch.bzh>2016-06-07 21:42:46 +0200
committerJean Guyomarc'h <jean@guyomarch.bzh>2016-06-07 22:20:31 +0200
commitf53a739e0e9ef3de824c549fa14e758e194e2dde (patch)
treef24f3e530d5ba39ea6c0e47d952122bec850981b /src/lib
parent7ada74abcdab74ee8d87f4405dea596ccdc86e73 (diff)
ecore_cocoa: simplify clipboard functions naming
ecore_cocoa_selection_clipboard_xxxx() have been renamed into ecore_cocoa_clipboard_xxxx() and they have nothing to do with selection, only with clipboard. Since the API is not stable yet, I can change it.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_cocoa/Ecore_Cocoa.h10
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa_cnp.m14
-rw-r--r--src/lib/elementary/elm_cnp.c6
3 files changed, 15 insertions, 15 deletions
diff --git a/src/lib/ecore_cocoa/Ecore_Cocoa.h b/src/lib/ecore_cocoa/Ecore_Cocoa.h
index a94785cee7..7f7ca6d9d8 100644
--- a/src/lib/ecore_cocoa/Ecore_Cocoa.h
+++ b/src/lib/ecore_cocoa/Ecore_Cocoa.h
@@ -472,7 +472,7 @@ EAPI Ecore_Cocoa_Object *ecore_cocoa_window_get(const Ecore_Cocoa_Window *window
472 * @param type 472 * @param type
473 * @return EINA_TRUE on success, EINA_FALSE on failure 473 * @return EINA_TRUE on success, EINA_FALSE on failure
474 */ 474 */
475EAPI Eina_Bool ecore_cocoa_selection_clipboard_set(const void *data, 475EAPI Eina_Bool ecore_cocoa_clipboard_set(const void *data,
476 int size, 476 int size,
477 Ecore_Cocoa_Cnp_Type type); 477 Ecore_Cocoa_Cnp_Type type);
478 478
@@ -487,15 +487,15 @@ EAPI Eina_Bool ecore_cocoa_selection_clipboard_set(const void *data,
487 * @c retrieved_types will contain ECORE_COCOA_CNP_TYPE_STRING and the data 487 * @c retrieved_types will contain ECORE_COCOA_CNP_TYPE_STRING and the data
488 * will be a C string (char*) that must be freed after use. 488 * will be a C string (char*) that must be freed after use.
489 */ 489 */
490EAPI void *ecore_cocoa_selection_clipboard_get(int *size, 490EAPI void *ecore_cocoa_clipboard_get(int *size,
491 Ecore_Cocoa_Cnp_Type type, 491 Ecore_Cocoa_Cnp_Type type,
492 Ecore_Cocoa_Cnp_Type *retrieved_types) 492 Ecore_Cocoa_Cnp_Type *retrieved_types)
493 EINA_WARN_UNUSED_RESULT; 493 EINA_WARN_UNUSED_RESULT;
494 494
495/** 495/**
496 * Deletes the contents of the Cocoa clipboard 496 * Deletes the contents of the Cocoa clipboard
497 */ 497 */
498EAPI void ecore_cocoa_selection_clipboard_clear(void); 498EAPI void ecore_cocoa_clipboard_clear(void);
499 499
500/** 500/**
501 * Set the Cocoa cursor for a given Cocoa window 501 * Set the Cocoa cursor for a given Cocoa window
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_cnp.m b/src/lib/ecore_cocoa/ecore_cocoa_cnp.m
index efe3cbdbef..da2db90aa0 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_cnp.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_cnp.m
@@ -10,9 +10,9 @@
10#import "ecore_cocoa_app.h" 10#import "ecore_cocoa_app.h"
11 11
12EAPI Eina_Bool 12EAPI Eina_Bool
13ecore_cocoa_selection_clipboard_set(const void *data, 13ecore_cocoa_clipboard_set(const void *data,
14 int size, 14 int size,
15 Ecore_Cocoa_Cnp_Type type) 15 Ecore_Cocoa_Cnp_Type type)
16{ 16{
17 NSMutableArray *objects; 17 NSMutableArray *objects;
18 NSString *str = nil; 18 NSString *str = nil;
@@ -62,9 +62,9 @@ ecore_cocoa_selection_clipboard_set(const void *data,
62 62
63 63
64EAPI void * 64EAPI void *
65ecore_cocoa_selection_clipboard_get(int *size, 65ecore_cocoa_clipboard_get(int *size,
66 Ecore_Cocoa_Cnp_Type type, 66 Ecore_Cocoa_Cnp_Type type,
67 Ecore_Cocoa_Cnp_Type *retrieved_types) 67 Ecore_Cocoa_Cnp_Type *retrieved_types)
68{ 68{
69 NSMutableArray *classes; 69 NSMutableArray *classes;
70 void *data; 70 void *data;
@@ -167,7 +167,7 @@ fail:
167} 167}
168 168
169EAPI void 169EAPI void
170ecore_cocoa_selection_clipboard_clear(void) 170ecore_cocoa_clipboard_clear(void)
171{ 171{
172 [[NSPasteboard generalPasteboard] clearContents]; 172 [[NSPasteboard generalPasteboard] clearContents];
173} 173}
diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 9e03260594..eafdffc411 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -4059,7 +4059,7 @@ _job_pb_cb(void *data)
4059 4059
4060 /* Pass to cocoa clipboard */ 4060 /* Pass to cocoa clipboard */
4061 type = _elm_sel_format_to_ecore_cocoa_cnp_type(sel->requestformat); 4061 type = _elm_sel_format_to_ecore_cocoa_cnp_type(sel->requestformat);
4062 pbdata = ecore_cocoa_selection_clipboard_get(&pbdata_len, type, &get_type); 4062 pbdata = ecore_cocoa_clipboard_get(&pbdata_len, type, &get_type);
4063 4063
4064 ddata.format = ELM_SEL_FORMAT_NONE; 4064 ddata.format = ELM_SEL_FORMAT_NONE;
4065 if (get_type & ECORE_COCOA_CNP_TYPE_STRING) 4065 if (get_type & ECORE_COCOA_CNP_TYPE_STRING)
@@ -4123,7 +4123,7 @@ _cocoa_elm_cnp_selection_set(Ecore_Cocoa_Window *win,
4123 sel->selbuf[buflen] = 0; 4123 sel->selbuf[buflen] = 0;
4124 sel->buflen = buflen; 4124 sel->buflen = buflen;
4125 type = _elm_sel_format_to_ecore_cocoa_cnp_type(format); 4125 type = _elm_sel_format_to_ecore_cocoa_cnp_type(format);
4126 ecore_cocoa_selection_clipboard_set(selbuf, buflen, type); 4126 ecore_cocoa_clipboard_set(selbuf, buflen, type);
4127 } 4127 }
4128 4128
4129 return ok; 4129 return ok;
@@ -4160,7 +4160,7 @@ _cocoa_elm_cnp_selection_clear(Evas_Object *obj EINA_UNUSED,
4160 sel->loss_data = NULL; 4160 sel->loss_data = NULL;
4161 ELM_SAFE_FREE(sel->selbuf, free); 4161 ELM_SAFE_FREE(sel->selbuf, free);
4162 sel->buflen = 0; 4162 sel->buflen = 0;
4163 ecore_cocoa_selection_clipboard_clear(); 4163 ecore_cocoa_clipboard_clear();
4164 4164
4165 return EINA_TRUE; 4165 return EINA_TRUE;
4166} 4166}