~ubuntu-branches/ubuntu/maverick/blender/maverick

« back to all changes in this revision

Viewing changes to source/blender/blenkernel/BKE_suggestions.h

  • Committer: Bazaar Package Importer
  • Author(s): Khashayar Naderehvandi, Khashayar Naderehvandi, Alessio Treglia
  • Date: 2009-01-22 16:53:59 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090122165359-v0996tn7fbit64ni
Tags: 2.48a+dfsg-1ubuntu1
[ Khashayar Naderehvandi ]
* Merge from debian experimental (LP: #320045), Ubuntu remaining changes:
  - Add patch correcting header file locations.
  - Add libvorbis-dev and libgsm1-dev to Build-Depends.
  - Use avcodec_decode_audio2() in source/blender/src/hddaudio.c

[ Alessio Treglia ]
* Add missing previous changelog entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**     
 
2
 * $Id: $ 
 
3
 *
 
4
 * ***** BEGIN GPL LICENSE BLOCK *****
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU General Public License
 
8
 * as published by the Free Software Foundation; either version 2
 
9
 * of the License, or (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software Foundation,
 
18
 * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
19
 *
 
20
 * The Original Code is Copyright (C) 2008, Blender Foundation
 
21
 * All rights reserved.
 
22
 *
 
23
 * The Original Code is: all of this file.
 
24
 *
 
25
 * Contributor(s): none yet.
 
26
 *
 
27
 * ***** END GPL LICENSE BLOCK *****
 
28
 */
 
29
#ifndef BKE_SUGGESTIONS_H
 
30
#define BKE_SUGGESTIONS_H
 
31
 
 
32
#ifdef __cplusplus
 
33
extern "C" {
 
34
#endif
 
35
 
 
36
/* ****************************************************************************
 
37
Suggestions should be added in sorted order although a linear sorting method is
 
38
implemented. The list is then divided up based on the prefix provided by
 
39
update_suggestions:
 
40
 
 
41
Example:
 
42
  Prefix: ab
 
43
  aaa <-- first
 
44
  aab
 
45
  aba <-- firstmatch
 
46
  abb <-- lastmatch
 
47
  baa
 
48
  bab <-- last
 
49
**************************************************************************** */
 
50
 
 
51
struct Text;
 
52
 
 
53
typedef struct SuggItem {
 
54
        struct SuggItem *prev, *next;
 
55
        char *name;
 
56
        char type;
 
57
} SuggItem;
 
58
 
 
59
typedef struct SuggList {
 
60
        SuggItem *first, *last;
 
61
        SuggItem *firstmatch, *lastmatch;
 
62
        SuggItem *selected;
 
63
        int top;
 
64
} SuggList;
 
65
 
 
66
/* Free all text tool memory */
 
67
void free_texttools();
 
68
 
 
69
/* Used to identify which Text object the current tools should appear against */
 
70
void texttool_text_set_active(Text *text);
 
71
void texttool_text_clear();
 
72
short texttool_text_is_active(Text *text);
 
73
 
 
74
/* Suggestions */
 
75
void texttool_suggest_add(const char *name, char type);
 
76
void texttool_suggest_prefix(const char *prefix);
 
77
void texttool_suggest_clear();
 
78
SuggItem *texttool_suggest_first();
 
79
SuggItem *texttool_suggest_last();
 
80
void texttool_suggest_select(SuggItem *sel);
 
81
SuggItem *texttool_suggest_selected();
 
82
int *texttool_suggest_top();
 
83
 
 
84
/* Documentation */
 
85
void texttool_docs_show(const char *docs);
 
86
char *texttool_docs_get();
 
87
void texttool_docs_clear();
 
88
 
 
89
#ifdef __cplusplus
 
90
}
 
91
#endif
 
92
 
 
93
#endif