Enlightenment CVS committal

Author  : xcomputerman
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_x


Modified Files:
        Ecore_X.h ecore_x_selection.c 


Log Message:
Some documentation


===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- Ecore_X.h   17 Jan 2004 00:14:37 -0000      1.25
+++ Ecore_X.h   17 Jan 2004 00:52:22 -0000      1.26
@@ -592,11 +592,11 @@
 int              ecore_x_error_request_get(void);
 int              ecore_x_error_code_get(void);
 
-int              ecore_x_selection_primary_set(Ecore_X_Window w, char *data, int len);
+int              ecore_x_selection_primary_set(Ecore_X_Window w, char *data, int 
size);
 int              ecore_x_selection_primary_clear(void);
-int              ecore_x_selection_secondary_set(Ecore_X_Window w, char *data, int 
len);
+int              ecore_x_selection_secondary_set(Ecore_X_Window w, char *data, int 
size);
 int              ecore_x_selection_secondary_clear(void);
-int              ecore_x_selection_clipboard_set(Ecore_X_Window w, char *data, int 
len);
+int              ecore_x_selection_clipboard_set(Ecore_X_Window w, char *data, int 
size);
 int              ecore_x_selection_clipboard_clear(void);
 void             ecore_x_selection_primary_request(Ecore_X_Window w, char *target);
 void             ecore_x_selection_secondary_request(Ecore_X_Window w, char *target);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_selection.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ecore_x_selection.c 17 Jan 2004 00:14:37 -0000      1.6
+++ ecore_x_selection.c 17 Jan 2004 00:52:22 -0000      1.7
@@ -55,6 +55,15 @@
    return;
 }
 
+/**
+ * Fetch the data returned by a PRIMARY selection request.
+ * @param buf A pointer to hold the selection data
+ * @param len The size of the data
+ *
+ * Get the converted data from a previous PRIMARY selection
+ * request. The buffer must be freed when done with.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
 void
 ecore_x_selection_primary_request_data_get(void **buf, int *len)
 {
@@ -62,6 +71,15 @@
                                        buf, len);
 }
 
+/**
+ * Fetch the data returned by a SECONDARY selection request.
+ * @param buf A pointer to hold the selection data
+ * @param len The size of the data
+ *
+ * Get the converted data from a previous SECONDARY selection
+ * request. The buffer must be freed when done with.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
 void
 ecore_x_selection_secondary_request_data_get(void **buf, int *len)
 {
@@ -69,6 +87,15 @@
                                        buf, len);
 }
 
+/**
+ * Fetch the data returned by a CLIPBOARD selection request.
+ * @param buf A pointer to hold the selection data
+ * @param len The size of the data
+ *
+ * Get the converted data from a previous CLIPBOARD selection
+ * request. The buffer must be freed when done with.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
 void
 ecore_x_selection_clipboard_request_data_get(void **buf, int *len)
 {
@@ -106,7 +133,7 @@
 }
 
 int 
-_ecore_x_selection_set(Window w, char *data, int len, Atom selection)
+_ecore_x_selection_set(Window w, char *data, int size, Atom selection)
 {
    int in;
    char *buf = NULL;
@@ -126,11 +153,11 @@
    {
       selections[in].win = w;
       selections[in].selection = selection;
-      selections[in].length = len;
+      selections[in].length = size;
       selections[in].time = _ecore_x_event_last_time;
       
-      buf = malloc(sizeof(char) * len);
-      memcpy(buf, data, sizeof(char) * len);
+      buf = malloc(size);
+      memcpy(buf, data, size);
       selections[in].data = buf;
    }
    else
@@ -142,41 +169,96 @@
       }
    }
    
-   /* ecore_x_window_prop_property_set(_ecore_x_disp, w, selection, 
-         XA_STRING, 8, data, len); */
    return 1;
 }
 
+/**
+ * Claim ownership of the PRIMARY selection and set its data.
+ * @param w    The window to which this selection belongs
+ * @param data The data associated with the selection
+ * @param size The size of the data buffer in bytes
+ * @return     Returns 1 if the ownership of the selection was successfully 
+ *             claimed, or 0 if unsuccessful.
+ *
+ * Get the converted data from a previous PRIMARY selection
+ * request. The buffer must be freed when done with.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
 int 
-ecore_x_selection_primary_set(Ecore_X_Window w, char *data, int len)
+ecore_x_selection_primary_set(Ecore_X_Window w, char *data, int size)
 {
-   return _ecore_x_selection_set(w, data, len, _ecore_x_atom_selection_primary);
+   return _ecore_x_selection_set(w, data, size, _ecore_x_atom_selection_primary);
 }
 
+/**
+ * Release ownership of the primary selection
+ * @return     Returns 1 if the selection was successfully cleared,
+ *             or 0 if unsuccessful.
+ *
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
 int 
 ecore_x_selection_primary_clear(void)
 {
    return _ecore_x_selection_set(None, NULL, 0, _ecore_x_atom_selection_primary);
 }
 
+/**
+ * Claim ownership of the SECONDARY selection and set its data.
+ * @param w    The window to which this selection belongs
+ * @param data The data associated with the selection
+ * @param size The size of the data buffer in bytes
+ * @return     Returns 1 if the ownership of the selection was successfully 
+ *             claimed, or 0 if unsuccessful.
+ *
+ * Get the converted data from a previous SECONDARY selection
+ * request. The buffer must be freed when done with.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
 int 
-ecore_x_selection_secondary_set(Ecore_X_Window w, char *data, int len)
+ecore_x_selection_secondary_set(Ecore_X_Window w, char *data, int size)
 {
-   return _ecore_x_selection_set(w, data, len, _ecore_x_atom_selection_secondary);
+   return _ecore_x_selection_set(w, data, size, _ecore_x_atom_selection_secondary);
 }
 
+/**
+ * Release ownership of the secondary selection
+ * @return     Returns 1 if the selection was successfully cleared,
+ *             or 0 if unsuccessful.
+ *
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
 int 
 ecore_x_selection_secondary_clear(void)
 {
    return _ecore_x_selection_set(None, NULL, 0, _ecore_x_atom_selection_secondary);
 }
 
+/**
+ * Claim ownership of the CLIPBOARD selection and set its data.
+ * @param w    The window to which this selection belongs
+ * @param data The data associated with the selection
+ * @param size The size of the data buffer in bytes
+ * @return     Returns 1 if the ownership of the selection was successfully 
+ *             claimed, or 0 if unsuccessful.
+ *
+ * Get the converted data from a previous CLIPBOARD selection
+ * request. The buffer must be freed when done with.
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
 int 
-ecore_x_selection_clipboard_set(Ecore_X_Window w, char *data, int len)
+ecore_x_selection_clipboard_set(Ecore_X_Window w, char *data, int size)
 {
-   return _ecore_x_selection_set(w, data, len, _ecore_x_atom_selection_clipboard);
+   return _ecore_x_selection_set(w, data, size, _ecore_x_atom_selection_clipboard);
 }
 
+/**
+ * Release ownership of the clipboard selection
+ * @return     Returns 1 if the selection was successfully cleared,
+ *             or 0 if unsuccessful.
+ *
+ * <hr><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ */
 int 
 ecore_x_selection_clipboard_clear(void)
 {




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to