1. 12 Jan, 2001 1 commit
    • Alexander Larsson's avatar
      Take shaped windows in consideration when generating clip region. · 058c2d93
      Alexander Larsson authored
      2001-01-12  Alexander Larsson  <alexl@redhat.com>
      
      	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_clip_region): Take shaped
      	windows in consideration when generating clip region.
      
      	* gdk/linux-fb/gdkfb.h:
      	Huge HACK. Added GDK_FB_USE_CHILD_SHAPE.
      
      	* gdk/linux-fb/gdkprivate-fb.h:
      	Add shape to GdkWindowFBDatat.
      	exported gdk_fb_window_get_abs_shape().
      	removed gdk_fb_draw_lines declaration.
      
      	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_impl_fb_init):
      	Init shape to NULL. (gdk_fb_window_send_crossing_events): Don't
      	send focus changes when there is a grabbed window.
      	(gdk_window_get_pointer): Handle shaped windows.
      	(gdk_fb_region_create_from_bitmap): Convert bitmap to region.
      	(gdk_fb_window_peek_shape): Returns the shape for a window,
      	handles GDK_FB_USE_CHILD_SHAPE.
      	(gdk_fb_window_get_abs_shape): Returns the shape of the window,
      	offseted to absolute positions. Handles GDK_FB_USE_CHILD_SHAPE.
      	(gdk_window_shape_combine_mask): Implement.
      
      	* gtk/gtkwindow-decorate.c:
      	HACK! Set GDK_FB_USE_CHILD_SHAPE on window->frame to make sure
      	setting the shape of a window makes the window transparent.
      058c2d93
  2. 11 Jan, 2001 1 commit
    • Alexander Larsson's avatar
      Added ENABLE_SHADOW_FB · b29eece8
      Alexander Larsson authored
      2001-01-11  Alexander Larsson  <alexl@redhat.com>
      
      	* acconfig.h:
      	Added ENABLE_SHADOW_FB
      
      	* configure.in:
      	Added --disable-shadowfb
      
      	* gdk/linux-fb/gdkcursor-fb.c:
      	Update shadowfb when updating cursor
      
      	* gdk/linux-fb/gdkdrawable-fb2.c:
      	Added wrappers for shadowfb that calls 	the normal drawable
      	methods, but calls gdk_shadow_fb_update(bounding box) when
      	GdkWindows are drawed to.
      	Moved gdk_draw_glyphs implementation to _gdk_draw_glyphs
      	which also returns the bounding box.
      
      	* gdk/linux-fb/gdkfb.h:
      	Added GdkFBAngle type and gdk_fb_set_rotation declaration.
      
      	* gdk/linux-fb/gdkgeometry-fb.c:
      	Update shadowfb when scrolling window.
      
      	* gdk/linux-fb/gdkglobals-fb.c:
      	Add _gdk_fb_screen_angle.
      
      	* gdk/linux-fb/gdkkeyboard-fb.c:
      	Test code for screen rotation. Shift-F2 in the xlate driver
      	rotates the screen.
      
      	* gdk/linux-fb/gdkmain-fb.c:
      	Handle shadowfb. Add gdk_fb_set_rotation(). Remove CM and RP.
      
      	* gdk/linux-fb/gdkmouse-fb.c:
      	Use fb_width/height instead of modeinfo.xres/yres.
      
      	* gdk/linux-fb/gdkprivate-fb.h:
      	Added fb_men, fb_width, fb_height & fb_stride. When using
      	shadow fb these can differ from the framebuffer stuff.
      	Declarations for gdk_shadow_fb_update, gdk_shadow_fb_init,
      	gdk_shadow_fb_stop_updates, gdk_fb_recompute_all,
      	_gdk_fb_screen_angle. Removed CM, RP.
      
      	* gdk/linux-fb/gdkrender-fb.c:
      	Added code for shadowfb handling and screen rotation using
      	shadowfb.
      
      	* gdk/linux-fb/gdkwindow-fb.c:
      	Use fb_mem, fb_stride, fb_width, fb_height.
      	Added recompute_rowstride to reset the rowstride of all windows.
      	Added gdk_fb_recompute_all() which recomputes rootwindow size,
      	window abs positions and window rowstrides. Usefull when the
      	rotation has changed.
      b29eece8
  3. 21 Dec, 2000 1 commit
  4. 08 Dec, 2000 1 commit
    • Alexander Larsson's avatar
      New file containing the abstracted keyboard driver. Most code taken from · 6d0c6b79
      Alexander Larsson authored
      2000-12-08  Alexander Larsson  <alla@lysator.liu.se>
      
      	* gdk/linux-fb/gdkkeyboard-fb.c:
      	New file containing the abstracted keyboard driver. Most code
      	taken from gdkinput-ps2.c
      
      	* gdk/linux-fb/gdkinput-ps2.c:
      	Removed file.
      
      	* gdk/linux-fb/Makefile.am:
      	Added gdkkeyboard-fb.c, removed gdkinput-ps2.c.
      
      	* gdk/linux-fb/gdkcolor-fb.c:
      	display->fb was renamed to display->fb_fd.
      
      	* gdk/linux-fb/gdkcursor-fb.c:
      	gdk_mouse_get_info -> gdk_fb_mouse_get_info
      
      	* gdk/linux-fb/gdkinput.c:
      	Moved gdk_input_init here from gdkinput-ps2.c
      
      	* gdk/linux-fb/gdkmain-fb.c:
      	display->fb was renamed to display->fb_fd.
      	Now the tty and the console is opened here instead
      	of in the keyboard driver. Also check GDK_VT to see what
      	tty to open.
      	Move gdk_beep () here from gdkinput-ps2.c
      	gdk_mouse_get_info -> gdk_fb_mouse_get_info
      
      	* gdk/linux-fb/gdkmouse-fb.c:
      	Add header.
      	gdk_mouse_get_info -> gdk_fb_mouse_get_info
      	Return correct keyboard modifiers.
      	GDK_MOUSETYPE -> GDK_MOUSE_TYPE for consistancy
      
      	* gdk/linux-fb/gdkprivate-fb.h:
      	Add tty and vt info to display.
      	Add orignal modeinfo storage to display
      	Update global functions
      
      	* gdk/linux-fb/gdkwindow-fb.c:
      	Added gdk_fb_window_find_focus().
      	gdk_mouse_get_info -> gdk_fb_mouse_get_info
      6d0c6b79
  5. 06 Dec, 2000 1 commit
    • Alexander Larsson's avatar
      Add gdkmouse-fb.c · 7fa13eaf
      Alexander Larsson authored
      2000-12-06  Alexander Larsson  <alexl@redhat.com>
      
      	* gdk/linux-fb/Makefile.am:
      	Add gdkmouse-fb.c
      
      	* gdk/linux-fb/gdkmouse-fb.c:
      	New file. Abstracted the mouse drivers a bit.
      
      	* gdk/linux-fb/gdkcursor-fb.c:
      	The cursor hide/show functions was moved here from gdkinput-ps2.c.
      
      	* gdk/linux-fb/gdkinput-ps2.c:
      	Removed old mouse handling code. Moved cursor handling code
      	to gdkcursor-fb.c, moved gdk_fb_window_send_crossing_events() to
      	gdkwindow-fb.c. gdk_input_get_mouseinfo was renamed to
      	gdk_mouse_get_info.
      
      	* gdk/linux-fb/gdkmain-fb.c:
      	Pass NULL pointers for x,y in gdk_mouse_get_info call.
      
      	* gdk/linux-fb/gdkprivate-fb.h:
      	Removed public gdk_fb_find_common_ancestor, added and renamed
      	functions for the new mouse handling code.
      
      	* gdk/linux-fb/gdkwindow-fb.c:
      	Moved gdk_fb_window_send_crossing_events here. added global
      	variable gdk_fb_window_containing_pointer. made
      	gdk_fb_find_common_ancestor static. gdk_input_get_mouseinfo was
      	renamed to gdk_mouse_get_info.
      7fa13eaf
  6. 05 Dec, 2000 1 commit
    • Alexander Larsson's avatar
      Remove old debug g_warning(). (gdk_fb_draw_drawable): The src argument can · f1046d9a
      Alexander Larsson authored
      2000-12-05  Alexander Larsson  <alla@lysator.liu.se>
      
      	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
      	Remove old debug g_warning().
      	(gdk_fb_draw_drawable): The src argument can be either a wrapper
      	or an implementation, just pass the implementation to draw_drawable_2.
      
      	* gdk/linux-fb/gdkprivate-fb.h:
      	Added GDK_IS_DRAWABLE_IMPL_FBDATA()
      
      	* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
      	clear and invalidate area when window is destroyed.
      	(send_map_events): Remove old commented out code.
      f1046d9a
  7. 04 Dec, 2000 1 commit
    • Alexander Larsson's avatar
      Divide size by 2, not multiply. · d7714461
      Alexander Larsson authored
      2000-12-04  Alexander Larsson  <alexl@redhat.com>
      
      	* gdk/linux-fb/gdkfont-fb.c (gdk_text_width): Divide size by 2, not
      	multiply.
      
      	* gdk/linux-fb/gdkpango-fb.c:
      	Copied some 26.6 scaling macros from pango to clean up the rounding.
      	(pango_fb_font_get_glyph_info): Correct sign on x value.
      
      	* gdk/linux-fb/gdkprivate-fb.h:
      	Removed unreferenced external functions.
      
      	* modules/linux-fb/Makefile.am: Use ` instead of '.
      
      	* modules/linux-fb/basic.c:
      	Remove dead code. In particular the dummy lang engine which broke all
      	pango layouts in GtkFB. Don't include tables-big.i anymore.
      
      	* modules/linux-fb/tables-big.i:
      	Upgrade to latest version from pango. Left for reference, basic_ranges
      	moved to basic.c.
      d7714461
  8. 29 Nov, 2000 1 commit
    • Alexander Larsson's avatar
      Set the size of the font from the description. (gdk_text_width): Gross · b1b6c9fc
      Alexander Larsson authored
      2000-11-29  Alexander Larsson  <alexl@redhat.com>
      
      	* gdk/linux-fb/gdkfont-fb.c (gdk_font_from_description):
      	Set the size of the font from the description.
      	(gdk_text_width): Gross hack that calculates the width
      	of text by text_length * size/2. This is necessary because
      	GtkLabel does some ugly gtk_string_width call to calculate
      	an good size.
      	(linux-fb/gdkprivate-fb.h): Removed unused field FT_Face.
      b1b6c9fc
  9. 28 Nov, 2000 2 commits
  10. 25 Nov, 2000 1 commit
    • Alexander Larsson's avatar
      Huge GtkFB patch with lots of small bugfixes and initial selections implementation. · 1c805555
      Alexander Larsson authored
      2000-11-23  Alexander Larsson  <alexl@redhat.com>
      
      	* gdk/linux-fb/gdkselection-fb.c:
      	Initial selection implementation.
      
      	* gtk/gtkselection.c:
      	if GDK_WINDOWING_FB defined, include linux-fb/gdkfb.h and look up
      	requestor in gtk_selection_request.
      
      	* gdk/linux-fb/gdkfb.h, gdk/linux-fb/gdkglobals-fb.c:
      	Added gdk_selection_property atom.
      
      	* gdk/linux-fb/gdkprivate-fb.h:
      	Export _gdk_selection_window_destroyed.
      	Removed mask_off_x/y from GdkCursorPrivateFB.
      	Removed hbearing, added top, left to PangoFBGlyphInfo.
      
      	* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
      	Call _gdk_selection_window_destroyed
      	(_gdk_windowing_window_init): Don't call gdk_cursor_new() before
      	the root window has been created.
      	(static_dx_hack, static_dy_hack, compare_draw_rects,
      	gdk_fb_window_move_resize): Remove unnecessary sort of rectangles
      	in region. They are already sorted. Instead just traverse them in
      	reverse if draw_direction < 0.
      
      	* gdk/linux-fb/gdkinput-ps2.c (send_button_event):
      	Double-clicks must be sent after the normal button_press.
      	(gdk_fb_cursor_unhide): Remove usage of mask_off_x/y. Clean up.
      
      	* gdk/linux-fb/gdkgeometry-fb.c (gdk_window_scroll):
      	Pass _gdk_fb_screen_gc instead of NULL.
      
      	* gdk/linux-fb/gdkmain-fb.c (_gdk_windowing_init_check):
      	Initialize gdk_selection_property.
      	(gdk_event_make): Remove unused code.
      
      	* gdk/linux-fb/gdkcursor-fb.c:
      	Make the pixmap for the cursor the same size as the mask. Also remove
      	the mask_off_x/y fields in GdkCursorPrivateFB and combine
      	_gdk_cursor_new_from_pixmap() and gdk_cursor_new_from_pixmap()
      	Now the whole cursor is visible.
      
      	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
      	Fix bug where xdest+height instead of ydest+height was used
      	to calculate if the source and dest overlapped. This fixes the
      	redraw bug when the main window in testgtk was scrolled when
      	partially covered by a tall window.
      	Copy rectangles in region in order depending on draw_direction.
      	Also moved the draw_direction flipping of start_y and end_y into
      	the gc functions, as this might not be what all of them want.
      	(gdk_fb_draw_lines): Support dashed lines.
      	(gdk_fb_draw_glyphs): Clean up glyph placement. Also fix positioning
      	so that the text is positioned correctly (was 1 pixel high).
      
      	gdk/linux-fb/gdkgc-fb.c:
      	Initialize cap_style to GTK_CAP_BUTT. This fixes a problem where
      	all lines were drawn a pixel to short. Also checked the default of
      	the rest of the values, and they're the same as X now.
      
      	* gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_glyph_info):
      	Clean up pixel positioning of the glyphs. Just use bgy->top and
      	bgy->left. Also used PANGO_PIXEL where appropriate and added 0.5
      	to all divisions to get correct rounding behaviour.
      
      	* gdk/linux-fb/gdkrender-fb.c (gdk_fb_draw_drawable_generic,
      	gdk_fb_draw_drawable_memmove, gdk_fb_draw_drawable_aa_24):
      	Moved start_y/end_y flip into draw_drawable implementations.
      	Flip also x rendering when draw_direction < 0.
      	Remove unneccesary multiply with draw_direction.
      1c805555
  11. 22 Nov, 2000 1 commit
    • Alexander Larsson's avatar
      i2000-11-22 Alexander Larsson <alexl@redhat.com> · 5b4c8afa
      Alexander Larsson authored
              * gdk/gdktypes.h:
      	Add new type GdkSpan
      
      	* docs/reference/gdk/gdk-sections.txt,
      	docs/reference/gdk/tmpl/regions.sgml, gdk/gdkregion-generic.c,
      	gdk/gdkregion.h:
      	Implement and document gdk_region_spans_intersect_foreach.
      
      	* gdk/linux-fb/Makefile.am, gdk/linux-fb/gdkrender-fb.c:
      	Add new file gdkrender-fb.c which contains all core
      	rendering code.
      	Add gdk_fb_fill_rectangle_generic (old rectangle code) and
      	gdk_fb_fill_rectangle_simple_16, gdk_fb_fill_rectangle_simple_32
      	(optimized rectangle fillers).
      
      	* gdk/linux-fb/gdkdrawable-fb2.c:
      	Move all rendering code to gdkrender-fb.c.
      	Change from using GdkRectangles and GdkSegments for spans to GdkSpan.
      	Use the new span intersection functions in gdk_fb_fill_spans.
      	gdk_fb_draw_rectangle() clips filled rectangles and calls
      	gc->fill_rectangle with the result.
      	gdk_fb_fill_spans() gets extra argument "sorted".
      
      	* gdk/linux-fb/gdkevents-fb.c:
      	Remove unused includes and defines.
      	New function gdk_fb_get_time() to get correct time for events.
      
      	* gdk/linux-fb/gdkinput-ps2.c:
      	Use gdk method of generating multiple-clicks (gdk_event_button_generate)
      	Make sure to set the time of all events.
      
      	* gdk/linux-fb/gdkmain-fb.c:
      	Use gdk_fb_get_time ().
      
      	* gdk/linux-fb/gdkprivate-fb.h:
      	New virtual GC calls: fill_span & fill_rectangle.
      	Export gdk_fb_get_time().
      	gdk_fb_fill_spans() gets extra argument "sorted".
      
      	* gdk/linux-fb/mi*.c:
      	Use GdkSpan instead of GdkRectangle.
      	Pass correct sorted to gdk_fb_fill_spans. (sorted value taken
      	from XFree 4 source)
      5b4c8afa
  12. 15 Nov, 2000 2 commits
    • Alexander Larsson's avatar
      Fixed some debug macros. · 0c4f4119
      Alexander Larsson authored
      0c4f4119
    • Alexander Larsson's avatar
      Added virtual functions set_pixel, get_color, fill_span and draw_drawable · 2eb744a3
      Alexander Larsson authored
      2000-11-15  Alexander Larsson  <alla@lysator.liu.se>
      
      	* gdk/linux-fb/gdkprivate-fb.h:
      	Added virtual functions set_pixel, get_color,
      	fill_span and draw_drawable to the GC.
      	Added global _gdk_fb_screen_gc to use instead of
      	NULL when drawing to the screen.
      	Added _gdk_fb_gc_calc_state() prototype.
      
      	* gdk/linux-fb/gdkgc-fb.c:
      	Call _gdk_fb_gc_calc_state() on any gc state change.
      
      	* gdk/linux-fb/gdkglobals-fb.c:
      	Add _gdk_fb_screen_gc
      
      	* gdk/linux-fb/gdkdrawable-fb2.c:
      	_gdk_fb_gc_calc_state() calculates best functions
      	for the GC state and depth.
      	Moved bpp specialized code to separate functions.
      	Added optimized 24 bpp AA draw_drawable.
      
      	* gdk/linux-fb/gdkevents-fb.c:
      	Silence gcc warning.
      
      	* gdk/linux-fb/gdkimage-fb.c:
      	Use _gdk_fb_screen_gc
      
      	* gdk/linux-fb/gdkwindow-fb.c:
      	Init and use _gdk_fb_screen_gc
      
      	* gdk/linux-fb/mitypes.h:
      	Remove unused types.
      2eb744a3
  13. 13 Nov, 2000 1 commit
  14. 09 Nov, 2000 1 commit
    • Alexander Larsson's avatar
      Changes to make the new testgtk compile after gtk_menu_append was removed. · 8898529c
      Alexander Larsson authored
      2000-11-09  Alexander Larsson  <alexl@redhat.com>
      
      	* demos/testgtk/menus.c:
      	Changes to make the new testgtk compile after
      	gtk_menu_append was removed.
      
      	* gdk/linux-fb/gdkdrawable-fb2.c
      	(gdk_fb_get_depth, gdk_fb_get_visual,
      	gdk_drawable_impl_fb_class_init): Implement
      	these drawable functions. Now GtkImages work again.
      
      	* gdk/linux-fb/gdkimage-fb.c (_gdk_fb_get_image): Change prototype.
      
      	* gdk/linux-fb/gdkprivate-fb.h (_gdk_fb_get_image): Change prototype.
      
      	* gdk/linux-fb/gdkmain-fb.c (fb_modes_parse_mode,
      	gdk_fb_setup_mode_from_name, gdk_fb_set_mode, gdk_fb_display_new);
      	Parse /etc/fb.modes, use the environment variables GDK_DISPLAY_MODE,
      	GDK_DISPLAY_DEPTH, GDK_DISPLAY_WIDTH, GDK_DISPLAY_HEIGHT.
      8898529c
  15. 07 Nov, 2000 1 commit
    • Alexander Larsson's avatar
      use g_object_new() instead of g_type_create_instance() which is a private · 224f6ec5
      Alexander Larsson authored
      2000-11-07  Alexander Larsson  <alla@lysator.liu.se>
      
      	* gdk/linux-fb/gdkcolor-fb.c, gdk/linux-fb/gdkdnd-fb.c,
      	gdk/linux-fb/gdkgc-fb.c, gdk/linux-fb/gdkimage-fb.c,
      	gdk/linux-fb/gdkpango-fb.c, gdk/linux-fb/gdkpixmap-fb.c,
      	gdk/linux-fb/gdkwindow-fb.c:
      	use g_object_new() instead of g_type_create_instance() which
      	is a private function for fundamental type implementations.
      
      	* gdk/linux-fb/gdkinput-ps2.c:
      	Use MEDIUMRAW instead of RAW keycodes. Remove keyboard state-table
      	instead just store the current modifier state. Add a (somewhat broken)
      	keyboard input parser for XLATE mode too, if we couldn't use MEDIUMRAW.
      	Rename exported function gdk_input_ps2_get_mouseinfo to
      	gdk_input_get_mouseinfo.
      
      	* gdk/linux-fb/gdkmain-fb.c, gdk/linux-fb/gdkprivate-fb.h,
      	gdk/linux-fb/gdkwindow-fb.c:
      	gdk_input_ps2_get_mouseinfo was renamed to gdk_input_get_mouseinfo.
      224f6ec5
  16. 02 Nov, 2000 1 commit
    • Alexander Larsson's avatar
      Add last argument to t_type_register_static call. · 214c61d5
      Alexander Larsson authored
      2000-11-02  Alexander Larsson  <alexl@redhat.com>
      
      	* gdk/linux-fb/gdkcolor-fb.c, gdk/linux-fb/gdkdnd-fb.c,
      	gdk/linux-fb/gdkgc-fb.c, gdk/linux-fb/gdkpango-fb.c,
      	gdk/linux-fb/gdkpixmap-fb.c, gdk/linux-fb/gdkwindow-fb.c:
      	Add last argument to t_type_register_static call.
      
      	* gdk/linux-fb/gdkdrawable-fb2.c:
      	Add last argument to t_type_register_static call.
      	export the get_image drawable virtual function.
      
      	* gdk/linux-fb/gdkimage-fb.c:
      	Add last argument to t_type_register_static call.
      	rename gtk_image_get to _gdk_fb_get_image and
      	export it for use by gdkdrawable-fb2.
      
      	* gdk/linux-fb/gdkprivate-fb.h:
      	export _gdk_fb_get_image.
      
      	* gdk/linux-fb/gdkselection-fb.c:
      	Add new api call stubs.
      
      	* gtk/Makefile.am:
      	Missing ( in linux-fb part.
      
      	* modules/linux-fb/Makefile.am:
      	Must link with gdk_pixbuf or get unresolved symbol.
      214c61d5
  17. 30 Aug, 2000 1 commit
  18. 31 Jul, 2000 1 commit
    • Elliot Lee's avatar
      We really do need to include gdkfb.h in order to get the GDK_PARENT_ROOT() · d9e05d70
      Elliot Lee authored
      
      
      * gtk/gtkcolorsel.c: We really do need to include gdkfb.h in order to get the GDK_PARENT_ROOT()
      macro to work.
      * gtk/gtkmarshal.list: Add NONE:STRING,POINTER
      * gdk/gdkwindow.c: Don't send expose events, or invalidate pieces of, windows that aren't shown.
      * gdk/linux-fb: Redraw-when-menu-hidden solved, plus a bunch of pointer grab stuff.
      d9e05d70
  19. 26 Jul, 2000 1 commit
  20. 24 Jul, 2000 1 commit
    • Elliot Lee's avatar
      (Part 2) Remove gdk_*_lookup() defines, since they are defined by the · 6d7a643f
      Elliot Lee authored
      
      
      (Part 2)
      	* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
      	individual backends already.
      	* gdk/gdkregion-generic.h, gdk/gdktypes.h: Put gdkregionbox & gdksegment back together
      	again. Yes, there really is a good reason for this, if you are using the gdkregion
      	internals, and if you're not, why do you care?
      	* gdk/gdkwindow.c: Fix inverted condition
      	* gdk/linux-fb: Compiles (for me - it will not work elsewhere most likely).
      	* gtk/gtkcolorsel.c, gtk/gtkwindow.c: Add include for linux-fb
      	* gtk/gtkrange.c: Redraw trough when moving.
      	* gtk/gtktypeutils.c: Fix warning by adding const cast.
      	* modules/linux-fb/basic.c: Fix unknown glyph retrieval.
      6d7a643f
  21. 20 Jun, 2000 1 commit
  22. 31 May, 2000 1 commit