Commit Graph

39 Commits

Author SHA1 Message Date
Owen Taylor
788bbf520a Add a draw-border style property to allow themes to draw outside the
2005-04-28  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c: Add a draw-border style property to allow
	themes to draw outside the widget's allocation.

	* gdk/gdkwindow.c gtk/gtkstyle.c: Remove some save/restore pairs
	that were working around the clip-leakage bug in Cairo.

	* gtk/gtkstyle.c: Use cairo_fill_preserve() rathe than
	save/fill/restore.

	* gdk/gdkgc.c gdk/gdkinternals.h: Add _gdk_gc_update_context()
	That updates a Cairo context to match a GC.

	* gdk/gdkdraw.c: Use _gdk_gc_update_context() to add support
	for tiles/stipples/clipping to gdk_draw_glyphs(),
	gdk_draw_trapezoids().

	* gdk/gdkpango.c: Use _gdk_gc_update_context() instead of internal
	implementation of stipples. Use one cairo_t across the entire
	drawing operation. Replace cairo_matrix_create() with
	stack-allocated matrices.

	* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
	gdk/win32/gdkgc-win32.c: Save various aspects of the
	GC state (fill, tile, stipple, foreground, background, clip region)
	in instance-private-data for future use. Add getters.
	Get rid of _gdk_windowing_gc_get_foreground() function implemented
	by the backends.

	* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
	gdk/win32/gdkgc-win32.c gdk/linux-fb/gdkgc-fb.c: Add
	_gdk_gc_init() to do initial setup of the GC from values;
	fixes some problems from drawable redirection.

	* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
	gdk/win32/gdkgc-win32.c gdk/linux-fb/gdkgc-fb.c: Move
	gdk_gc_copy() and gdk_gc_set_clip_{region,rectangle}() into
	the generic code, add _gdk_windowing_gc_copy(),
	_gdk_windowing_gc_set_clip_region() to do backend specific
	stuff.

	* gdk/x11/{gdkprivate-x11.h,gdkgc-x11.c.c,gdkdrawable-x11.c}
	gdk/win32/{gdkprivate-win32.h,gdkgc-x11.c.c,gdkdrawable-x11.c}
	gdk/linux-fb/{gdkprivate-fb.h,gdkgc-fb.c.c,gdkdrawable-fb.c}:
	Don't duplicate state that now is stored by the generic code.

	* gdk/gdk.symbols Update
2005-05-02 23:29:24 +00:00
Matthias Clasen
8667afb656 Make the fb backend compile against current freetype. (#148558, Nicolas
2004-07-28  Matthias Clasen  <mclasen@redhat.com>

	* gdk/linux-fb/gdkprivate-fb.h: Make the fb backend compile against
	current freetype.  (#148558, Nicolas Deves)
2004-07-28 16:04:53 +00:00
Matthias Clasen
83c626bbe0 Remove dubious bitfields of unspecified signedness. (#112919, Morten
2003-05-27  Matthias Clasen  <maclas@gmx.de>

	* io-wbmp.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)gdk-p

	* gdk-pixdata.c (gdk_pixdata_to_csource): Replace all occurances
	of g_string_new ("") by g_string_new (NULL). (#106975, Morten Welinder)

	* gtk/gtkwindow-decorate.c:
	* gtk/gtktreeprivate.h:
	* gtk/gtkdnd.c:
	* gdk/win32/gdkwindow-win32.h:
	* gdk/linux-fb/gdkprivate-fb.h:
	* gdk/linux-fb/gdkkeyboard-fb.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)

	* gtk/queryimmodules.c (escape_string):
	* gtk/gtktextbtree.c (_gtk_text_btree_get_text):
	* gtk/gtksettings.c (_gtk_settings_parse_convert):
	* gtk/gtkrc.c (gtk_rc_parse_assignment):
	* gtk/gtkinputdialog.c (gtk_input_dialog_set_key):
	* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Replace all
	occurances of g_string_new ("") by g_string_new (NULL). (#106975,
	Morten Welinder)
2003-05-27 21:21:00 +00:00
Eric Warmenhoven
095bea4512 More proper vt switch handling
Wed Dec  4 19:41:14 2002  Eric Warmenhoven <eric@warmenhoven.org>

	* gdk/linux-fb/gdkglobals-fb.c gdk/linux-fb/gdkkeyboard-fb.c
	gdk/linux-fb/gdkmain-fb.c gdk/linux-fb/gdkprivate-fb.h
	gdk/linux-fb/gdkrender-fb.c: More proper vt switch handling
2002-12-05 16:28:35 +00:00
Owen Taylor
209fd4cc5d Make 'filled' arguments for draw_arc/polygon/rectangle gboolean not gint.
Wed Oct 16 14:32:43 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkpixmap.c
        gdk/gdkwindow.c gdk/x11/gdkdrawable-x11.c
        gdk/win32/gdkdrawable-win32.c gdk/linux-fb/gdkdrawable-fb2.c
        gdk/linux-fb/gdkprivate-fb.h:
        Make 'filled' arguments for draw_arc/polygon/rectangle
        gboolean not gint. (#94976)
2002-10-16 18:41:42 +00:00
Owen Taylor
5102e76f2b Patch from Eric Warmenhoven to with miscellaneous linux-fb fixes,
Sun Sep 22 18:22:37 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/linux-fb/{gdkinput.c,gdkkeyboard-fb.c,gdk/linux-fb/gdkmain-fb.c,
        gdk/linux-fb/gdkprivate-fb.h, gdk/linux-fb/gdkwindow-fb.c}:
        Patch from Eric Warmenhoven to with miscellaneous linux-fb
        fixes, including a fix for a crash in
        gdk_keymap_get_entries_for_keycode (#87420)
2002-09-22 22:32:05 +00:00
Owen Taylor
7ddfec4f80 Patch from Eric Warmonhoven to get linux-fb compiling with multihead
Tue Sep 10 11:11:09 2002  Owen Taylor  <otaylor@redhat.com>
        * gdk/linux-fb/*: Patch from Eric Warmonhoven to
        get linux-fb compiling with multihead changes.
2002-09-10 15:19:13 +00:00
Alex Larsson
588e9d1dc0 Implement copy_to_image instead of get_image
2002-01-25  Alex Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkdrawable-fb2.c (gdk_drawable_impl_fb_class_init):
	Implement copy_to_image instead of get_image

	* gdk/linux-fb/gdkimage-fb.c:
	Implement _gdk_image_new_for_depth, _gdk_windowing_get_bits_for_depth and
	_gdk_fb_copy_to_image.
	Based in part on patch from Mathieu Lacage <mathieu_lacage@realmagic.fr>

	* gdk/linux-fb/gdkmain-fb.c:
	Make ENABLE_FB_MANAGER region larger.

	* gdk/linux-fb/gdkprivate-fb.h:
	Change _gdk_fb_get_image to _gdk_fb_copy_to_image.
2002-01-25 17:10:03 +00:00
Owen Taylor
1bbf2ac7ee Make gdkx.h the only installed header from gdk/x11. All structures in
Fri Sep  7 11:51:44 2001  Owen Taylor  <otaylor@redhat.com>

      Make gdkx.h the only installed header from gdk/x11.
      All structures in gdk/x11 are opaque.

	* gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h:
	Don't install gdk{drawable,pixmap,window}-x11.h.

	* gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c:
	Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11,
	GdkVisualClass into C files.

	* gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static.

	* gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c,
	gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c}
	Add public functions to replace previously exported direct
	structure access.
	gdk_x11_colormap_get_{xdisplay,xcolormap}
	gdk_x11_cursor_get_{xdisplay,xcursor},
	gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual,
	gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage},
	gdk_x11_gc_get_{xdisplay,ximage}

	* gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo,
	GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals.

      Fix a number of variables and functions that were exported
      "accidentally" from GDK.

	* gdk/**.[ch]: gdk => _gdk for gdk_visual_init,
	gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit,
	gdk_input_exit,	gdk_windowing_exit, gdk_event_func, gdk_event_data,
	gdk_event_notify, gdk_queued_events, gdk_queued_tail,
	gdk_event_new, gdk_events_queue, gdk_events_unqueue,
	gdk_event_queue_find_first, gdk_event_queue_remove_link,
	gdk_event_queue_append, gdk_event_button_generate,
	gdk_debug_flags, gdk_default_filters, gdk_parent_root.

	* gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c,
	   gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}:
	gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks,
	gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window,
	gdk_use_xshm, gdk_input_ignore_core.

	* gdk/x11/xsettings-common.h (xsettings_list_insert): Add
	#defines to namespace functions into the private _gdk_
	namespace.

	* gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window ()
	to replace gdk_parent_root exported variable. Adjust and
	deprecate GDK_ROOT_PARENT().

	* demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix
	GDK_ROOT_PARENT usage, remove includes of port-specific
	headers.

	* gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for
	_gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core,
	gdk_input_devices, _gdk_input_windows, gdk_init_input_core.

	* gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c}
	docs/Changes-2.0.txt: Remove gdk_wm_protocols,
	gdk_wm_delete_window functions, gdk_wm_take_focus,
	use gdk_atom_intern() instead.

	* gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h}
	  gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h}
	  gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h}
	  gtk/gtkselection.c
        Unexport gdk_selection_property, just use
	gdk_atom_intern ("GDK_SELECTION").

	* gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}:
	Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type,
	GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate,
	GdkVisualprivate, gdk_x11_gc_flush.

      Make a number of public exports of variables into functions
      to increase encapsulation.

	* gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h
	gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer,
	move to gdkinternals.h. Add gdk_device_get_core_pointer ().

	* gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h
	docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code,
	gdk_error_warnings.

	* gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h}
	  docs/Changes-2.0.txt:
	s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen()
	s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow()
	Add gdk_x11_get_default_xdisplay().

	* gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c
	win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c
	gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class,
	Don't export gdk_progclass, move --class command line
	option and handling to common portion of GDK.

      Miscellaneous fixes:

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix
	g_return_val_if_fail that should have been g_return_if_fail.

	* gdk/gdkinternals.h gdk/gdkprivate.h: Move
	gdk_synthesize_window_state() to the semi-public gdkprivate.h.

	* gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded
	X11 dependency.

	* gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO:
	Remove unused gdk_key_repeat_disable/restore.

	* linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c
	x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def:
	Remove unused gdk_null_window_warnings variable.

	* gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox;
	it can be retrieved from the repository; it is too far
	from functional to be worth having people check out;
	it would be easier to start from scratch, I suspect.

	* gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID().

	* gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c
	gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c:
	Fix some accidentally global variables and unused global variables.

	* gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c
	gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c:
	Fix some accidentally global variables and unused global variables.

      Add some space for future expansion to multihead.

	* gdk/gdkdrawable.h: Add four reserved function pointers
	for future expansion of GdkDrawableClass.

	* gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer
	where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
Alex Larsson
ba02311234 Convert GdkDevice to a GObject.
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-30 04:30:32 +00:00
Alexander Larsson
75fd7f09af Added --enable-fbmanager. This is some experimental code that lets several
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-06-25 23:01:36 +00:00
Alexander Larsson
2c396fea9f Make sure you can compile out the implementation/wrapper assert macros.
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-05-10 22:44:27 +00:00
9
e275f77943 Define EMULATE_GDKFONT. Add extra pango_font stuff to GfkFontPrivate.
2001-01-19    <alexl@redhat.com>

	* gdk/linux-fb/gdkprivate-fb.h:
	Define EMULATE_GDKFONT.
	Add extra pango_font stuff to GfkFontPrivate.

	* gdk/linux-fb/gdkdrawable-fb2.c:
	* gdk/linux-fb/gdkfont-fb.c:
	If EMULATE_GDKFONT defined, implement a slow lame GdkFont
	emulation using PangoFont.
2001-01-19 10:38:12 +00:00
7
9012254c1e Doh! Mixed up x and y.
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-17 15:52:22 +00:00
Alexander Larsson
c288355ffd For optization, add an full_shapes argument to gdk_fb_clip_region. If this
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-15 09:54:28 +00:00
Alexander Larsson
058c2d9320 Take shaped windows in consideration when generating clip region.
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-12 15:45:26 +00:00
Alexander Larsson
b29eece81f Added ENABLE_SHADOW_FB
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.
2001-01-11 16:39:21 +00:00
Alexander Larsson
ee053ddd2e Uh? What happed? My cvs checkin got broken pipe.. 2000-12-21 10:33:40 +00:00
Alexander Larsson
6d0c6b792e New file containing the abstracted keyboard driver. Most code taken from
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-08 12:38:48 +00:00
Alexander Larsson
7fa13eaf35 Add gdkmouse-fb.c
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-06 17:27:52 +00:00
Alexander Larsson
f1046d9a66 Remove old debug g_warning(). (gdk_fb_draw_drawable): The src argument can
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-05 11:39:26 +00:00
Alexander Larsson
d77144614b Divide size by 2, not multiply.
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-12-04 17:59:43 +00:00
Alexander Larsson
b1b6c9fc7a Set the size of the font from the description. (gdk_text_width): Gross
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-29 13:49:37 +00:00
Alexander Larsson
7f8a4aa1c3 Fix filled arcs and commit previous stuff which i somehow missed. 2000-11-28 15:38:23 +00:00
Alexander Larsson
26b7063388 Implement configure events and correct enter/leave notification. 2000-11-28 08:44:02 +00:00
Alexander Larsson
1c805555ce Huge GtkFB patch with lots of small bugfixes and initial selections implementation.
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.
2000-11-25 15:44:35 +00:00
Alexander Larsson
5b4c8afa7e i2000-11-22 Alexander Larsson <alexl@redhat.com>
* 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-22 10:07:34 +00:00
Alexander Larsson
0c4f41198a Fixed some debug macros. 2000-11-15 13:48:13 +00:00
Alexander Larsson
2eb744a3c4 Added virtual functions set_pixel, get_color, fill_span and draw_drawable
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-15 12:45:30 +00:00
Alexander Larsson
be698675c7 Cleanup and reindent of GtkFB.
Added some serial mouse support.
Updates to latest Gtk+/pango
2000-11-13 17:40:23 +00:00
Alexander Larsson
8898529c12 Changes to make the new testgtk compile after gtk_menu_append was removed.
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-09 12:15:40 +00:00
Alexander Larsson
224f6ec534 use g_object_new() instead of g_type_create_instance() which is a private
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-07 14:18:47 +00:00
Alexander Larsson
214c61d575 Add last argument to t_type_register_static call.
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.
2000-11-02 15:38:04 +00:00
Elliot Lee
0176b387c8 Use G_GNUC_CONST.
Use G_GNUC_CONST.
2000-08-30 00:33:38 +00:00
Elliot Lee
d9e05d7009 We really do need to include gdkfb.h in order to get the GDK_PARENT_ROOT()
* 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.
2000-07-31 17:18:36 +00:00
Tim Janik
afee2c67c5 applied patch from Andreas Persenius <ndap@swipnet.se> that updates the
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.
2000-07-26 11:33:08 +00:00
Elliot Lee
6d7a643f7c (Part 2) Remove gdk_*_lookup() defines, since they are defined by the
(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.
2000-07-24 16:19:00 +00:00
Elliot Lee
dd7510dccb *** empty log message *** 2000-06-20 20:20:38 +00:00
Elliot Lee
c496211676 Put it into CVS.
Put it into CVS.
2000-05-31 21:50:38 +00:00