• R/O
  • SSH
  • HTTPS

the-bbl: Commit


Commit MetaInfo

Révision125 (tree)
l'heure2008-01-21 18:00:35
Auteurhideyosi

Message de Log

グレー問題はこんなところかな???

Change Summary

Modification

--- The-BBL/trunk/haribote/bootpack.c (revision 124)
+++ The-BBL/trunk/haribote/bootpack.c (revision 125)
@@ -163,9 +163,12 @@
163163
164164 /* 各シートを初期状態にする*/
165165 sheet_slide(sht_back, 0, 0);
166-
167166 sheet_slide(sht_menu, 0, 0);
168167 sheet_slide(sht_mouse, mx, my);
168+ //システムシートをupdownしないように設定
169+ sht_back->is_updown = -1;
170+ sht_menu->is_updown = -1;
171+ sht_mouse->is_updown = -1;
169172
170173 sheet_updown(sht_back, 0);
171174 // sheet_updown(key_win, 1);
@@ -217,14 +220,24 @@
217220 /* sht_cons */
218221 key_win = open_console(shtctl, memtotal);
219222 sheet_slide(key_win, 32, 48);
220- sheet_uptop(key_win);
223+
221224 keywin_on(key_win);
222225
226+ sheet_uptop(key_win);
223227
224228
225229
230+ for (;;) {
231+ //----------------------------------------
232+ boxfill8(0xa0000,800,COL8_000000,8*22,16*0,8*60,16*1);
233+ sprintf(s,"top=%02d,mous=%02d,menu=%02d,tbar=%02d,back=%02d",shtctl->top,sht_mouse->height,sht_menu->height,tbar_sht->height,sht_back->height);
234+ putfonts8_asc(0xa0000,800,8*22,16*0,COL8_008484,s);
226235
227- for (;;) {
236+
237+ //----------------------------------------
238+
239+
240+
228241 if (fifo32_status(&keycmd) > 0 && keycmd_wait < 0) {
229242 /* キーボードコントローラに送るデータがあれば、送る */
230243 keycmd_wait = fifo32_get(&keycmd);
@@ -303,18 +316,24 @@
303316 task_sleep(task_a);
304317 io_sti();
305318 }
306- } else {
307- i = fifo32_get(&fifo);
319+ } else
320+ {
321+ i = fifo32_get(&fifo);
322+
323+ io_sti();
324+ if (key_win != 0 && key_win->flags == 0) /* ウィンドウが閉じられた */
325+ {
326+ if (shtctl->top == 3) /* もうマウスと背景しかない */
327+ {
328+ key_win = 0;
329+ }
330+ else
331+ {
332+ key_win = shtctl->sheets[shtctl->top - 3];
333+ keywin_on(key_win);
334+ }
335+ }
308336
309- io_sti();
310- if (key_win != 0 && key_win->flags == 0) { /* ウィンドウが閉じられた */
311- if (shtctl->top == 1) { /* もうマウスと背景しかない */
312- key_win = 0;
313- } else {
314- key_win = shtctl->sheets[shtctl->top - 1];
315- keywin_on(key_win);
316- }
317- }
318337 if (256 <= i && i <= 511) { /* キーボードデータ */
319338 if (i < 0x80 + 256) { /* キーコードを文字コードに変換 */
320339 if (key_shift == 0) {
@@ -445,8 +464,8 @@
445464 {
446465 /* 通常モードの場合 */
447466 /* 上の下じきから順番にマウスが指している下じきを探す */
448- //なんで-2か。マウスとmenuのシートを除外するため
449- for (j = shtctl->top - 2; j > 0; j--)
467+ //なんで-1か。マウスのシートを除外するため
468+ for (j = shtctl->top - 3 + 1; j > 0; j--)
450469 {
451470 sht = shtctl->sheets[j];
452471 x = mx - sht->vx0;
@@ -469,9 +488,11 @@
469488 //---------------------------------------------------*/
470489
471490
472- if (sht->buf[y * sht->bxsize + x] != sht->col_inv)
491+ //透明色じゃない所クリックした。あるいはこのシートは
492+ //updownをするシートだ!
493+ if (sht->buf[y * sht->bxsize + x] != sht->col_inv || sht->is_updown == 0)
473494 {
474- sheet_updown(sht, shtctl->top - 2);
495+ // sheet_uptop(sht);
475496 if (sht != key_win && sht->have_tb != 0)
476497 {
477498 keywin_off(key_win);
@@ -478,6 +499,9 @@
478499 key_win = sht;
479500 keywin_on(key_win);
480501 }
502+
503+
504+
481505 //マウスが指しているのがタイトルバーだった場合
482506 if (sht->have_tb == 1 && y <= binfo2.tbar_height && sht->is_window == 1)
483507 {
--- The-BBL/trunk/haribote/bootpack.h (revision 124)
+++ The-BBL/trunk/haribote/bootpack.h (revision 125)
@@ -172,10 +172,18 @@
172172 /* sheet.c */
173173 #define MAX_SHEETS 256
174174 struct SHEET {
175- unsigned char *buf;
176- int bxsize, bysize, vx0, vy0, col_inv, height, flags;
177- struct SHTCTL *ctl;
178- struct TASK *task;
175+ unsigned char *buf; //このシートのバッファのアドレス
176+
177+ int bxsize, bysize; //バッファの縦横の大きさ
178+ int vx0, vy0; //シートが画面上のどこにあるか(左上の0点の座)
179+ int col_inv; //このシートの透明色(この色が透明として扱われる)
180+ int height; //シートの高さ
181+ int flags; //各種情報
182+
183+ struct SHTCTL *ctl; //shtctl構造体のアドレス
184+ struct TASK *task; //このシートがどのタスクに管理されているか
185+
186+ char is_updown; //このシートはupdownするか?0ならupdownする。-1ならしない
179187 // char titlebar;
180188 // char closedbutton;
181189
--- The-BBL/trunk/haribote/sheet.c (revision 124)
+++ The-BBL/trunk/haribote/sheet.c (revision 125)
@@ -49,6 +49,8 @@
4949 sht->have_cb = 1;
5050 sht->is_exc = 1;
5151
52+ sht->is_updown = 0; //初期値ではupdownするシート
53+
5254 return sht;
5355 }
5456 }
@@ -222,6 +224,18 @@
222224 }
223225 sht->height = height; /* 高さを設定 */
224226
227+
228+ //-----------------------------------------
229+ char s[40];
230+ boxfill8(0xa0000,800,COL8_000000,8*22,16*0,8*60,16*1);
231+ sprintf(s,"top=%02d",ctl->top);
232+ putfonts8_asc(0xa0000,800,8*22,16*0,COL8_008484,s);
233+
234+
235+
236+ //-----------------------------------------
237+
238+
225239 /* 以下は主にsheets[]の並べ替え */
226240 if (old > height) { /* 以前よりも低くなる */
227241 if (height >= 0) {
@@ -272,15 +286,32 @@
272286 //通常の各種ウィンドゥを最善面に持ってくる。もちろんマウス等を自動的によける
273287 void sheet_uptop(struct SHEET *sht)
274288 {
275- int systemsheet = 2; //マウス・menj・タスクバー。3つだがマウスを省いて2
289+ int systemsheet = 3; //マウス・menj・タスクバー。3つだがマウスを省いて2
276290
277- int nowtopvalu = sht->ctl->top;
291+ int nowtopvalu = sht->ctl->top + 1;
278292
279- sheet_updown(sht,nowtopvalu - systemsheet);
280293
294+ if ( (nowtopvalu - systemsheet) == 0)
295+ {
296+ sheet_updown(sht,1);
297+ }
298+ else
299+ {
300+ sheet_updown(sht,nowtopvalu - systemsheet);
301+ }
281302
282303
283304
305+ //-----------------------------------------
306+ // char s[40];
307+ // sprintf(s,"wtop=%02d",nowtopvalu);
308+ // putfonts8_asc(0xa0000,800,8*42,16*0,COL8_008484,s);
309+
310+ //-----------------------------------------
311+
312+
313+
314+
284315 return;
285316 }
286317
Afficher sur ancien navigateur de dépôt.