mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
updated <io.h> for open() use G_PI instead of M_PI
2005-07-03 Hans Breuer <hans@breuer.org> * **/makefile.msc[.in] : updated * gtk/gtkiconcache.c : <io.h> for open() * gtk/gtkstyle.c : use G_PI instead of M_PI * gdk/win32/gdkcursor-win32.c : implement gdk_cursor_new_from_name() by mapping the lower case win32 api name to the respective cursor. E.g. pass "wait" to get the IDC_WAIT cursor. Also allows to load cursors from named resources in the executable. (gdk_cursor_get_image) : just return NULL for now. * gdk/win32/gdkgeometry-win32.c : implement gdk_window_move_region() by delegation to ScollWindowEx(), untested. * gdk/win32/gdkwindow-win32.c : stub for gdk_window_set_urgency_hint()
This commit is contained in:
parent
1d1b9c7abe
commit
19e9165d64
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
||||
2005-07-03 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* **/makefile.msc[.in] : updated
|
||||
* gtk/gtkiconcache.c : <io.h> for open()
|
||||
* gtk/gtkstyle.c : use G_PI instead of M_PI
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c : implement gdk_cursor_new_from_name()
|
||||
by mapping the lower case win32 api name to the respective cursor.
|
||||
E.g. pass "wait" to get the IDC_WAIT cursor. Also allows to load
|
||||
cursors from named resources in the executable.
|
||||
(gdk_cursor_get_image) : just return NULL for now.
|
||||
|
||||
* gdk/win32/gdkgeometry-win32.c : implement gdk_window_move_region()
|
||||
by delegation to ScollWindowEx(), untested.
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c : stub for gdk_window_set_urgency_hint()
|
||||
|
||||
2005-07-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkimagemenuitem.c: Hmm, when committing my vertical
|
||||
|
@ -1,3 +1,20 @@
|
||||
2005-07-03 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* **/makefile.msc[.in] : updated
|
||||
* gtk/gtkiconcache.c : <io.h> for open()
|
||||
* gtk/gtkstyle.c : use G_PI instead of M_PI
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c : implement gdk_cursor_new_from_name()
|
||||
by mapping the lower case win32 api name to the respective cursor.
|
||||
E.g. pass "wait" to get the IDC_WAIT cursor. Also allows to load
|
||||
cursors from named resources in the executable.
|
||||
(gdk_cursor_get_image) : just return NULL for now.
|
||||
|
||||
* gdk/win32/gdkgeometry-win32.c : implement gdk_window_move_region()
|
||||
by delegation to ScollWindowEx(), untested.
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c : stub for gdk_window_set_urgency_hint()
|
||||
|
||||
2005-07-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkimagemenuitem.c: Hmm, when committing my vertical
|
||||
|
@ -1,3 +1,20 @@
|
||||
2005-07-03 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* **/makefile.msc[.in] : updated
|
||||
* gtk/gtkiconcache.c : <io.h> for open()
|
||||
* gtk/gtkstyle.c : use G_PI instead of M_PI
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c : implement gdk_cursor_new_from_name()
|
||||
by mapping the lower case win32 api name to the respective cursor.
|
||||
E.g. pass "wait" to get the IDC_WAIT cursor. Also allows to load
|
||||
cursors from named resources in the executable.
|
||||
(gdk_cursor_get_image) : just return NULL for now.
|
||||
|
||||
* gdk/win32/gdkgeometry-win32.c : implement gdk_window_move_region()
|
||||
by delegation to ScollWindowEx(), untested.
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c : stub for gdk_window_set_urgency_hint()
|
||||
|
||||
2005-07-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkimagemenuitem.c: Hmm, when committing my vertical
|
||||
|
@ -44,6 +44,7 @@ OBJECTS = \
|
||||
gdk-pixbuf-scale.obj \
|
||||
gdk-pixbuf-util.obj \
|
||||
gdk-pixbuf.obj \
|
||||
gdk-pixbuf-simple-anim.obj \
|
||||
gdk-pixdata.obj \
|
||||
io-bmp.obj \
|
||||
io-wbmp.obj \
|
||||
|
@ -73,6 +73,7 @@ all: \
|
||||
|
||||
gdk_OBJECTS = \
|
||||
gdk.obj \
|
||||
gdkcairo.obj \
|
||||
gdkcolor.obj \
|
||||
gdkcursor.obj \
|
||||
gdkdisplay.obj \
|
||||
|
@ -322,6 +322,49 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
return _gdk_win32_cursor_new_from_hcursor (hcursor, GDK_CURSOR_IS_PIXMAP);
|
||||
}
|
||||
|
||||
static struct {
|
||||
char *name;
|
||||
char *id;
|
||||
} _default_cursors[] = {
|
||||
{ "appstarting", IDC_APPSTARTING },
|
||||
{ "arrow", IDC_ARROW },
|
||||
{ "cross", IDC_CROSS },
|
||||
#if 0 /* in the SDK docs but not the headers ? */
|
||||
{ "hand", IDC_HAND },
|
||||
#endif
|
||||
{ "help", IDC_HELP },
|
||||
{ "ibeam", IDC_IBEAM },
|
||||
{ "sizeall", IDC_SIZEALL },
|
||||
{ "sizenesw", IDC_SIZENESW },
|
||||
{ "sizens", IDC_SIZENS },
|
||||
{ "sizenwse", IDC_SIZENWSE },
|
||||
{ "sizewe", IDC_SIZEWE },
|
||||
{ "uparrow", IDC_UPARROW },
|
||||
{ "wait", IDC_WAIT }
|
||||
};
|
||||
|
||||
GdkCursor*
|
||||
gdk_cursor_new_from_name (GdkDisplay *display,
|
||||
const gchar *name)
|
||||
{
|
||||
HCURSOR hcursor = NULL;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS(_default_cursors); i++)
|
||||
{
|
||||
if (0 == strcmp(_default_cursors[i].name, name))
|
||||
hcursor = LoadCursor (NULL, _default_cursors[i].id);
|
||||
}
|
||||
/* allow to load named cursor resources linked into the executable */
|
||||
if (!hcursor)
|
||||
hcursor = LoadCursor (_gdk_app_hmodule, name);
|
||||
|
||||
if (hcursor)
|
||||
return _gdk_win32_cursor_new_from_hcursor (hcursor, GDK_X_CURSOR);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_cursor_destroy (GdkCursor *cursor)
|
||||
{
|
||||
@ -348,6 +391,13 @@ gdk_cursor_get_display (GdkCursor *cursor)
|
||||
return gdk_display_get_default ();
|
||||
}
|
||||
|
||||
GdkPixbuf*
|
||||
gdk_cursor_get_image (GdkCursor *cursor)
|
||||
{
|
||||
/* could certainly be implmented but from docs may also */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GdkCursor *
|
||||
gdk_cursor_new_from_pixbuf (GdkDisplay *display,
|
||||
GdkPixbuf *pixbuf,
|
||||
|
@ -177,6 +177,84 @@ gdk_window_scroll (GdkWindow *window,
|
||||
gdk_region_destroy (invalidate_region);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_move_region (GdkWindow *window,
|
||||
GdkRegion *region,
|
||||
gint dx,
|
||||
gint dy)
|
||||
{
|
||||
GdkRegion *invalidate_region;
|
||||
GdkWindowImplWin32 *impl;
|
||||
GdkWindowObject *obj;
|
||||
GdkRectangle src_rect, dest_rect;
|
||||
HRGN hrgn;
|
||||
RECT clipRect, destRect;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
obj = GDK_WINDOW_OBJECT (window);
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
|
||||
|
||||
if (dx == 0 && dy == 0)
|
||||
return;
|
||||
|
||||
/* Move the current invalid region */
|
||||
if (obj->update_area)
|
||||
gdk_region_offset (obj->update_area, dx, dy);
|
||||
|
||||
/* impl->position_info.clip_rect isn't meaningful for toplevels */
|
||||
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD)
|
||||
src_rect = impl->position_info.clip_rect;
|
||||
else
|
||||
{
|
||||
src_rect.x = 0;
|
||||
src_rect.y = 0;
|
||||
src_rect.width = impl->width;
|
||||
src_rect.height = impl->height;
|
||||
}
|
||||
|
||||
invalidate_region = gdk_region_rectangle (&src_rect);
|
||||
|
||||
dest_rect = src_rect;
|
||||
dest_rect.x += dx;
|
||||
dest_rect.y += dy;
|
||||
gdk_rectangle_intersect (&dest_rect, &src_rect, &dest_rect);
|
||||
|
||||
if (dest_rect.width > 0 && dest_rect.height > 0)
|
||||
{
|
||||
GdkRegion *tmp_region;
|
||||
|
||||
tmp_region = gdk_region_rectangle (&dest_rect);
|
||||
gdk_region_subtract (invalidate_region, tmp_region);
|
||||
gdk_region_destroy (tmp_region);
|
||||
}
|
||||
|
||||
/* no guffaw scroll on win32 */
|
||||
hrgn = _gdk_win32_gdkregion_to_hrgn(invalidate_region, 0, 0);
|
||||
gdk_region_destroy (invalidate_region);
|
||||
destRect.left = dest_rect.y;
|
||||
destRect.top = dest_rect.x;
|
||||
destRect.right = dest_rect.x + dest_rect.width;
|
||||
destRect.bottom = dest_rect.y + dest_rect.height;
|
||||
clipRect.left = src_rect.y;
|
||||
clipRect.top = src_rect.x;
|
||||
clipRect.right = src_rect.x + src_rect.width;
|
||||
clipRect.bottom = src_rect.y + src_rect.height;
|
||||
|
||||
g_print ("ScrollWindowEx(%d, %d, ...) - if you see this work, remove trace;)\n", dx, dy);
|
||||
API_CALL(ScrollWindowEx, (GDK_WINDOW_HWND (window),
|
||||
dx, dy, /* in: scroll offsets */
|
||||
NULL, /* in: scroll rect, NULL == entire client area */
|
||||
&clipRect, /* in: restrict to */
|
||||
hrgn, /* in: update region */
|
||||
NULL, /* out: update rect */
|
||||
SW_INVALIDATE));
|
||||
API_CALL(DeleteObject, (hrgn));
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_window_move_resize_child (GdkWindow *window,
|
||||
gint x,
|
||||
|
@ -1567,6 +1567,19 @@ gdk_window_set_hints (GdkWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_set_urgency_hint (GdkWindow *window,
|
||||
gboolean urgent)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
g_return_if_fail (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD);
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
g_warning ("gdk_window_set_urgency_hint() not implemented yet.");
|
||||
}
|
||||
|
||||
void
|
||||
gdk_window_set_geometry_hints (GdkWindow *window,
|
||||
GdkGeometry *geometry,
|
||||
|
@ -27,6 +27,9 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef G_OS_WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -4858,7 +4858,7 @@ gtk_default_draw_expander (GtkStyle *style,
|
||||
y_double = y + 0.5;
|
||||
|
||||
cairo_translate (cr, x_double, y_double);
|
||||
cairo_rotate (cr, degrees * M_PI / 180);
|
||||
cairo_rotate (cr, degrees * G_PI / 180);
|
||||
|
||||
cairo_move_to (cr, - radius / 2., - radius);
|
||||
cairo_line_to (cr, radius / 2., 0);
|
||||
|
@ -436,7 +436,7 @@ gtk_extra_sources = \
|
||||
GENERATED = \
|
||||
gtktypebuiltins.h gtktypebuiltins.c \
|
||||
gtkmarshal.h gtkmarshal.c gtkmarshalers.h gtkmarshalers.c \
|
||||
gtk.def gtkalias.h
|
||||
gtk.def gtkalias.h gtkaliasdef.c
|
||||
|
||||
#
|
||||
# Generated source files:
|
||||
@ -446,11 +446,14 @@ generated : $(GENERATED)
|
||||
|
||||
gtk.def: gtk.symbols makefile.msc
|
||||
echo EXPORTS > gtk.def
|
||||
cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 gtk.symbols >> gtk.def
|
||||
cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES gtk.symbols >> gtk.def
|
||||
|
||||
gtkalias.h: gtk.symbols
|
||||
cl /EP -DG_OS_WIN32 -DGTK_WINDOWING_WIN32 -DINCLUDE_INTERNAL_SYMBOLS gtk.symbols | $(PERL) makegtkalias.pl > gtkalias.h
|
||||
|
||||
gtkaliasdef.c: gtk.symbols
|
||||
perl makegtkalias.pl -def < gtk.symbols > gtkaliasdef.c
|
||||
|
||||
# generate type identifier header (GTK_TYPE_WIDGET_FLAGS)
|
||||
# use 'echo' to work around 'command line too long'
|
||||
gtktypebuiltins.h: $(gtk_public_h_sources) makefile.msc
|
||||
@ -502,6 +505,7 @@ gtk-win32.res : gtk-win32.rc
|
||||
libgtk-win32-$(GTK_VER)-0.dll : $(gtk_OBJECTS) gtk.def gtk-win32.res
|
||||
$(CC) $(CFLAGS) -LD -Fm -Fe$@ $(gtk_OBJECTS) gtk-win32.res \
|
||||
$(GDK_LIBS) $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(INTL_LIBS) $(GLIB_LIBS) $(GMODULE_LIBS) \
|
||||
$(CAIRO_LIBS) $(PANGOCAIRO_LIBS) \
|
||||
gdi32.lib user32.lib advapi32.lib wsock32.lib shell32.lib ole32.lib \
|
||||
$(LDFLAGS) /implib:gtk-win32-$(GTK_VER).lib /def:gtk.def
|
||||
|
||||
|
@ -57,13 +57,18 @@ VARIABLES = \
|
||||
stock_first_24 stock_first_24.png \
|
||||
stock_font_16 stock_font_16.png \
|
||||
stock_font_24 stock_font_24.png \
|
||||
stock_fullscreen_16 stock_fullscreen_16.png \
|
||||
stock_fullscreen_24 stock_fullscreen_24.png \
|
||||
stock_harddisk_16 stock_harddisk_16.png \
|
||||
stock_harddisk_24 stock_harddisk_24.png \
|
||||
stock_help_16 stock_help_16.png \
|
||||
stock_help_24 stock_help_24.png \
|
||||
stock_home_16 stock_home_16.png \
|
||||
stock_home_24 stock_home_24.png \
|
||||
stock_index_16 stock_index_16.png \
|
||||
stock_index_24 stock_index_24.png \
|
||||
stock_info_16 stock_info_16.png \
|
||||
stock_info_24 stock_info_24.png \
|
||||
stock_insert_image_16 stock_insert_image_16.png \
|
||||
stock_insert_image_24 stock_insert_image_24.png \
|
||||
stock_insert_object_16 stock_insert_object_16.png \
|
||||
@ -74,6 +79,8 @@ VARIABLES = \
|
||||
stock_jump_to_rtl_24 stock_jump_to_rtl_24.png \
|
||||
stock_last_16 stock_last_16.png \
|
||||
stock_last_24 stock_last_24.png \
|
||||
stock_leave_fullscreen_16 stock_leave_fullscreen_16.png \
|
||||
stock_leave_fullscreen_24 stock_leave_fullscreen_24.png \
|
||||
stock_left_arrow_16 stock_left_arrow_16.png \
|
||||
stock_left_arrow_24 stock_left_arrow_24.png \
|
||||
stock_media_forward_16 stock_media_forward_16.png \
|
||||
@ -172,9 +179,13 @@ VARIABLES2 = \
|
||||
stock_up_arrow_24 stock_up_arrow_24.png \
|
||||
stock_wizard_24 stock_wizard_24.png \
|
||||
stock_yes_20 stock_yes_20.png \
|
||||
stock_zoom_1_16 stock_zoom_1_16.png \
|
||||
stock_zoom_1_24 stock_zoom_1_24.png \
|
||||
stock_zoom_fit_16 stock_zoom_fit_16.png \
|
||||
stock_zoom_fit_24 stock_zoom_fit_24.png \
|
||||
stock_zoom_in_16 stock_zoom_in_16.png \
|
||||
stock_zoom_in_24 stock_zoom_in_24.png \
|
||||
stock_zoom_out_16 stock_zoom_out_16.png \
|
||||
stock_zoom_out_24 stock_zoom_out_24.png \
|
||||
|
||||
|
||||
|
@ -73,6 +73,7 @@ EXTRA_LIBS = $(CAIRO_LIBS)
|
||||
!ENDIF
|
||||
|
||||
!IFDEF EXTRA_testgtk
|
||||
EXTRA_LIBS = $(CAIRO_LIBS)
|
||||
EXTRA_OBJETCS = prop-editor.obj
|
||||
!ENDIF
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user