• R/O
  • SSH
  • HTTPS

chnosproject: Commit


Commit MetaInfo

Revisión77 (tree)
Tiempo2010-03-22 15:20:27
Autorhikarupsp

Log Message

slide_window関数を追加。
マウスとともにウィンドウが動く!

Cambiar Resumen

Diferencia incremental

--- beta/tolset_chn_000/chnos_006/bootpack.c (revision 76)
+++ beta/tolset_chn_000/chnos_006/bootpack.c (revision 77)
@@ -9,6 +9,7 @@
99 struct MOUSE_DECODE mdec;
1010 struct MEMMAN *memman = (struct MEMMAN *) MEMMAN_ADDR;
1111 struct SHEET32 *sht_back, *sht_mouse;
12+ struct WINDOWINFO *winfo1;
1213 int fifobuf[256], i = 0,time_tick,mx = binfo->scrnx / 2, my = binfo->scrny / 2;
1314 unsigned int all_mem_size = memtest(0x00400000, 0xbffffffff);
1415 unsigned int free_mem_size = 0;
@@ -43,7 +44,7 @@
4344 sheet_slide(sht_back, 0,0);
4445 sheet_slide(sht_mouse, mx, my);
4546 sheet_updown(sht_back, 0);
46- make_window32(buf_win, "testwindow", 200, 150, 200, 50, 1);
47+ winfo1 = make_window32(buf_win, "testwindow", 200, 150, 200, 50, 1);
4748 sheet_updown(sht_mouse, 6);
4849
4950
@@ -97,6 +98,7 @@
9798 if(my > binfo->scrny - 1) my = binfo->scrny - 1;
9899
99100 sheet_slide(sht_mouse, mx,my);
101+ slide_window(winfo1, mx + 50, my + 50);
100102 boxfill_i(buf_back, binfo->scrnx, 0x000000, 0,288,INT_MONITOR_LONG,304);
101103 sprintf(s,"(%4d,%4d) %X",mx,my,vinfo->PhysBasePtr);
102104 putfonts_asc_i(buf_back, binfo->scrnx, 0,288,0xffffff,s);
--- beta/tolset_chn_000/chnos_006/window.c (revision 76)
+++ beta/tolset_chn_000/chnos_006/window.c (revision 77)
@@ -30,7 +30,7 @@
3030 return 0;
3131 }
3232
33-void make_window32(unsigned int *buf, unsigned char *title, int xsize, int ysize, int px, int py, int height)
33+struct WINDOWINFO *make_window32(unsigned int *buf, unsigned char *title, int xsize, int ysize, int px, int py, int height)
3434 {
3535 static char closebtn[16][40] = {
3636 "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@",
@@ -117,10 +117,21 @@
117117 sheet_updown(winfo->head, height);
118118
119119 err:
120- return;
120+ return winfo;
121121
122122 }
123123
124+void slide_window(struct WINDOWINFO *winfo, int px, int py)
125+{
126+ winfo->px = px;
127+ winfo->py = py;
128+ sheet_slide(winfo->center, px + 4,py + 24);
129+ sheet_slide(winfo->sideL, px,py + 24);
130+ sheet_slide(winfo->sideR, px + winfo->xsize - 4,py + 24);
131+ sheet_slide(winfo->bottom, px,py + winfo->ysize - 4);
132+ sheet_slide(winfo->head, px,py);
133+ return;
134+}
124135
125136
126137
@@ -127,4 +138,3 @@
127138
128139
129140
130-
--- beta/tolset_chn_000/chnos_006/core.h (revision 76)
+++ beta/tolset_chn_000/chnos_006/core.h (revision 77)
@@ -236,9 +236,9 @@
236236 /*window.c ウィンドウ関係*/
237237 void init_windows(void);
238238 struct WINDOWINFO *window_alloc(void);
239-void make_window32(unsigned int *buf, unsigned char *title, int xsize, int ysize, int px, int py, int height);
239+struct WINDOWINFO *make_window32(unsigned int *buf, unsigned char *title, int xsize, int ysize, int px, int py, int height);
240+void slide_window(struct WINDOWINFO *winfo, int px, int py);
240241
241-
242242 /*sheet.c 画面管理関係*/
243243
244244 void init_sheets(unsigned int *vram, int xsize, int ysize);
Show on old repository browser