-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathfoxage2ch.idl
179 lines (145 loc) · 5.5 KB
/
foxage2ch.idl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#include "nsISupports.idl"
interface nsIVariant;
interface xdIFoxAge2chTreeView;
interface xdIFoxAge2chService;
[scriptable, uuid(37d5b1fd-34ae-406d-9300-a0ca790c1513)]
interface xdIFoxAge2chTreeView : nsISupports
{
/**
* ツリー上で現在選択している行に対応するアイテムを取得する
*/
readonly attribute nsIVariant currentItem;
/**
* ツリーのルートのアイテムIDを取得または変更する
*/
attribute ACString root;
/**
* ツリーのフィルタオブジェクトを取得または変更する
*/
attribute nsIVariant filter;
/**
* 表示データを再構築してツリーを再描画する
*/
void rebuildTree();
/**
* 指定したアイテムのツリー行を再描画する
*/
void redrawItem(in nsIVariant aItem);
/**
* nsITreeBoxObject::clearStyleAndImageCachesのラッパー
*/
void clearDrawingCaches();
/**
* 指定したツリー行番号のアイテムを選択する
*/
void selectIndex(in long aIndex);
/**
* 指定したツリー行番号のアイテムを取得する
*/
nsIVariant itemForTreeIndex(in long aIndex);
/**
* 指定したアイテムのツリー行番号を取得する
*/
long treeIndexForItem(in nsIVariant aItem);
/**
* ツリーのすべてのフォルダを開く/閉じる
* すべてのフォルダが閉じている場合、すべてのフォルダを開く。
* ひとつでも開いているフォルダがある場合、すべてのフォルダを閉じる。
* @param aForceClose true: 現在の開閉状態によらずすべてのフォルダを閉じる
*/
void toggleAllFolders(in boolean aForceClose);
/**
* 指定した行番号から下方向に次の区切りが出現するまでのアイテムの配列を取得する
*/
void getSeparatedRange(in long aStartIndex, out unsigned long aItemsCount,
[retval, array, size_is(aItemsCount)] out nsIVariant aItems);
};
[scriptable, uuid(19d6d8b4-bd62-45f2-b8fa-c4a58b0f9fbe)]
interface xdIFoxAge2chService : nsISupports
{
/**
* 指定したアイテムIDに対応するアイテムを取得する
* @param aItemId アイテムID。
* @returns アイテム。存在しない場合はnull。
*/
nsIVariant getItem(in ACString aItemId);
/**
* 指定したアイテムIDを親とするすべてのアイテムの配列を取得する
* @param aParentId 親のアイテムID。
* @returns 子のアイテムの配列。
*/
void getChildItems(in ACString aParentId, out unsigned long aItemsCount,
[retval, array, size_is(aItemsCount)] out nsIVariant aItems);
/**
* 新しいアイテムを追加する
* @param aNewItem 新たに生成したアイテム。
* @param aRefItem 追加する位置のアイテム。nullなら末尾へ追加する。
*/
void insertItem(in nsIVariant aNewItem, in nsIVariant aRefItem);
/**
* 指定したアイテム (板またはスレッド) をブラウザで開く
* @param aItem 開くアイテム。
* @param aInNewTab 新しいタブで開くかどうか。
* @param aInBackground バックグラウンドのタブで開くかどうか。
*/
void openItem(in nsIVariant aItem, in boolean aInNewTab, in boolean aInBackground);
/**
* 指定したアイテムのツリー上での位置を移動する
* @param aItem 移動するアイテム
* @param aRefItem 移動先の位置のアイテム。
*/
void moveItem(in nsIVariant aItem, in nsIVariant aRefItem);
/**
* 指定したアイテムを削除する
* 板を削除した場合、その板を親とするすべてのスレッドも削除する。
* @param aItem 削除するアイテム
*/
void removeItem(in nsIVariant aItem);
/**
* 指定したアイテムのプロパティを変更する
* @param aItem プロパティを変更するアイテム。
* @param aProperty 変更するプロパティ名。
* @param aValue 変更後の値。
*/
void changeItemProperty(in nsIVariant aItem, in ACString aProperty, in nsIVariant aValue);
/**
* アイテムに関連する統計データを更新する
* @param aItem アイテム
*/
void updateItemStats(in nsIVariant aItem);
/**
* 更新チェック
* @param aItemId 板のアイテムID。
* "root"ならすべての板の更新チェックをする。
* nullまたは指定無しの場合、更新チェックを停止する。
*/
void checkUpdates(in ACString aItemId);
/**
* 更新されたスレッドを開く
* @param aItemId 板のアイテムID。
* "root"ならすべての板の更新チェックをする。
* nullまたは指定無しの場合、更新チェックを停止する。
*/
void openUpdates(in ACString aItemId);
/**
* タイトル取得
* @param aItem 板またはスレッドのアイテムID。
*/
void fetchTitle(in nsIVariant aItem);
/**
* データファイルを再読み込みしてデータを更新する
* 「バックアップから復元」や「インポート」を実行した後にこのメソッドを呼び出す。
*/
void reloadData();
/**
* 指定したURLに対応する板またはスレッドを登録する
* @param aURL 板またはスレッドのURL
* @returns 新たに追加した板またはスレッドのアイテム。
*/
nsIVariant addFavorite(in ACString aURL);
/**
* コマンドの有効/無効状態を返す
* @param aCommand コマンド名。"cmd_checkUpdates", "cmd_openUpdates" のいずれか。
*/
PRBool isCommandEnabled(in ACString aCommand);
};