gtk2/gdk/linux-fb/gdkselection-fb.c

432 lines
9.4 KiB
C
Raw Normal View History

2000-05-31 21:50:38 +00:00
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
2000-05-31 21:50:38 +00:00
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
2000-05-31 21:50:38 +00:00
*
* You should have received a copy of the GNU Lesser General Public
2000-05-31 21:50:38 +00:00
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
2000-05-31 21:50:38 +00:00
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include <config.h>
2000-05-31 21:50:38 +00:00
#include <string.h>
#include "gdkproperty.h"
#include "gdkselection.h"
#include "gdkprivate.h"
#include "gdkprivate-fb.h"
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
typedef struct _OwnerInfo OwnerInfo;
struct _OwnerInfo
{
GdkAtom selection;
GdkWindow *owner;
};
GSList *owner_list;
/* When a window is destroyed we check if it is the owner
* of any selections. This is somewhat inefficient, but
* owner_list is typically short, and it is a low memory,
* low code solution
*/
void
_gdk_selection_window_destroyed (GdkWindow *window)
{
GSList *tmp_list = owner_list;
while (tmp_list)
{
OwnerInfo *info = tmp_list->data;
tmp_list = tmp_list->next;
if (info->owner == window)
{
owner_list = g_slist_remove (owner_list, info);
g_free (info);
}
}
}
2000-05-31 21:50:38 +00:00
gint
gdk_selection_owner_set_for_display (GdkDisplay *display,
GdkWindow *owner,
GdkAtom selection,
guint32 time,
gint send_event)
2000-05-31 21:50:38 +00:00
{
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
GSList *tmp_list;
OwnerInfo *info;
tmp_list = owner_list;
while (tmp_list)
{
info = tmp_list->data;
if (info->selection == selection)
{
owner_list = g_slist_remove (owner_list, info);
g_free (info);
break;
}
tmp_list = tmp_list->next;
}
if (owner)
{
info = g_new (OwnerInfo, 1);
info->owner = owner;
info->selection = selection;
owner_list = g_slist_prepend (owner_list, info);
}
return TRUE;
2000-05-31 21:50:38 +00:00
}
GdkWindow*
gdk_selection_owner_get_for_display (GdkDisplay *display,
GdkAtom selection)
2000-05-31 21:50:38 +00:00
{
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
OwnerInfo *info;
GSList *tmp_list;
tmp_list = owner_list;
while (tmp_list)
{
info = tmp_list->data;
if (info->selection == selection)
{
return info->owner;
}
tmp_list = tmp_list->next;
}
2000-05-31 21:50:38 +00:00
return NULL;
}
void
gdk_selection_convert (GdkWindow *requestor,
GdkAtom selection,
GdkAtom target,
guint32 time)
{
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
GdkEvent *event;
GdkWindow *owner;
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
GdkWindow *event_window;
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
owner = gdk_selection_owner_get (selection);
if (owner)
{
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
event_window = gdk_fb_other_event_window (owner, GDK_SELECTION_REQUEST);
if (event_window)
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
{
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
event = gdk_event_make (event_window, GDK_SELECTION_REQUEST, TRUE);
event->selection.requestor = (unsigned int)requestor;
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
event->selection.selection = selection;
event->selection.target = target;
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
event->selection.property = _gdk_selection_property;
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
}
}
else
{
/* If no owner for the specified selection exists, the X server
* generates a SelectionNotify event to the requestor with property None.
*/
gdk_selection_send_notify ((guint32)requestor,
selection,
target,
GDK_NONE,
0);
}
2000-05-31 21:50:38 +00:00
}
gint
gdk_selection_property_get (GdkWindow *requestor,
guchar **data,
GdkAtom *ret_type,
gint *ret_format)
{
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
guchar *t = NULL;
GdkAtom prop_type;
gint prop_format;
gint prop_len;
2000-05-31 21:50:38 +00:00
g_return_val_if_fail (requestor != NULL, 0);
g_return_val_if_fail (GDK_IS_WINDOW (requestor), 0);
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
if (!gdk_property_get (requestor,
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
_gdk_selection_property,
NULL/*AnyPropertyType?*/,
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
0, 0,
FALSE,
&prop_type, &prop_format, &prop_len,
&t))
{
*data = NULL;
return 0;
}
2000-05-31 21:50:38 +00:00
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
if (ret_type)
*ret_type = prop_type;
if (ret_format)
*ret_format = prop_format;
if (!gdk_property_get (requestor,
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
_gdk_selection_property,
NULL/*AnyPropertyType?*/,
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
0, prop_len + 1,
FALSE,
&prop_type, &prop_format, &prop_len,
&t))
{
*data = NULL;
return 0;
}
*data = t;
return prop_len;
2000-05-31 21:50:38 +00:00
}
void
gdk_selection_send_notify_for_display (GdkDisplay *display,
guint32 requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
guint32 time)
2000-05-31 21:50:38 +00:00
{
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
GdkEvent *event;
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
GdkWindow *event_window;
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
event_window = gdk_fb_other_event_window (gdk_window_lookup ((GdkNativeWindow) requestor), GDK_SELECTION_NOTIFY);
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
if (event_window)
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
{
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
event = gdk_event_make (event_window, GDK_SELECTION_NOTIFY, TRUE);
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
event->selection.selection = selection;
event->selection.target = target;
event->selection.property = property;
event->selection.requestor = (GdkNativeWindow) requestor;
}
2000-05-31 21:50:38 +00:00
}
gint
gdk_text_property_to_text_list_for_display (GdkDisplay *display,
GdkAtom encoding,
gint format,
const guchar *text,
gint length,
gchar ***list)
2000-05-31 21:50:38 +00:00
{
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
g_warning ("gdk_text_property_to_text_list() not implemented\n");
2000-05-31 21:50:38 +00:00
return 0;
}
void
gdk_free_text_list (gchar **list)
{
g_return_if_fail (list != NULL);
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
g_warning ("gdk_free_text_list() not implemented\n");
2000-05-31 21:50:38 +00:00
}
gint
gdk_string_to_compound_text_for_display (GdkDisplay *display,
const gchar *str,
GdkAtom *encoding,
gint *format,
guchar **ctext,
gint *length)
2000-05-31 21:50:38 +00:00
{
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
g_warning ("gdk_string_to_compound_text() not implemented\n");
2000-05-31 21:50:38 +00:00
return 0;
}
void gdk_free_compound_text (guchar *ctext)
{
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
g_warning ("gdk_free_compound_text() not implemented\n");
2000-05-31 21:50:38 +00:00
}
gchar *
gdk_utf8_to_string_target (const gchar *str)
{
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
g_warning ("gdk_utf8_to_string_target() not implemented\n");
return NULL;
}
gboolean
gdk_utf8_to_compound_text_for_display (GdkDisplay *display,
const gchar *str,
GdkAtom *encoding,
gint *format,
guchar **ctext,
gint *length)
{
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
g_warning ("gdk_utf8_to_compound_text() not implemented\n");
return 0;
}
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
static gint
make_list (const gchar *text,
gint length,
gboolean latin1,
gchar ***list)
{
GSList *strings = NULL;
gint n_strings = 0;
gint i;
const gchar *p = text;
const gchar *q;
GSList *tmp_list;
GError *error = NULL;
while (p < text + length)
{
gchar *str;
q = p;
while (*q && q < text + length)
q++;
if (latin1)
{
str = g_convert (p, q - p,
"UTF-8", "ISO-8859-1",
NULL, NULL, &error);
if (!str)
{
g_warning ("Error converting selection from STRING: %s",
error->message);
g_error_free (error);
}
}
else
str = g_strndup (p, q - p);
if (str)
{
strings = g_slist_prepend (strings, str);
n_strings++;
}
p = q + 1;
}
if (list)
*list = g_new (gchar *, n_strings + 1);
(*list)[n_strings] = NULL;
i = n_strings;
tmp_list = strings;
while (tmp_list)
{
if (list)
(*list)[--i] = tmp_list->data;
else
g_free (tmp_list->data);
tmp_list = tmp_list->next;
}
g_slist_free (strings);
return n_strings;
}
gint
gdk_text_property_to_utf8_list_for_display (GdkDisplay *display,
GdkAtom encoding,
gint format,
const guchar *text,
gint length,
gchar ***list)
{
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
g_return_val_if_fail (text != NULL, 0);
g_return_val_if_fail (length >= 0, 0);
if (encoding == GDK_TARGET_STRING)
{
return make_list ((gchar *)text, length, TRUE, list);
}
else if (encoding == gdk_atom_intern ("UTF8_STRING", FALSE))
{
return make_list ((gchar *)text, length, FALSE, list);
}
else
{
gchar **local_list;
gint local_count;
gint i;
const gchar *charset = NULL;
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
gboolean need_conversion = !g_get_charset (&charset);
gint count = 0;
GError *error = NULL;
/* Probably COMPOUND text, we fall back to Xlib routines
*/
local_count = gdk_text_property_to_text_list (encoding,
format,
text,
length,
&local_list);
if (list)
*list = g_new (gchar *, local_count + 1);
for (i = 0; i < local_count; i++)
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
{
/* list contains stuff in our default encoding
*/
if (need_conversion)
{
gchar *utf = g_convert (local_list[i], -1,
"UTF-8", charset,
NULL, NULL, &error);
if (utf)
{
if (list)
(*list)[count++] = utf;
else
g_free (utf);
}
else
{
g_warning ("Error converting to UTF-8 from '%s': %s",
charset, error->message);
g_error_free (error);
error = NULL;
}
}
else
{
if (list)
(*list)[count++] = g_strdup (local_list[i]);
}
}
gdk_free_text_list (local_list);
(*list)[count] = NULL;
return count;
}
}