2001-06-30 Alex Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkinput-none.c:
* gdk/linux-fb/gdkinput.c:
* gdk/linux-fb/gdkinputprivate.h:
Convert GdkDevice to a GObject.
* linux-fb/gdkprivate-fb.h:
* linux-fb/gdkvisual-fb.c:
Convert GdkVisual to a GObject.
2001-06-25 Alexander Larsson <alexl@redhat.com>
* configure.in:
Added --enable-fbmanager. This is some experimental code
that lets several GtkFB apps coordinate their access to the
framebuffer.
* acconfig.h:
Added ENABLE_FB_MANAGER.
* gdk/linux-fb/Makefile.am:
Added gdkfbmanager and gdkfbswitch.
* gdk/linux-fb/gdkkeyboard-fb.c:
* gdk/linux-fb/gdkmouse-fb.c:
* gdk/linux-fb/gdkprivate-fb.h:
Split device init and open so that
they can be opened and closed while switched
away.
* gdk/linux-fb/gdkmain-fb.c:
Add the basic manager communication.
* gdk/linux-fb/gdkrender-fb.c:
Don't update to the shadow fb if we're
blocked by the fb manager.
2001-05-10 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkprivate-fb.h:
Make sure you can compile out the implementation/wrapper assert
macros.
* gdk/linux-fb/gdkdrawable-fb2.c:
Check implementation/wrappers, initialize type for pixmap dummys.
* gdk/linux-fb/gdkimage-fb.c (_gdk_fb_get_image):
Hide the cursor if reading from the screen.
* gdk/linux-fb/gdkrender-fb.c (gdk_fb_fill_span_generic):
Fix sign bug in tiling code.
* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_clear_area):
Handle background pixmaps.
2001-01-17 <alexl@redhat.com>
* gdk/linux-fb/gdkdrawable-fb2.c (gdk_shadow_fb_draw_arc):
Doh! Mixed up x and y.
* gdk/linux-fb/gdkglobals-fb.c:
Removed gdk_fb_pointer_grab_window_events,
added _gdk_fb_pointer_grab_owner_events and
_gdk_fb_keyboard_grab_owner_events.
* gdk/linux-fb/gdkmain-fb.c (gdk_fb_pointer_grab):
Set all button mask if GDK_BUTTON_MOTION_MASK set. Send
crossing events before grabbing. Set _gdk_fb_pointer_grab_owner_events.
(gdk_fb_pointer_ungrab): Unset _gdk_fb_pointer_grab_owner_events
Send crossing events after ungrab finished.
(gdk_keyboard_grab): Set ..._owner_events
(type_masks): Move out of function.
(gdk_fb_other_event_window, gdk_fb_pointer_event_window,
gdk_fb_keyboard_event_window): New functions, return the
window an event should be targeted at. Handles grabs and
event propagation. Can return NULL.
(gdk_event_make): Remove event_mask checking. Now always
returns an event.
* gdk/linux-fb/gdkkeyboard-fb.c:
* gdk/linux-fb/gdkproperty-fb.c:
* gdk/linux-fb/gdkselection-fb.c:
Use new event_window/gdk_event_make() behaviour.
* gdk/linux-fb/gdkmouse-fb.c:
Use new event_window/gdk_event_make() behaviour.
Only send motion events if in the same window.
If grabbed, use cursor from window if sibling of grabbed
window, and cursor from grabbed window otherwise.
* gdk/linux-fb/gdkprivate-fb.h:
Update gdk_fb_window_send_crossing_events, gdk_event_make
and grab varaible declarations. Add gdk_fb_*_event_window().
* gdk/linux-fb/gdkwindow-fb.c:
Use new event_window/gdk_event_make() behaviour.
Keep correct track of focus window.
(gdk_window_set_events): Set all specific button motion masks
if GDK_BUTTON_MOTION_MASK set.
* gtk/gtkdnd.c (gtk_drag_update):
Free info->last_event if gdk_drag_motion returned FALSE.
2001-01-15 Alexander Larsson <alexl@redhat.com>
* gdk/linux-fb/gdkdrawable-fb2.c:
For optization, add an full_shapes argument to gdk_fb_clip_region.
If this is false, only the cliprects of the shapes are used.
* gdk/linux-fb/gdkprivate-fb.h:
Export gdk_fb_window_peek_shape.
Add full_shapes to gdk_fb_clip_region.
* gdk/linux-fb/gdkwindow-fb.c (gdk_fb_window_move_resize):
When moving a window, don't clear everything under the it, just the
root window. Makes stuff faster and flash less.
(gdk_window_get_pointer): Correctly handle offseted shapes, due to
USE_CHILD_SHAPE. (gdk_fb_window_peek_shape): Return the correct
offset of the shape.
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.
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.
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
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.
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.
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.
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.
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.
* 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)
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.
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.
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.
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.
* 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.
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org>
* *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
updates the license headers to the GNU Lesser General Public License,
as well as updating the copyright year to 2000.
(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.