SCIMBridge 0.4.x

common/scim-bridge-attribute.h

Go to the documentation of this file.
00001 /*
00002  * SCIM Bridge
00003  *
00004  * Copyright (c) 2006 Ryo Dairiki <ryo-dairiki@users.sourceforge.net>
00005  *
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation and 
00010  * appearing in the file LICENSE.LGPL included in the package of this file.
00011  * You can also redistribute it and/or modify it under the terms of 
00012  * the GNU General Public License as published by the Free Software Foundation and 
00013  * appearing in the file LICENSE.GPL included in the package of this file.
00014  *
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00018  */
00019 
00030 #ifndef SCIMBRIDGEATTRIBUTE_H_
00031 #define SCIMBRIDGEATTRIBUTE_H_
00032 
00033 #include "scim-bridge.h"
00034 
00035 enum _scim_bridge_attribute_type_t
00036 {
00037     ATTRIBUTE_NONE,
00038     ATTRIBUTE_DECORATE,
00039     ATTRIBUTE_FOREGROUND,
00040     ATTRIBUTE_BACKGROUND
00041 };
00042 
00046 typedef enum _scim_bridge_attribute_type_t scim_bridge_attribute_type_t;
00047 
00051 typedef unsigned int scim_bridge_attribute_value_t;
00052 
00056 typedef struct _ScimBridgeAttribute ScimBridgeAttribute;
00057 
00061 static const scim_bridge_attribute_value_t SCIM_BRIDGE_ATTRIBUTE_DECORATE_NONE = 0x1000000;
00062 
00066 static const scim_bridge_attribute_value_t SCIM_BRIDGE_ATTRIBUTE_DECORATE_UNDERLINE = 0x2000000;
00067 
00071 static const scim_bridge_attribute_value_t SCIM_BRIDGE_ATTRIBUTE_DECORATE_HIGHLIGHT = 0x4000000;
00072 
00076 static const scim_bridge_attribute_value_t SCIM_BRIDGE_ATTRIBUTE_DECORATE_REVERSE = 0x8000000;
00077 
00078 #ifdef __cplusplus
00079 extern "C"
00080 {
00081 #endif
00082 
00088     ScimBridgeAttribute *scim_bridge_alloc_attribute ();
00089 
00096     void scim_bridge_free_attribute (ScimBridgeAttribute *attribute);
00097 
00104     void scim_bridge_copy_attribute (ScimBridgeAttribute *dst, const ScimBridgeAttribute *src);
00105 
00113     boolean scim_bridge_attribute_equals (const ScimBridgeAttribute *atr1, const ScimBridgeAttribute *atr2);
00114 
00121     scim_bridge_attribute_type_t scim_bridge_attribute_get_type (const ScimBridgeAttribute *attribute);
00122 
00128     void scim_bridge_attribute_set_type (ScimBridgeAttribute *attribute, scim_bridge_attribute_type_t type);
00129 
00136     size_t scim_bridge_attribute_get_begin (const ScimBridgeAttribute *attribute);
00137 
00144     void scim_bridge_attribute_set_begin (ScimBridgeAttribute *attribute, size_t begin);
00145 
00152     size_t scim_bridge_attribute_get_end (const ScimBridgeAttribute *attribute);
00153 
00160     void scim_bridge_attribute_set_end (ScimBridgeAttribute *attribute, size_t end);
00161 
00168     scim_bridge_attribute_type_t scim_bridge_attribute_get_type (const ScimBridgeAttribute *attribute);
00169 
00176     void scim_bridge_attribute_set_type (ScimBridgeAttribute *attribute, scim_bridge_attribute_type_t type);
00177 
00186     scim_bridge_attribute_value_t scim_bridge_attribute_get_value (const ScimBridgeAttribute *attribute);
00187 
00196     void scim_bridge_attribute_set_value (ScimBridgeAttribute *attribute, scim_bridge_attribute_value_t value);
00197 
00208     void scim_bridge_attribute_set_color (ScimBridgeAttribute *attribute, unsigned int red, unsigned int green, unsigned int blue);
00209 
00218     unsigned int scim_bridge_attribute_get_red (const ScimBridgeAttribute *attribute);
00219 
00228     void scim_bridge_attribute_set_red (ScimBridgeAttribute *attribute, unsigned int red);
00229 
00238     unsigned int scim_bridge_attribute_get_green (const ScimBridgeAttribute *attribute);
00239 
00248     void scim_bridge_attribute_set_green (ScimBridgeAttribute *attribute, unsigned int green);
00249 
00258     unsigned int scim_bridge_attribute_get_blue (const ScimBridgeAttribute *attribute);
00259 
00268     void scim_bridge_attribute_set_blue (ScimBridgeAttribute *attribute, unsigned int blue);
00269 
00270 #ifdef __cplusplus
00271 }
00272 #endif
00273 #endif                                            /*SCIMBRIDGEATTRIBUTE_H_*/