]> xenbits.xensource.com Git - seabios.git/commitdiff
vgafb: Move header definitions from vgabios.h to new file vgafb.h
authorKevin O'Connor <kevin@koconnor.net>
Thu, 4 Aug 2016 21:53:45 +0000 (17:53 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 4 Aug 2016 21:53:45 +0000 (17:53 -0400)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgasrc/cbvga.c
vgasrc/swcursor.c
vgasrc/vgabios.c
vgasrc/vgabios.h
vgasrc/vgafb.c
vgasrc/vgafb.h [new file with mode: 0644]

index 1cfb9d3773d63103915b880446f777c0a0250ea1..b4d7d36bc2677086f19a95a585dd904f0cb418d9 100644 (file)
@@ -11,6 +11,7 @@
 #include "string.h" // memset16_far
 #include "util.h" // find_cb_table
 #include "vgabios.h" // VGAREG_*
+#include "vgafb.h" // handle_gfx_op
 
 static int CBmode VAR16;
 static struct vgamode_s CBmodeinfo VAR16;
index 83f48226d051a2c2feda76bfa6255b33a8feb0fc..b7b32506517e03d09c1eb407a71b163923f284b1 100644 (file)
@@ -6,7 +6,8 @@
 
 #include "biosvar.h" // GET_BDA
 #include "bregs.h" // struct bregs
-#include "vgabios.h" // handle_gfx_op
+#include "vgabios.h" // get_cursor_pos
+#include "vgafb.h" // handle_gfx_op
 
 // Draw/undraw a cursor on the framebuffer by xor'ing the cursor cell
 static void
index 4e897c4b85ad71990be22219d8ab3df91b500e8d..44ce312d81a949717fc92a937d9f8e62f01112d3 100644 (file)
@@ -14,6 +14,7 @@
 #include "stdvga.h" // stdvga_set_cursor_shape
 #include "string.h" // memset_far
 #include "vgabios.h" // calc_page_size
+#include "vgafb.h" // vgafb_write_char
 #include "vgahw.h" // vgahw_set_mode
 
 
index ffbb729b168af709fe8276937ec4486ba654e1b4..0e988bdbbf329dee1884108e963631c47e0a2991 100644 (file)
@@ -43,25 +43,6 @@ struct vgamode_s {
     u16 sstart;
 };
 
-// Graphics pixel operations.
-struct gfx_op {
-    struct vgamode_s *vmode_g;
-    u32 linelength;
-    u32 displaystart;
-
-    u8 op;
-    u16 x, y;
-
-    u8 pixels[8];
-    u16 xlen, ylen;
-    u16 srcy;
-};
-
-#define GO_READ8   1
-#define GO_WRITE8  2
-#define GO_MEMSET  3
-#define GO_MEMMOVE 4
-
 // Custom internal storage in BDA (don't change here without also
 // updating vgaentry.S)
 #define VGA_CUSTOM_BDA 0xb9
@@ -107,12 +88,6 @@ extern struct video_param_s video_param_table[29];
 extern int VgaBDF;
 extern int HaveRunInit;
 #define SET_VGA(var, val) SET_FARVAR(get_global_seg(), (var), (val))
-struct carattr {
-    u8 car, attr, use_attr, pad;
-};
-struct cursorpos {
-    u8 x, y, page, pad;
-};
 int vga_bpp(struct vgamode_s *vmode_g);
 u16 calc_page_size(u8 memmodel, u16 width, u16 height);
 u16 get_cursor_shape(void);
@@ -122,17 +97,6 @@ struct vgamode_s *get_current_mode(void);
 int vga_set_mode(int mode, int flags);
 extern struct video_func_static static_functionality;
 
-// vgafb.c
-void init_gfx_op(struct gfx_op *op, struct vgamode_s *vmode_g);
-void handle_gfx_op(struct gfx_op *op);
-void *text_address(struct cursorpos cp);
-void vgafb_scroll(struct cursorpos win, struct cursorpos winsize
-                  , int lines, struct carattr ca);
-void vgafb_write_char(struct cursorpos cp, struct carattr ca);
-struct carattr vgafb_read_char(struct cursorpos cp);
-void vgafb_write_pixel(u8 color, u16 x, u16 y);
-u8 vgafb_read_pixel(u16 x, u16 y);
-
 // swcursor.c
 struct bregs;
 void swcursor_pre_handle10(struct bregs *regs);
index 57ecc9b0a5c409a5a1a37eb6c822cd4d5512dde8..04d543eed2978f443e58d72a99958b8eaff90cd4 100644 (file)
@@ -11,6 +11,7 @@
 #include "stdvga.h" // stdvga_planar4_plane
 #include "string.h" // memset_far
 #include "vgabios.h" // vgafb_scroll
+#include "vgafb.h" // vgafb_write_char
 #include "vgahw.h" // vgahw_get_linelength
 
 static inline void
diff --git a/vgasrc/vgafb.h b/vgasrc/vgafb.h
new file mode 100644 (file)
index 0000000..ccdc703
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef __VGAFB_H
+#define __VGAFB_H
+
+// Graphics pixel operations.
+struct gfx_op {
+    struct vgamode_s *vmode_g;
+    u32 linelength;
+    u32 displaystart;
+
+    u8 op;
+    u16 x, y;
+
+    u8 pixels[8];
+    u16 xlen, ylen;
+    u16 srcy;
+};
+
+#define GO_READ8   1
+#define GO_WRITE8  2
+#define GO_MEMSET  3
+#define GO_MEMMOVE 4
+
+struct cursorpos {
+    u8 x, y, page, pad;
+};
+
+struct carattr {
+    u8 car, attr, use_attr, pad;
+};
+
+// vgafb.c
+void init_gfx_op(struct gfx_op *op, struct vgamode_s *vmode_g);
+void handle_gfx_op(struct gfx_op *op);
+void *text_address(struct cursorpos cp);
+void vgafb_scroll(struct cursorpos win, struct cursorpos winsize
+                  , int lines, struct carattr ca);
+void vgafb_write_char(struct cursorpos cp, struct carattr ca);
+struct carattr vgafb_read_char(struct cursorpos cp);
+void vgafb_write_pixel(u8 color, u16 x, u16 y);
+u8 vgafb_read_pixel(u16 x, u16 y);
+
+#endif // vgafb.h