From 49ac07a2ac78723b2b34a93ae20b8f0703116e09 Mon Sep 17 00:00:00 2001 From: Doyoun Kang Date: Thu, 24 May 2012 04:27:01 +0000 Subject: [PATCH] From: Doyoun Kang Subject: Re: [E-devel] [Patch] Add Ecore_X_Error_Code enumeration I added the Ecore_X_Error_Code enumeration which wraps X error codes. I think this will be useful when the X error occurs. SVN revision: 71379 --- legacy/ecore/ChangeLog | 4 +++ legacy/ecore/NEWS | 2 ++ legacy/ecore/src/lib/ecore_x/Ecore_X.h | 47 ++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/legacy/ecore/ChangeLog b/legacy/ecore/ChangeLog index ff50db993e..5046316800 100644 --- a/legacy/ecore/ChangeLog +++ b/legacy/ecore/ChangeLog @@ -658,3 +658,7 @@ * Add ecore_x_mouse_in_send() and ecore_x_mouse_out_send() * Add ecore_x illume access control/action atoms+api's + +2012-05-23 Doyoun Kang + + * Add Ecore_X_Error_Code enumeration in ecore_x diff --git a/legacy/ecore/NEWS b/legacy/ecore/NEWS index a45c526f46..aaec5d943d 100644 --- a/legacy/ecore/NEWS +++ b/legacy/ecore/NEWS @@ -6,6 +6,8 @@ Changes since Ecore 1.2.0: Additions: * ecore_evas: - Add transparency support on Windows (GDI engine only) + * ecore_x: + - Add Ecore_X_Error_Code enumeration Fixes: * ecore diff --git a/legacy/ecore/src/lib/ecore_x/Ecore_X.h b/legacy/ecore/src/lib/ecore_x/Ecore_X.h index 441610b1d1..308bcc4186 100644 --- a/legacy/ecore/src/lib/ecore_x/Ecore_X.h +++ b/legacy/ecore/src/lib/ecore_x/Ecore_X.h @@ -349,6 +349,53 @@ typedef enum _Ecore_X_Randr_Property_Change ECORE_X_RANDR_PROPERTY_CHANGE_DEL } Ecore_X_Randr_Property_Change; +/** + * @typedef _Ecore_X_Error_Code + * Defines the error codes of Ecore_X which wraps the X Window Systems + * protocol's errors. + * + * @since 1.3.0 + */ +typedef enum _Ecore_X_Error_Code +{ + /** Everything is okay. */ + ECORE_X_ERROR_CODE_SUCCESS = 0, + /** Bad request code */ + ECORE_X_ERROR_CODE_BAD_REQUEST = 1, + /** Int parameter out of range */ + ECORE_X_ERROR_CODE_BAD_VALUE = 2, + /** Parameter not a Window */ + ECORE_X_ERROR_CODE_BAD_WINDOW = 3, + /** Parameter not a Pixmap */ + ECORE_X_ERROR_CODE_BAD_PIXMAP = 4, + /** Parameter not an Atom */ + ECORE_X_ERROR_CODE_BAD_ATOM = 5, + /** Parameter not a Cursor */ + ECORE_X_ERROR_CODE_BAD_CURSOR = 6, + /** Parameter not a Font */ + ECORE_X_ERROR_CODE_BAD_FONT = 7, + /** Parameter mismatch */ + ECORE_X_ERROR_CODE_BAD_MATCH = 8, + /** Parameter not a Pixmap or Window */ + ECORE_X_ERROR_CODE_BAD_DRAWABLE = 9, + /** Bad access */ + ECORE_X_ERROR_CODE_BAD_ACCESS = 10, + /** Insufficient resources */ + ECORE_X_ERROR_CODE_BAD_ALLOC = 11, + /** No such colormap */ + ECORE_X_ERROR_CODE_BAD_COLOR = 12, + /** Parameter not a GC */ + ECORE_X_ERROR_CODE_BAD_GC = 13, + /** Choice not in range or already used */ + ECORE_X_ERROR_CODE_BAD_ID_CHOICE = 14, + /** Font or color name doesn't exist */ + ECORE_X_ERROR_CODE_BAD_NAME = 15, + /** Request length incorrect */ + ECORE_X_ERROR_CODE_BAD_LENGTH = 16, + /** Server is defective */ + ECORE_X_ERROR_CODE_BAD_IMPLEMENTATION = 17, +} Ecore_X_Error_Code; + typedef struct _Ecore_X_Event_Mouse_In Ecore_X_Event_Mouse_In; typedef struct _Ecore_X_Event_Mouse_Out Ecore_X_Event_Mouse_Out; typedef struct _Ecore_X_Event_Window_Focus_In Ecore_X_Event_Window_Focus_In;