[imbus commit] r47 - trunk/imbus/src

0 views
Skip to first unread message

codesite...@google.com

unread,
Nov 23, 2007, 2:37:53 AM11/23/07
to imbus...@googlegroups.com
Author: james.su
Date: Thu Nov 22 23:36:53 2007
New Revision: 47

Modified:
trunk/imbus/src/im_component_info.c
trunk/imbus/src/im_component_info.h
trunk/imbus/src/im_properties.h
trunk/imbus/src/im_text.h

Log:
Rename comment to description of IMComponentInfo.


Modified: trunk/imbus/src/im_component_info.c
==============================================================================
--- trunk/imbus/src/im_component_info.c (original)
+++ trunk/imbus/src/im_component_info.c Thu Nov 22 23:36:53 2007
@@ -27,7 +27,7 @@
IMUInt32 unique_id;
IMString *string_id;
IMString *name;
- IMString *comment;
+ IMString *desc;
IMString *icon;
IMEventRoles *event_roles;
};
@@ -48,7 +48,7 @@
((IMComponentInfo*)info)->unique_id = 0;
((IMComponentInfo*)info)->string_id = 0;
((IMComponentInfo*)info)->name = 0;
- ((IMComponentInfo*)info)->comment = 0;
+ ((IMComponentInfo*)info)->desc = 0;
((IMComponentInfo*)info)->icon = 0;
((IMComponentInfo*)info)->event_roles = 0;
}
@@ -64,8 +64,8 @@
im_object_unref (p->string_id);
if (p->name)
im_object_unref (p->name);
- if (p->comment)
- im_object_unref (p->comment);
+ if (p->desc)
+ im_object_unref (p->desc);
if (p->icon)
im_object_unref (p->icon);
if (p->event_roles)
@@ -84,7 +84,7 @@
dp->unique_id = sp->unique_id;
dp->string_id = (sp->string_id ? im_object_ref (sp->string_id) : 0);
dp->name = (sp->name ? im_object_ref (sp->name) : 0);
- dp->comment = (sp->comment ? im_object_ref (sp->comment) : 0);
+ dp->desc = (sp->desc ? im_object_ref (sp->desc) : 0);
dp->icon = (sp->icon ? im_object_ref (sp->icon) : 0);
dp->event_roles = (sp->event_roles ? im_object_ref
(sp->event_roles) : 0);

@@ -120,8 +120,8 @@
if (!im_stream_put_void (sp))
return FALSE;
}
- if (cp->comment) {
- if (!im_stream_put_object (sp, cp->comment))
+ if (cp->desc) {
+ if (!im_stream_put_object (sp, cp->desc))
return FALSE;
} else {
if (!im_stream_put_void (sp))
@@ -192,14 +192,14 @@

type = im_stream_get_data_type (sp);
if (type == IM_TYPE_STRING) {
- cp->comment = im_object_ref (im_object_new (type));
- if (!im_stream_get_object (sp, cp->comment)) {
- im_object_unref (cp->comment);
- cp->comment = 0;
+ cp->desc = im_object_ref (im_object_new (type));
+ if (!im_stream_get_object (sp, cp->desc)) {
+ im_object_unref (cp->desc);
+ cp->desc = 0;
return FALSE;
}
} else if (type == IM_TYPE_VOID) {
- cp->comment = 0;
+ cp->desc = 0;
if (!im_stream_get_void (sp))
return FALSE;
}
@@ -282,14 +282,14 @@

IMComponentInfo*
im_component_info_new_full (IMString *string_id, IMString *name,
- IMString *comment, IMString *icon_file,
+ IMString *desc, IMString *icon_file,
IMEventRoles *event_roles)
{
IMComponentInfo *info;

_im_return_val_if_fail (IM_IS_STRING(string_id) || !string_id, 0);
_im_return_val_if_fail (IM_IS_STRING(name) || !name, 0);
- _im_return_val_if_fail (IM_IS_STRING(comment) || !comment, 0);
+ _im_return_val_if_fail (IM_IS_STRING(desc) || !desc, 0);
_im_return_val_if_fail (IM_IS_STRING(icon_file) || !icon_file, 0);
_im_return_val_if_fail (IM_IS_EVENT_ROLES(event_roles) ||
!event_roles, 0);

@@ -299,7 +299,7 @@

info->string_id = (string_id ? im_object_ref (string_id) : 0);
info->name = (name ? im_object_ref (name) : 0);
- info->comment = (comment ? im_object_ref (comment) : 0);
+ info->desc = (desc ? im_object_ref (desc) : 0);
info->icon = (icon_file ? im_object_ref (icon_file) : 0);
info->event_roles = (event_roles ? im_object_ref (event_roles) : 0);

@@ -359,22 +359,22 @@
}

void
-im_component_info_set_comment (IMComponentInfo *info, IMString *comment)
+im_component_info_set_description (IMComponentInfo *info, IMString *desc)
{
_im_return_if_fail (IM_IS_COMPONENT_INFO(info));
- _im_return_if_fail (IM_IS_STRING(comment) || !comment);
+ _im_return_if_fail (IM_IS_STRING(desc) || !desc);

- if (info->comment)
- im_object_unref (info->comment);
+ if (info->desc)
+ im_object_unref (info->desc);

- info->comment = (comment ? im_object_ref (comment) : 0);
+ info->desc = (desc ? im_object_ref (desc) : 0);
}

IMString*
-im_component_info_get_comment (IMComponentInfo *info)
+im_component_info_get_desc (IMComponentInfo *info)
{
_im_return_val_if_fail (IM_IS_COMPONENT_INFO(info), 0);
- return info->comment;
+ return info->desc;
}

void

Modified: trunk/imbus/src/im_component_info.h
==============================================================================
--- trunk/imbus/src/im_component_info.h (original)
+++ trunk/imbus/src/im_component_info.h Thu Nov 22 23:36:53 2007
@@ -17,12 +17,10 @@
* @brief IMComponentInfo class is used to hold various information of an
* IMBUS component.
*
- * IMComponent class shall consist the following kinds of data members
of a candidate phrase.
- *
* An IMComponentInfo object contains the following information of an IMBUS
* component:
*
- * - Unique ID: \n
+ * - Unique ID:
* type IMUInt32
* An unique id of the component.
* The default value of unique id is IM_EVENT_SOURCE_INVALID
@@ -32,17 +30,16 @@
* shall have unique string IDs, unless the string ID is empty.
* In order to make the string ID unique, UUID or URL like string
can be used
* as string ID, such as "org.imbus.storage.file".
- * - Human readable name (IMString, UTF-8 encoding)
- * Name of the component that will be shown to user.
- * - Human readable comment (IMString, UTF-8 encoding)
- * Comment of the component that will be shown to user.
+ * - Human readable names for specific languages (IMString, UTF-8 encoding)
+ * Names of the component in specific languages.
+ * - Human readable descriptions for specific languages (IMString,
UTF-8 encoding)
+ * Descriptions of the component in specific languages.
* - Path to an icon file
* Icon file of the component that will be shown to user.
* - IMEventRoles
* An IMEventRoles object containing event roles supported by the component.
+ * - A list of language tags supported by the specified IMBUS component.
*
- * The data members in IMComponentInfo instance shall only be set
by ... methods.
- * The default value of those data members not even set once by
avobe methods are NIL
*/

IM_BEGIN_DECLS
@@ -76,7 +73,7 @@
* @param name Human readable name of the component, must be in UTF-8
* encoding. The ownership of this object will be
assumed by
* the newly created IMComponentInfo object.
- * @param comment Human readable comment of the component, must be
in UTF-8
+ * @param desc Human readable description of the component,
must be in UTF-8
* encoding. The ownership of this object will be
assumed by
* the newly created IMComponentInfo object.
* @param icon_file Path to icon file of the component. The
ownership of this
@@ -90,7 +87,7 @@
*/
IMComponentInfo* im_component_info_new_full (IMString
*string_id,
IMString
*name,
- IMString
*comment,
+ IMString
*desc,
IMString
*icon_file,
IMEventRoles
*event_roles);

@@ -174,32 +171,32 @@
IMString* im_component_info_get_name (IMComponentInfo
*info);

/**
- * @brief Sets component's human readable comment stored in a specified
+ * @brief Sets component's human readable description stored in a specified
* IMComponentInfo object to a specified value.
*
- * @param info Pointer to an IMComponentInfo object, for which the comment
+ * @param info Pointer to an IMComponentInfo object, for which the description
* will be set.
- * @param comment An IMString object contains the new human readable comment.
+ * @param desc An IMString object contains the new human readable description.
* The ownership of this object will be assumed by the
* specified IMComponentInfo object.
*/
-void im_component_info_set_comment (IMComponentInfo
*info,
- IMString
*comment);
+void im_component_info_set_description(IMComponentInfo
*info,
+ IMString
*desc);

/**
- * @brief Gets component's human readable comment stored in a specified
+ * @brief Gets component's human readable description stored in a specified
* IMComponentInfo object.
*
- * @param info Pointer to an IMComponentInfo object, of which the comment
+ * @param info Pointer to an IMComponentInfo object, of which the description
* will be returned.
- * @return The component's human readable comment stored in the specified
+ * @return The component's human readable description stored in the specified
* IMComponentInfo object.
* The returned IMString object is owned by the specified
* IMComponentInfo object, if caller wants to keep the returned
* object, a reference of the object must be assumed by the caller.
* Caller shall not change the value of returned object.
*/
-IMString* im_component_info_get_comment (IMComponentInfo
*info);
+IMString* im_component_info_get_description(IMComponentInfo
*info);

/**
* @brief Sets component's icon file stored in a specified IMComponentInfo

Modified: trunk/imbus/src/im_properties.h
==============================================================================
--- trunk/imbus/src/im_properties.h (original)
+++ trunk/imbus/src/im_properties.h Thu Nov 22 23:36:53 2007
@@ -33,7 +33,7 @@
*
* A property contains the following elements:
* - Key
- * type: const char*
+ * type: IMString*
* An unique string key to identify the property.
* A separator property should have an unique string key as well,
* so that it can be manipulated by IMPropList object.
@@ -43,7 +43,7 @@
* the screen.
* It doesn't apply to separator property.
* - Icon
- * type: const char*
+ * type: IMString*
* An icon file which will be displayed on the screen along
* with label. A URI shall be used here, and file URI shall be
supported by
* default. Other kind of URIs are optional.

Modified: trunk/imbus/src/im_text.h
==============================================================================
--- trunk/imbus/src/im_text.h (original)
+++ trunk/imbus/src/im_text.h Thu Nov 22 23:36:53 2007
@@ -554,7 +554,7 @@
* @return This function compares the two strings text1 and text2. It returns
* an integer less than, equal to, or greater than zero if
text1 is found,
* respectively, to be less than, to match, or be greater than text2.
- */
+ */
IMInt im_text_compare (const IMText *text1,
const IMText *text2);
/**

Reply all
Reply to author
Forward
0 new messages