· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Jin LiveCD/FBU Inote

JinLiveCD/FBUI

  • lilo ³ª grub ¿¡ vga=791 µîÀÇ ¿É¼ÇÀ» ÁÖ¾î vesafb »ç¿ë
  • Ä¿³Î¿¡ graphic ºÎºÐÀ» ³Ö¾úÀ½.
  • 2.6.9 ¿ëÀ» 2.6.12 ·Î ¼öÁ¤
  • drivers/video/Kconfig diff
41,78d40
< config FB_UI
<         bool "Framebuffer UI: in-kernel graphical user interface"
<         depends on FB
<         default y
<         help
<           FBUI is a small (25kB) GUI.
<         It was placed in the kernel in order to prevent that
<         it will ever become bloated, as X and other GUIs have.
<
<           FBUI currently allows each process to have one window, and
<           windows may not overlap. Each virtual console may have windows.
<           One process per VC may request to be a window manager.
<
<           Graphics functions include
<                 draw point, read point, draw line, draw rectangle,
<                 fill rectangle, clear window, clear area, draw inverted line,
<                 put pixels, put RGB pixels, copy area, get event, draw string.<
<           Fonts supported are monochrome PCF format and they reside in userspace.
<
<         Both keyboard and mouse input are supported, but you must
<         compile in the event interface (/dev/input/event*) and
<         the fbui_input module.
<
<           Current sample programs include:
<              load monitor, jpeg viewer, analog clock, two window managers,
<              screen dump, and terminal.
<
< config FB_UI_WINDOWSPERVC
<         int "Maximum windows per virtual console"
<         depends on FB_UI
<         default "24"
<
< config FB_UI_EVENTQUEUELEN
<         int "Per-process event queue length"
<         depends on FB_UI
<         default "16"
  • drivers/video/Makefile diff
16,17d15
< obj-$(CONFIG_FB_UI)               += fbui.o
<
  • drivers/video/fbmem.c diff
8,9d7
<  *      2004 - Updated for fbui
<  *      - Zack T Smith <fbui@comcast.net>
966,1014d963
< < #ifdef CONFIG_FB_UI
<       case FBIO_UI_OPEN: {
<                 if (access_ok (VERIFY_READ, (char*) arg, sizeof(struct fbui_openparams)))
<                       return fbui_open (info, (struct fbui_openparams*) arg);
<                 else
<                       return -EFAULT;
<       }
<
<       case FBIO_UI_CLOSE:
<               return fbui_close (info, arg);
<
<         case FBIO_UI_EXEC: {
<                 short win_id=-1;
<                 short nwords=0;
<                 short *ptr=(short*) arg;
<                 if (access_ok (VERIFY_READ, (char*) arg, 4)) {
<                         if (get_user (win_id, ptr))
<                               return -EFAULT;
<                       if (win_id < 0 || win_id >= FBUI_MAXWINDOWSPERVC*FBUI_MAXCONSOLES)
<                               return FBUI_ERR_BADWIN;
<                       ptr++;
<                         if (get_user (nwords, ptr))
<                               return -EFAULT;
<                       arg += 4;
<                       if (access_ok (VERIFY_READ, (char*) (arg), 2*nwords))
<                               return fbui_exec (info, win_id, nwords,
<                                       (unsigned char*) (arg));
<                       else
<                               return -EFAULT;
<                 }
<                 else
<                       return -EFAULT;
<         }
<
<       case FBIO_UI_CONTROL:
<                 if (access_ok (VERIFY_READ, (char*) arg, sizeof(struct fbui_ctrlparams)))
<               {
<                       struct fbui_ctrlparams ctl;
<                       if (!copy_from_user (&ctl, (void*)arg, sizeof(struct fbui_ctrlparams))){
<                               return fbui_control (info, &ctl);
<                       } else {
<                               return -EFAULT;
<                       }
<               } else {
<                       return -EFAULT;
< }
< #endif
<
  • drivers/video/vesafb.c diff
184,198d183
<
< #ifdef CONFIG_FB_UI
<         /* Assign routines from fbui.c */
<         .fb_release             = fbui_release,
<         .fb_point               = fb_point,
<         .fb_hline               = fb_hline,
<         .fb_vline               = fb_vline,
<         .fb_clear               = fb_clear,
<         .fb_read_point          = fb_read_point,
<         .fb_putpixels_native    = fb_putpixels_native,
<         .fb_putpixels_rgb       = fb_putpixels_rgb,
<         .fb_putpixels_rgb3      = fb_putpixels_rgb3,
<         .fb_getpixels_rgb       = fb_getpixels_rgb,
<         .fb_copyarea2           = fb_copyarea,
< #endif
408,412d392
<
< #ifdef CONFIG_FB_UI
<         fbui_init (info);
< #endif
<
  • drivers/video/vga16fb.c diff
1313,1347d1312
< #ifdef CONFIG_FB_UI
< static void vga16fb_point (struct fb_info *info, short x, short y, u32 rgb)
< {
< }
< static void vga16fb_hline (struct fb_info *info, short x0, short x1, short y, u32 rgb)
< {
< }
< static void vga16fb_vline (struct fb_info *info, short x, short y0, short y1, u32 rgb)
< {
< }
< static u32 vga16fb_read_point (struct fb_info *info, short x, short y)
< {
< }
< static u32 vga16fb_putpixels_native (struct fb_info *info, short x, short y,
<         short n, unsigned char *src, char in_kernel)
< {
< }
< static u32 vga16fb_getpixels_rgb (struct fb_info *info, short x, short y,
<         short n, unsigned char *src, char in_kernel)
< {
< }
< static u32 vga16fb_putpixels_rgb (struct fb_info *info, short x, short y,
<         short n, unsigned char *src, char in_kernel)
< {
< }
< static u32 vga16fb_putpixels_rgb3 (struct fb_info *info, short x, short y,
<         short n, unsigned char *src, char in_kernel)
< {
< }
< static u32 vga16fb_copyarea2 (struct fb_info *info, short xsrc, short ysrc,
<         short w, short h, short xdest, short ydest)
< {
< }
< #endif
<
1361,1374d1325
<
< #ifdef CONFIG_FB_UI
<         .fb_point       = vga16fb_point,
<         .fb_hline       = vga16fb_hline,
<         .fb_vline       = vga16fb_vline,
<         .fb_clear         = vga16fb_clear,
<         .fb_hline         = vga16fb_hline,
<         .fb_read_point    = vga16fb_read_point,
<         .fb_putpixels_native    = vga16fb_putpixels_native,
<         .fb_putpixels_rgb       = vga16fb_putpixels_rgb,
<         .fb_getpixels_rgb       = vga16fb_getpixels_rgb,
<         .fb_putpixels_rgb3      = vga16fb_putpixels_rgb3,
<         .fb_copyarea2 = vga16fb_copyarea2,
< #endif
1377d1327
  • drivers/video/console/fbcon.c diff
2042,2045d2041
< #ifdef CONFIG_FB_UI
<         fbui_switch (info, vc->vc_num);
< #endif
<
  • drivers/input/Kconfig diff
137,145d136
< config INPUT_FBUI
<         tristate "FBUI input handling"
<         default y
<         depends on INPUT
<         ---help---
<           Say Y here if you will also enable FBUI, which is the
<           in-kernel framebuffer-based graphical user interface.
<
  • drivers/input/Makefile diff
15,16d14
< obj-$(CONFIG_INPUT_FBUI)        += fbui-input.o
<
  • drivers/char/n_tty.c diff
31,32d30
<  *
<  * 2004/09/20 Z Smith (fbui@comcast.net): erase-after-read of read_buf
469d466
<                       tty->read_buf[head] = 0; /* ZS */
510d506
<                                       tty->read_buf[tail] = 0; /* ZS */
1355d1350
<                               tty->read_buf[tty->read_tail] = 0; /* ZS */
  • drivers/char/vt_ioctl.c diff
1215d1214
< #ifndef CONFIG_FB_UI
1218d1216
< #endif
  • include/linux/fb.h diff
 ¾çÀÌ ¸¹À½
  • include/linux/input.h diff
989,997d988
< #ifdef CONFIG_INPUT_FBUI
< /* FBUI additions by Zachary T Smith, fbui@comcast.net */
< extern void fbui_input_enable(void);
< extern void fbui_input_disable(void);
< typedef void FBUIInputEventHandler (u32 , struct input_event *);
< extern void fbui_input_register_handler (FBUIInputEventHandler*, u32 param);
< #endif
<

³»°¡ ¼öÁ¤ÇÑ ºÎºÐ

  • drivers/input/fbui-input.c
> void fbui_input_unregister_handler ()
> {
>       handler = NULL;
> }
>
  • drivers/video/fbui.c
142a143,144
> #include "console/fbcon.h"    /* find_pid */
>
328a331,332
>       return value & 0xffffff;
> /*
347a352
> */
351a357,358
>       return value & 0xffffff;
> /*
369a377
> */
394a403
>       do_invert=1;
692a702,703
>       struct fbcon_ops *ops = info->fbcon_par;
>       struct vc_data *vc;
701a713,716
>       if (cons > 5) {
>               fbui_input_unregister_handler();
>               fbui_handler_regd = 0;
>       }
715c730
<       win = info->pointer_window [info->currcon];
---
>       win = info->pointer_window [ops->currcon];
723c738
<               info->pointer_window [info->currcon] = NULL;
---
>               info->pointer_window [ops->currcon] = NULL;
729c744
<       info->currcon = cons;
---
>       ops->currcon = cons;
734c749,750
<       if (vt_cons[cons]->vc_mode != KD_GRAPHICS)
---
>       vc = vc_cons[ops->currcon].d;
>       if (vc->vc_mode != KD_GRAPHICS)
803a820
>       struct fbcon_ops *ops = info->fbcon_par;
810c827
<       if (win->console != info->currcon)
---
>       if (win->console != ops->currcon)
982a1000
>       struct fbcon_ops *ops = info->fbcon_par;
990c1008
<       cons = info->currcon;
---
>       cons = ops->currcon;
1041a1060,1061
>       struct fbcon_ops *ops;
>       struct vc_data *vc;
1050a1071
>       ops = info->fbcon_par;
1054c1075
<       cons = info->currcon;
---
>       cons = ops->currcon;
1057c1078,1079
<       if (vt_cons[cons]->vc_mode != KD_GRAPHICS)
---
>       vc = vc_cons[ops->currcon].d;
>       if (vc->vc_mode != KD_GRAPHICS)
1129c1151
<                               match = accelerator_test (info, info->currcon, ia);
---
>                               match = accelerator_test (info, ops->currcon, ia);
1241c1263
<                       int cons = info->currcon;
---
>                       int cons = ops->currcon;
1411d1432
< /*
1415d1435
< */
1490a1511,1512
>       struct fbcon_ops *ops = info->fbcon_par;
>       struct vc_data *vc;
1495c1517,1518
<       if (cons != info->currcon) {
---
>       vc = vc_cons[ops->currcon].d;
>       if (cons != ops->currcon) {
1497c1520
<               vt_cons[cons]->vc_mode = KD_TEXT;
---
>               vc->vc_mode = KD_TEXT;
1501c1524,1525
<               vt_cons[cons]->vc_mode = KD_TEXT;
---
>               vc->vc_mode = KD_TEXT;
>               fbui_hide_pointer (info);
1503c1527,1528
<               redraw_screen (cons,0);
---
>               // redraw_screen (cons,0);
>               redraw_screen (vc,0);
1767a1793,1794
>       struct fbcon_ops *ops = info->fbcon_par;
>       struct vc_data *vc;
1772a1800
>       vc = vc_cons[ops->currcon].d;
1774c1802
<       vt_cons[cons]->vc_mode = KD_GRAPHICS;
---
>       vc->vc_mode = KD_GRAPHICS;
1778c1806
<         info->cursor.enable = 0;
---
>         ops->cursor_state.enable = 0;
1782c1810
<       if (cons == info->currcon) {
---
>       if (cons == ops->currcon) {
1796a1825,1826
>       struct fbcon_ops *ops = info->fbcon_par;
>       struct vc_data *vc;
1797a1828
>       short org_cons;
1860a1892,1893
>       org_cons=ops->currcon;
>       printk(KERN_INFO "fbui_open: org_cons= %d cons=%d\n", org_cons, cons);
1862a1896,1897
>       if (cons < 0)
>               cons = ops->currcon;
1864c1899,1900
<               if (!vc_allocate (cons))
---
>               if (!vc_allocate (cons)){
>                       printk(KERN_INFO "vc_allocate return 0\n");
1865a1902
>               }
1867,1868d1903
<       if (cons < 0)
<               cons = info->currcon;
1926,1928c1961,1963
<
<       if (vt_cons[cons]->vc_mode != KD_GRAPHICS) {
<               backup_vc (info, cons);
---
>       vc = vc_cons[ops->currcon].d;
>       if (vc->vc_mode != KD_GRAPHICS) {
>               backup_vc (info, org_cons);
2272a2308
>       struct fbcon_ops *ops = info->fbcon_par;
2312c2348
<               win2 = info->pointer_window [info->currcon];
---
>               win2 = info->pointer_window [ops->currcon];
3091a3128
>       struct fbcon_ops *ops = info->fbcon_par;
3097c3134
<       if (win->console != info->currcon)


---
>       if (win->console != ops->currcon)
3128a3166
>       struct fbcon_ops *ops = info->fbcon_par;
3137c3175
<       if (win->console != info->currcon)
---
>       if (win->console != ops->currcon)
3311a3350
>       struct fbcon_ops *ops = info->fbcon_par;
3320c3359
<       if (win->console != info->currcon)
---
>       if (win->console != ops->currcon)
3363a3403
>       struct fbcon_ops *ops = info->fbcon_par;
3372c3412
<       if (win->console != info->currcon)
---
>       if (win->console != ops->currcon)
3415a3456
>       struct fbcon_ops *ops = info->fbcon_par;
3422c3463
<       if (win->console != info->currcon)
---
>       if (win->console != ops->currcon)
3454a3496
>       struct fbcon_ops *ops = info->fbcon_par;
3461c3503
<       if (win->console != info->currcon)
---
>       if (win->console != ops->currcon)
3482a3525
>       struct fbcon_ops *ops = info->fbcon_par;
3487c3530
<       if (win->console != info->currcon)
---
>       if (win->console != ops->currcon)
3519a3563
>       struct fbcon_ops *ops = info->fbcon_par;
3526c3570
<       if (win->console != info->currcon)
---
>       if (win->console != ops->currcon)
3909a3954
>       struct fbcon_ops *ops = info->fbcon_par;
3919c3964
<       if (win->console != info->currcon)
---
>       if (win->console != ops->currcon)
3977a4023
>       struct fbcon_ops *ops = info->fbcon_par;
3987c4033
<       if (win->console != info->currcon)
---
>       if (win->console != ops->currcon)
4040a4087
>       struct fbcon_ops *ops = info->fbcon_par;
4048c4095
<       if (win->console != info->currcon)
---
>       if (win->console != ops->currcon)
4280a4328
>       struct fbcon_ops *ops = info->fbcon_par;
4287c4335
<       if (win->console != info->currcon)
---
>       if (win->console != ops->currcon)
diff -r FBUI/libfbui/MultiTest/main.c FBUI2.6.12/libfbui/MultiTest/main.c
65c65
<       if (!pcf_read (pcf, "timR12.pcf")) {
---
>       if (!pcf_read (pcf, "/usr/src/linux/libfbui/timR12.pcf")) {
diff -r FBUI/libfbui/Test/main.c FBUI2.6.12/libfbui/Test/main.c
83c83
<       if (!pcf_read (pcf, "timR12.pcf")) {
---
>       if (!pcf_read (pcf, "/usr/src/linux/libfbui/timR12.pcf")) {
162c162
<                                               -100,y, TESTSTR, rand() & 0xffffff);
---
>                                               0,y, TESTSTR, rand() & 0xffffff);
168a169
>               printf ("before font_free\n");
169a171
>               printf ("after fbui_draw_string\n");
diff -r FBUI/libfbui/WindowManager/main.c FBUI2.6.12/libfbui/WindowManager/main.c
98c98
<         if (!pcf_read (pcf, "timR12.pcf")) {
---
>         if (!pcf_read (pcf, "/usr/src/linux/libfbui/timR12.pcf")) {
diff -r FBUI/libfbui/libfbui.c FBUI2.6.12/libfbui/libfbui.c
1677,1678c1677,1678
<       if (font->widths)
<               free ((void*) font->widths);
---
>       if (font->bitwidths)
>               free ((void*) font->bitwidths);
1682a1683,1684
>       if (font->bitmap_buffer)
>               free ((void*) font->bitmap_buffer);
diff -r FBUI/libfbui/start-fbwm.sh FBUI2.6.12/libfbui/start-fbwm.sh
4c4
<       export A=4
---
>       export A=1
8a9
> chvt $((A+1))
13c14
<  Term/fbterm  -c$A &
---
> # Term/fbterm  -c$A &
  • 2.6.12 ¿Í 2.6.12 fbui
diff -r FBUI2.6.12/drivers/char/n_tty.c SQFS2.6.12/drivers/char/n_tty.c
457,459d456
< #ifdef CONFIG_FB_UI
<                         tty->read_buf[head] = 0; /* ZS */
< #endif
500,502d496
< #ifdef CONFIG_FB_UI
<                                         tty->read_buf[tail] = 0; /* ZS */
< #endif
1349,1351d1342
< #ifdef CONFIG_FB_UI
<                                 tty->read_buf[tty->read_tail] = 0; /* ZS */
< #endif
diff -r FBUI2.6.12/drivers/char/vt_ioctl.c SQFS2.6.12/drivers/char/vt_ioctl.c
1198d1197
< #ifndef CONFIG_FB_UI
1201d1199
< #endif
diff -r FBUI2.6.12/drivers/video/console/fbcon.c SQFS2.6.12/drivers/video/console/fbcon.c
1939,1941d1938
< #ifdef CONFIG_FB_UI
<         fbui_switch (info, vc->vc_num);
< #endif
diff -r FBUI2.6.12/drivers/video/fbmem.c SQFS2.6.12/drivers/video/fbmem.c
860,907d859
< #ifdef CONFIG_FB_UI
<         case FBIO_UI_OPEN: {
<                 if (access_ok (VERIFY_READ, (char*) arg, sizeof(struct fbui_openparams)))
<                         return fbui_open (info, (struct fbui_openparams*) arg);
<                 else
<                         return -EFAULT;
<         }
<
<         case FBIO_UI_CLOSE:
<                 return fbui_close (info, arg);
<
<         case FBIO_UI_EXEC: {
<                 short win_id=-1;
<                 short nwords=0;
<                 short *ptr=(short*) arg;
<                 if (access_ok (VERIFY_READ, (char*) arg, 4)) {
<                         if (get_user (win_id, ptr))
<                                 return -EFAULT;
<                         if (win_id < 0 || win_id >= FBUI_MAXWINDOWSPERVC*FBUI_MAXCONSOLES)
<                                 return FBUI_ERR_BADWIN;
<                         ptr++;
<                         if (get_user (nwords, ptr))
<                                 return -EFAULT;
<                         arg += 4;
<                         if (access_ok (VERIFY_READ, (char*) (arg), 2*nwords))
<                                 return fbui_exec (info, win_id, nwords,
<                                         (unsigned char*) (arg));
<                         else
<                                 return -EFAULT;
<                 }
<                 else
<                         return -EFAULT;
<         }
<
<         case FBIO_UI_CONTROL:
<                 if (access_ok (VERIFY_READ, (char*) arg, sizeof(struct fbui_ctrlparams)))
<                 {
<                         struct fbui_ctrlparams ctl;
<                         if (!copy_from_user (&ctl, (void*)arg, sizeof(struct fbui_ctrlparams))){
<                                 return fbui_control (info, &ctl);
<                         } else {
<                                 return -EFAULT;
<                         }
<                 } else {
<                         return -EFAULT;
< }
< #endif
<
diff -r FBUI2.6.12/drivers/video/vesafb.c SQFS2.6.12/drivers/video/vesafb.c
183,196d182
< #ifdef CONFIG_FB_UI
<         /* Assign routines from fbui.c */
<         .fb_release             = fbui_release,
<         .fb_point               = fb_point,
<         .fb_hline               = fb_hline,
<         .fb_vline               = fb_vline,
<         .fb_clear               = fb_clear,
<         .fb_read_point          = fb_read_point,
<         .fb_putpixels_native    = fb_putpixels_native,
<         .fb_putpixels_rgb       = fb_putpixels_rgb,
<         .fb_putpixels_rgb3      = fb_putpixels_rgb3,
<         .fb_getpixels_rgb       = fb_getpixels_rgb,
<         .fb_copyarea2           = fb_copyarea,
< #endif
431,435d416
<
< #ifdef CONFIG_FB_UI
<         fbui_init (info);
< #endif
<
diff -r FBUI2.6.12/drivers/video/vga16fb.c SQFS2.6.12/drivers/video/vga16fb.c
1317,1354d1316
< #ifdef CONFIG_FB_UI
< static void vga16fb_point (struct fb_info *info, short x, short y, u32 rgb)
< {
< }
< static void vga16fb_hline (struct fb_info *info, short x0, short x1, short y, u32 rgb)
< {
< }
< static void vga16fb_vline (struct fb_info *info, short x, short y0, short y1, u32 rgb)
< {
< }
< static void vga16fb_clear (struct fb_info *info, u32 rgb)
< {
< }
< static u32 vga16fb_read_point (struct fb_info *info, short x, short y)
< {
< }
< static u32 vga16fb_putpixels_native (struct fb_info *info, short x, short y,
<         short n, unsigned char *src, char in_kernel)
< {
< }
< static u32 vga16fb_getpixels_rgb (struct fb_info *info, short x, short y,
<         short n, unsigned char *src, char in_kernel)
< {
< }
< static u32 vga16fb_putpixels_rgb (struct fb_info *info, short x, short y,
<         short n, unsigned char *src, char in_kernel)
< {
< }
< static u32 vga16fb_putpixels_rgb3 (struct fb_info *info, short x, short y,
<         short n, unsigned char *src, char in_kernel)
< {
< }
< static u32 vga16fb_copyarea2 (struct fb_info *info, short xsrc, short ysrc,
<         short w, short h, short xdest, short ydest)
< {
< }
< #endif
<
1368,1380d1329
< #ifdef CONFIG_FB_UI
<         .fb_point       = vga16fb_point,
<         .fb_hline       = vga16fb_hline,
<         .fb_vline       = vga16fb_vline,
<         .fb_clear         = vga16fb_clear,
<         .fb_hline         = vga16fb_hline,
<         .fb_read_point    = vga16fb_read_point,
<         .fb_putpixels_native    = vga16fb_putpixels_native,
<         .fb_putpixels_rgb       = vga16fb_putpixels_rgb,
<         .fb_getpixels_rgb       = vga16fb_getpixels_rgb,
<         .fb_putpixels_rgb3      = vga16fb_putpixels_rgb3,
<         .fb_copyarea2 = vga16fb_copyarea2,
< #endif
diff -r FBUI2.6.12/include/linux/fb.h SQFS2.6.12/include/linux/fb.h
39,288d38
< /* ==========================================================================*/
< /* FBUI ioctls */
< /* FBUI additions by Zachary T Smith, fbui@comcast.net */
<
< #define FBIO_UI_OPEN            0x4619  /* arg = ptr to fb_ui_open */
< #define FBIO_UI_CLOSE           0x461a  /* no arg */
<       /* Exec commands are queued and are not executed if window
<        * is not visible. */
< #define FBIO_UI_EXEC            0x461b  /* arg = ptr to array of shorts (1st=count) */
<       /* Control commands are _not_ queued and are always executed*/
< #define FBIO_UI_CONTROL               0x461c  /* arg = ptr to fbui_ctrlparams struct */
< #define FBUI_NAMELEN 32
< typedef unsigned long RGB;
<
< /* FBUI program type hints for fbui_openparams */
< #define FBUI_PROGTYPE_NONE 0
< #define FBUI_PROGTYPE_APP 1           /* e.g. takes main area */
< #define FBUI_PROGTYPE_LAUNCHER 2      /* e.g. takes bottom row area */
< #define FBUI_PROGTYPE_TOOL 3          /* e.g. fbclock: takes right area permanently */
< #define FBUI_PROGTYPE_EPHEMERAL 4     /* e.g. calculator */
< #define FBUI_PROGTYPE_WM      5       /* window mgr, panel mgr */
< #define FBUI_PROGTYPE_LAST 6 /* not for use */
<
< /* A few accelerator keys encoded into 0..31 */
< #define FBUI_ACCEL_PRTSC 1
< #define FBUI_ACCEL_HOME 2
< #define FBUI_ACCEL_END 3
< #define FBUI_ACCEL_PGUP 4
< #define FBUI_ACCEL_PGDN 5
<
< #define FBUI_BUTTON_LEFT 2
< #define FBUI_BUTTON_RIGHT 4
< #define FBUI_BUTTON_MIDDLE 8
<
<
< /* Passed _in_ to FBIO_UI_OPEN ioctl */
< struct fbui_openparams {
<       char    desired_vc;     /* -1 = current */
<       char    req_control;    /* maximum one window manager per vc */
<       char    doing_autoposition;   /* used to differentiate btw fbwm & fbpm */
<       char    program_type;   /* if !0, window is hidden upon creation, wm informed */
<       char    need_keys;      /* key focus */
<       char    need_motion;    /* pointer focus */
<       char    receive_all_motion;     /* supported for window manager only */
<       char    initially_hidden;
<       short   x0;
<       short   y0;
<       short   x1;
<       short   y1;
<       short   max_width;
<       short   max_height;
<       __u32   bgcolor;
<       char    name [FBUI_NAMELEN];
<       char    subtitle [FBUI_NAMELEN];
< };
<
< /* Data passed _out_ kernel via FBUI_WININFO command */
< struct fbui_wininfo {
<       short   id;
<       int     pid;
<       char    program_type;
<       char    hidden;
<       char    need_placement;
<       char    need_keys;
<       char    need_motion;
<       short   x, y;
<       short   width, height;
<       short   max_width;
<       short   max_height;
<       char    name [FBUI_NAMELEN];
<       char    subtitle [FBUI_NAMELEN];
< };
<
< /* Data passed _out_ kernel via FBUI_POLLEVENT & FBUI_WAITEVENT commands */
< struct fbui_event {
<       char    type;
<       short   id;
<       int     pid;
<       short   x, y;
<       short   width, height;
<       short   key;
< };
<
< /* Passed _in_ to FBIO_UI_CONTROL
<  */
< struct fbui_ctrlparams {
<       char    op;
<       short   id;
<       short   id2; /* used by wm */
<       short   x,y;
<       short   width,height;
<       struct fbui_wininfo     *info;  /* passed _out_ */
<       int     ninfo;
<       unsigned char   *pointer;
<       unsigned long   cutpaste_length;
<       struct fbui_event       *event; /* passed _out_ */
<       char    string [FBUI_NAMELEN];
< };
<
< #define FBUI_EVENTMASK_KEY    1
< #define FBUI_EVENTMASK_EXPOSE 2
< #define FBUI_EVENTMASK_HIDE   4
< #define FBUI_EVENTMASK_UNHIDE 8
< #define FBUI_EVENTMASK_ENTER  16
< #define FBUI_EVENTMASK_LEAVE  32
< #define FBUI_EVENTMASK_MR     64
< #define FBUI_EVENTMASK_ACCEL  128
< #define FBUI_EVENTMASK_WC     256
< #define FBUI_EVENTMASK_MOTION 512
< #define FBUI_EVENTMASK_BUTTON 1024
< #define FBUI_EVENTMASK_ALL 0x7fff
<
< /* Commands for FBIO_UI_CONTROL ioctl */
< #define FBUI_GETDIMS  0
< #define FBUI_POLLEVENT        1
< #define FBUI_READMOUSE        2
< #define FBUI_READPOINT        3       /* wm only */
< #define FBUI_ACCEL    4
< #define FBUI_WININFO  5       /* wm only */
< #define FBUI_SUSPEND  6       /* wm only */
< #define FBUI_RESUME   7
< #define FBUI_GETPOSN  8
< #define FBUI_WAITEVENT        9
< #define FBUI_PLACEMENT        10      /* wm only */
< #define FBUI_CUT      11
< #define FBUI_PASTE    12
< #define FBUI_CUTLENGTH        13
< #define FBUI_SUBTITLE 14
< #define FBUI_SETFONT  15
<
< #define FBUI_CTL_TAKESWIN 32
< /* Numbers >= FBUI_CTL_TAKESWIN take a window argument */
< #define FBUI_REDRAW   (FBUI_CTL_TAKESWIN+1)   /* wm only */
< #define FBUI_DELETE   (FBUI_CTL_TAKESWIN+2)   /* wm only */
< #define FBUI_HIDE     (FBUI_CTL_TAKESWIN+3)   /* wm only */
< #define FBUI_UNHIDE   (FBUI_CTL_TAKESWIN+4)   /* wm only */
< #define FBUI_ASSIGN_KEYFOCUS  (FBUI_CTL_TAKESWIN+5)   /* wm only */
< #define FBUI_ASSIGN_PTRFOCUS  (FBUI_CTL_TAKESWIN+7)   /* wm only */
< #define FBUI_MOVE_RESIZE      (FBUI_CTL_TAKESWIN+6)   /* wm only */
<
< /* FBUI font weight */
< #define FB_FONTWEIGHT_LIGHT (0)
< #define FB_FONTWEIGHT_MEDIUM (1)
< #define FB_FONTWEIGHT_BOLD (2)
< #define FB_FONTWEIGHT_BLACK (3)
<
< /* FBUI font */
< struct fbui_font {
<         unsigned char ascent;
<       unsigned char descent;
<         unsigned char first_char;
<         unsigned char last_char;
<         unsigned char nchars;
<         unsigned char *lefts;
<         unsigned char *heights;
<         unsigned char *widths;        /* # of bits used for pixels */
<         unsigned char *bitwidths; /* # bits actually used.. e.g. 32 */
<         unsigned char *descents;
<         unsigned char *bitmap_buffer;
<         unsigned char **bitmaps;
< };
< #define FBUI_FONTSIZE sizeof(struct fbui_font)
<
< /* Some useful colors */
< #define RGB_NOCOLOR   0xff000000
< #define RGB_TRANSP    0xff000000
< #define RGB_BLACK     0
< #define RGB_GRAY      0xa0a0a0
< #define RGB_WHITE     0xffffff
< #define RGB_RED       0xff0000
< #define RGB_GREEN     0xff00
< #define RGB_BLUE      0xff
< #define RGB_CYAN      0xffff
< #define RGB_YELLOW    0xffff00
< #define RGB_MAGENTA   0xff00ff
< #define RGB_ORANGE    0xffa000
< #define RGB_PURPLE    0xa030ff
< #define RGB_LTBROWN   0xb54c4c
< #define RGB_BROWN     0xa52c2c
< #define RGB_STEELBLUE         0x4682B4
< #define RGB_SIENNA    0x605230
<
< /* FBUI event types. Events are 31-bit values; type is lower 4 bits */
< #define FBUI_EVENT_NONE       0
< #define FBUI_EVENT_EXPOSE     1
< #define FBUI_EVENT_HIDE       2
< #define FBUI_EVENT_UNHIDE     3
< #define FBUI_EVENT_ENTER      4       /* future... mouse pointer enter */
< #define FBUI_EVENT_LEAVE      5       /* future... mouse pointer leave */
< #define FBUI_EVENT_KEY                6
< #define FBUI_EVENT_MOVE_RESIZE        7       /* window was moved by wm */
< #define FBUI_EVENT_ACCEL      8       /* keyboard accelerator (Alt-) key */
< #define FBUI_EVENT_WINCHANGE  9       /* recv'd only by window manager */
< #define FBUI_EVENT_MOTION     10      /* mouse pointer moved */
< #define FBUI_EVENT_BUTTON     11      /* mouse button activity */
<
< /* FBUI queued commands: for use with FBIO_UI_EXEC ioctl */
< #define FBUI_NONE     0
< #define FBUI_COPYAREA         1
< #define FBUI_POINT    2
< #define FBUI_LINE     3
< #define FBUI_HLINE    4
< #define FBUI_VLINE    5
< #define FBUI_RECT     6
< #define FBUI_FILLAREA         7
< #define FBUI_CLEAR    8
< #define FBUI_INVERTLINE       9
< #define FBUI_STRING   10
< #define FBUI_PUT      11
< #define FBUI_PUTRGB   12
< #define FBUI_PUTRGB3  13
< #define FBUI_CLEARAREA        14
< #define FBUI_TINYBLIT 15
<
< /* FBUI ioctl return values */
< #define FBUI_SUCCESS 0
< #define FBUI_ERR_BADADDR -254
< #define FBUI_ERR_NULLPTR -253
< #define FBUI_ERR_OFFSCREEN -252
< #define FBUI_ERR_NOTRUNNING -251
< #define FBUI_ERR_WRONGVISUAL -250
< #define FBUI_ERR_NOTPLACED -249
< #define FBUI_ERR_BIGENDIAN -248
< #define FBUI_ERR_INVALIDCMD -247
< #define FBUI_ERR_BADPID -246
< #define FBUI_ERR_ACCELBUSY -245
< #define FBUI_ERR_NOFONT -244
< #define FBUI_ERR_NOMEM -243
< #define FBUI_ERR_NOTOPEN -242
< #define FBUI_ERR_OVERLAP -241
< #define FBUI_ERR_ALREADYOPEN -240
< #define FBUI_ERR_MISSINGWIN -239
< #define FBUI_ERR_NOTWM -238
< #define FBUI_ERR_WRONGWM -237
< #define FBUI_ERR_HAVEWM -236
< #define FBUI_ERR_KEYFOCUSDENIED -235
< #define FBUI_ERR_KEYFOCUSERR -234
< #define FBUI_ERR_BADPARAM -233
< #define FBUI_ERR_NOMOUSE -232
< #define FBUI_ERR_MOUSEREAD -231
< #define FBUI_ERR_OVERLARGECUT -230
< #define FBUI_ERR_BADWIN -229
< #define FBUI_ERR_PASTEFAIL -228
< #define FBUI_ERR_CUTFAIL -227
< #define FBUI_ERR_NOEVENT -226
< #define FBUI_ERR_DRAWING -225
< #define FBUI_ERR_MISSINGPROCENT -224
< #define FBUI_ERR_BADVC -223
<
< /* ==========================================================================*/
784,879d533
< /*=====================================================*/
< struct fbui_window {
<       short   id;             /* window id */
<       int     pid;            /* process id */
<       int     console;        /* virtual console in which window appears */
<       u32     bgcolor;        /* background */
<       short   x0, y0, x1, y1; /* absolute coordinates */
<       short   width, height;
<       short   max_width;
<       short   max_height;
<
<       short   mouse_x, mouse_y;
<
<       char    program_type;
<       unsigned int need_placement : 1;
<       unsigned int drawing : 1;   /* 1 => don't allow input_handler to draw ptr */
<       unsigned int pointer_inside : 1;
<       unsigned int is_wm : 1;
<       unsigned int doing_autopos : 1; /* used by wm only; {0:fbwm, 1:fbpm} */
<       unsigned int is_hidden: 1;
<       unsigned int do_invert : 1;
<       unsigned int need_keys : 1;
<       unsigned int need_motion : 1;
<       unsigned int receive_all_motion : 1;
<       unsigned int font_valid : 1;
<
<       struct fbui_font font;  /* default font, used if font ptr NULL */
<
<       struct fbui_processentry *processentry;
<
<       char    name[FBUI_NAMELEN];
<       char    subtitle[FBUI_NAMELEN];
<
<       u32     accelerators[8]; /* supporting only 8-bit chars now */
<       short   pending_accel;
<
<       struct fbui_window *next;
< };
<
< extern int fbui_init (struct fb_info *info);
< extern int fbui_switch (struct fb_info *info, int con);
< extern int fbui_release (struct fb_info *info, int user);
< extern int fbui_exec (struct fb_info *info, short win_id, short n, unsigned char *arg);
< extern int fbui_control (struct fb_info *info, struct fbui_ctrlparams*);
< extern int fbui_open (struct fb_info *info, struct fbui_openparams*);
< extern int fbui_close (struct fb_info *info, short);
<
< extern void fb_clear (struct fb_info *, u32);
< extern void fb_point (struct fb_info *, short,short, u32, char);
< extern u32 fb_read_point (struct fb_info *, short,short);
< extern void fb_hline (struct fb_info *,short,short,short,u32);
< extern void fb_vline (struct fb_info *,short,short,short,u32);
< extern void fb_putpixels_native (struct fb_info *, short,short,short,unsigned char*,char);
< extern void fb_putpixels_rgb (struct fb_info *, short,short,short,unsigned long*,char);
< extern void fb_putpixels_rgb3 (struct fb_info *, short,short,short,unsigned char*,char);
< extern short fb_getpixels_rgb (struct fb_info *, short x,short y,short n,unsigned long*,char);
< extern void fb_copyarea (struct fb_info *, short,short,short,short,short,short);
<
<
< /* Per-process event queue data
<  */
< struct fbui_processentry {
<       unsigned int in_use : 1;
<       unsigned int waiting : 1;
<       char console;
<       char nwindows;
<       char window_num; /* which window to check next for event */
<       short index;
<       int pid;
<       wait_queue_head_t waitqueue;
<       unsigned short  wait_event_mask;
<
< #define FBUI_MAXEVENTSPERPROCESS (CONFIG_FB_UI_EVENTQUEUELEN)
<       struct fbui_event events [FBUI_MAXEVENTSPERPROCESS];
<       short   events_head;
<       short   events_tail;
<       short   events_pending;
<       spinlock_t queuelock;
<       struct semaphore queuesem;
< };
<
< #define FBUI_MAXCONSOLES 12
< #define FBUI_TOTALACCELS 128
< #define FBUI_MAXINCOMINGKEYS 32
< #define FBUI_CUTPASTE_LIMIT 0x10000
< #define FBUI_MAXWINDOWSPERVC (CONFIG_FB_UI_WINDOWSPERVC)
<
<
< struct fbui_focus_stack {
<         struct rw_semaphore sem;
<         short top;
<         short ids [FBUI_MAXWINDOWSPERVC]; /* window ids */
< };
<
<
< /*=====================================================*/
947,959d600
<
< #ifdef CONFIG_FB_UI
<       void (*fb_clear) (struct fb_info *info, u32);
<         u32 (*fb_read_point) (struct fb_info *info, short x, short y);
<         void (*fb_point) (struct fb_info *info, short,short,u32,char);
<         void (*fb_hline) (struct fb_info *info, short,short,short,u32);
<         void (*fb_vline) (struct fb_info *info, short,short,short,u32);
<       void (*fb_putpixels_native) (struct fb_info *, short,short,short,unsigned char*,char);
<       short (*fb_getpixels_rgb) (struct fb_info *, short x,short y,short n,unsigned long*,char);
<       void (*fb_putpixels_rgb) (struct fb_info *, short,short,short,unsigned long*,char);
<       void (*fb_putpixels_rgb3) (struct fb_info *, short,short,short,unsigned char*,char);
<       void (*fb_copyarea2) (struct fb_info *, short,short,short,short,short,short);
< #endif
1094,1132d734
<
< /*------------FBUI data in fb_info--------------*/
< #ifdef CONFIG_FB_UI
<
<       struct fbui_window      *keyfocus_window [FBUI_MAXCONSOLES];
<       struct fbui_window      *pointerfocus_window [FBUI_MAXCONSOLES];
<
<       char    total_wins [FBUI_MAXCONSOLES];
<
<       unsigned char   redsize, greensize, bluesize;
<       unsigned char   redshift, greenshift, blueshift;
<
<       struct fbui_window      *window_managers [FBUI_MAXCONSOLES];
<       struct fbui_window      *windows [FBUI_MAXCONSOLES * FBUI_MAXWINDOWSPERVC];
<       struct rw_semaphore     winptrSem;
<
<       /* protection for each fbui_window struct */
<       struct semaphore        windowSems [FBUI_MAXCONSOLES * FBUI_MAXWINDOWSPERVC];
<
<       struct semaphore preSem;
<       struct fbui_processentry processentries [FBUI_MAXCONSOLES * FBUI_MAXWINDOWSPERVC];
<
<       u32             bgcolor[FBUI_MAXCONSOLES]; /* from window manager */
<       void            *accelerators [FBUI_TOTALACCELS * FBUI_MAXCONSOLES];
<       unsigned char   force_placement [FBUI_MAXCONSOLES];
<       struct tty_struct       *ttysave [FBUI_MAXCONSOLES];
<       struct fbui_window      *pointer_window [FBUI_MAXCONSOLES];
<       unsigned int    pointer_active : 1;
<       unsigned int    pointer_hidden : 1;
<       unsigned int    have_hardware_pointer: 1;
<       unsigned int    mode24 : 1;
<       short           curr_mouse_x, curr_mouse_y; /* <--primary */
<       short           mouse_x0, mouse_y0, mouse_x1, mouse_y1;
<
<       struct rw_semaphore     cutpaste_sem;
<       unsigned char   *cutpaste_buffer;
<       u32     cutpaste_length;
< #endif
<
diff -r FBUI2.6.12/include/linux/input.h SQFS2.6.12/include/linux/input.h
1020,1027d1019
< #ifdef CONFIG_INPUT_FBUI
< /* FBUI additions by Zachary T Smith, fbui@comcast.net */
< extern void fbui_input_enable(void);
< extern void fbui_input_disable(void);
< typedef void FBUIInputEventHandler (u32 , struct input_event *);
< extern void fbui_input_register_handler (FBUIInputEventHandler*, u32 param);
< #endif
<
  • vga=792 ¿¡¼­¸¸ ÇöÀç Àç´ë·Î µ¿ÀÛ
  • vga=791 À϶§µµ µÇµµ·Ï ÇÒ °Í

  • redshift µîÀÌ match µÇ´ÂÁö Á¡°ËÇØ¾ß ÇÔ.
  • Ʋ¸° °ÍÀÌ Çϳª ÀÖÀ½.
  • fbui/drivers/video/fbui.c

ID
Password
Join
Make a wish, it might come true.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-10-18 02:31:15
Processing time 0.0018 sec