X-Git-Url: http://git.maemo.org/git/?p=sdlhildon;a=blobdiff_plain;f=sdlhim%2Fsrc%2Fds.h;fp=sdlhim%2Fsrc%2Fds.h;h=58b6b0ab864c9d09806000bef8e40c2d4a8fe9dd;hp=0000000000000000000000000000000000000000;hb=4fed23fec414328a2135440d7a936e9b1604283f;hpb=effcd03c8ab831f04aee0b4ae836a5aef94da0fb diff --git a/sdlhim/src/ds.h b/sdlhim/src/ds.h new file mode 100644 index 0000000..58b6b0a --- /dev/null +++ b/sdlhim/src/ds.h @@ -0,0 +1,42 @@ +/* This file is part of SDL_him - SDL Hildon Input Method addon + * Copyright (C) 2010 Javier S. Pedro + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA or see . + */ + +#ifndef DS_H_ +#define DS_H_ + +/* A very simple dynamic string library, used internally for holding the + * preedit buffer. + */ + +#pragma GCC visibility push(hidden) + +typedef struct dstring +{ + unsigned long len; + unsigned long capacity; + char * str; +} dstring_t; + +void ds_clear(dstring_t *ds); +void ds_set(dstring_t *ds, const char *str); +void ds_append(dstring_t *ds, const char *str); + +#pragma GCC visibility pop + +#endif