Commit 46587958 authored by Tor Lillqvist's avatar Tor Lillqvist

More work on the Win32 backend. More files compile now.

parent 20b5d8ec
......@@ -235,14 +235,14 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
q[-1] |= residue; /* Set left-over bits */
}
hcursor = CreateCursor (gdk_app_hinstance, x, y, cursor_width, cursor_height,
hcursor = CreateCursor (gdk_app_hmodule, x, y, cursor_width, cursor_height,
and_mask, xor_mask);
GDK_NOTE (MISC, g_print ("gdk_cursor_new_from_pixmap: "
"%#x (%dx%d) %#x (%dx%d) = %#x (%dx%d)\n",
GDK_PIXMAP_HBM (source),
GDK_PIXMAP_HBITMAP (source),
source_impl->width, source_impl->height,
GDK_PIXMAP_HBM (mask),
GDK_PIXMAP_HBITMAP (mask),
mask_impl->width, mask_impl->height,
hcursor, cursor_width, cursor_height));
......
......@@ -37,6 +37,7 @@
#include "gdkproperty.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
#include "gdkdrawable-win32.h"
#ifdef OLE2_DND
#include <ole2.h>
......@@ -1108,7 +1109,6 @@ gdk_drag_find_window (GdkDragContext *context,
GdkDragProtocol *protocol)
{
GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
GdkDrawablePrivate *drag_window_private = (GdkDrawablePrivate*) drag_window;
HWND recipient;
POINT pt;
......@@ -1233,7 +1233,7 @@ gdk_window_register_dnd (GdkWindow *window)
* (in gtk, data of type text/uri-list) or not.
*/
gdk_window_add_filter (window, gdk_dropfiles_filter, NULL);
DragAcceptFiles (GDK_DRAWABLE_XID (window), TRUE);
DragAcceptFiles (GDK_WINDOW_HWND (window), TRUE);
#ifdef OLE2_DND
/* Register for OLE2 d&d */
......
This diff is collapsed.
This diff is collapsed.
......@@ -142,7 +142,7 @@ logfont_to_xlfd (const LOGFONT *lfp,
if (logpixelsy == 0)
{
logpixelsy = GetDeviceCaps (gdk_DC, LOGPIXELSY);
logpixelsy = GetDeviceCaps (gdk_display_hdc, LOGPIXELSY);
}
if (lfp->lfWeight >= FW_HEAVY)
......@@ -281,7 +281,7 @@ gdk_font_full_name_get (GdkFont *font)
{
singlefont = (GdkWin32SingleFont *) list->data;
if (GetObject (singlefont->xfont, sizeof (LOGFONT), &logfont) == 0)
if (GetObject (singlefont->hfont, sizeof (LOGFONT), &logfont) == 0)
{
WIN32_GDI_FAILED ("GetObject");
return NULL;
......@@ -409,7 +409,7 @@ EnumFontFamExProc (const LOGFONT *lfp,
lf = *lfp;
EnumFontFamiliesEx (gdk_DC, &lf, InnerEnumFontFamExProc, lParam, 0);
EnumFontFamiliesEx (gdk_display_hdc, &lf, InnerEnumFontFamExProc, lParam, 0);
}
else
InnerEnumFontFamExProc (lfp, metrics, fontType, lParam);
......@@ -429,7 +429,7 @@ gdk_font_list_new (const gchar *font_pattern,
xfontnames = g_new (gchar *, font_names_size);
memset (&logfont, 0, sizeof (logfont));
logfont.lfCharSet = DEFAULT_CHARSET;
EnumFontFamiliesEx (gdk_DC, &logfont, EnumFontFamExProc,
EnumFontFamiliesEx (gdk_display_hdc, &logfont, EnumFontFamExProc,
(LPARAM) font_pattern, 0);
result = g_new (gchar *, num_fonts + 1);
......@@ -1234,7 +1234,7 @@ gdk_font_load_internal (const gchar *font_name)
return NULL;
}
logpixelsy = GetDeviceCaps (gdk_DC, LOGPIXELSY);
logpixelsy = GetDeviceCaps (gdk_display_hdc, LOGPIXELSY);
if (strcmp (pixel_size, "*") == 0)
if (strcmp (point_size, "*") == 0)
......@@ -1447,13 +1447,13 @@ gdk_font_load_internal (const gchar *font_name)
return NULL;
singlefont = g_new (GdkWin32SingleFont, 1);
singlefont->xfont = hfont;
GetObject (singlefont->xfont, sizeof (logfont), &logfont);
oldfont = SelectObject (gdk_DC, singlefont->xfont);
singlefont->hfont = hfont;
GetObject (singlefont->hfont, sizeof (logfont), &logfont);
oldfont = SelectObject (gdk_display_hdc, singlefont->hfont);
memset (&singlefont->fs, 0, sizeof (singlefont->fs));
singlefont->charset = GetTextCharsetInfo (gdk_DC, &singlefont->fs, 0);
GetTextFace (gdk_DC, sizeof (face), face);
SelectObject (gdk_DC, oldfont);
singlefont->charset = GetTextCharsetInfo (gdk_display_hdc, &singlefont->fs, 0);
GetTextFace (gdk_display_hdc, sizeof (face), face);
SelectObject (gdk_display_hdc, oldfont);
if (TranslateCharsetInfo ((DWORD *) singlefont->charset, &csi,
TCI_SRCCHARSET)
&& singlefont->charset != MAC_CHARSET)
......@@ -1462,7 +1462,7 @@ gdk_font_load_internal (const gchar *font_name)
singlefont->codepage = 0;
GDK_NOTE (MISC, (g_print ("... = %#x %s cs %s cp%d\n",
singlefont->xfont, face,
singlefont->hfont, face,
charset_name (singlefont->charset),
singlefont->codepage),
g_print ("... Unicode subranges:"),
......@@ -1504,9 +1504,9 @@ gdk_font_load (const gchar *font_name)
* chars to work. (Yes, even Latin-1, as we use Unicode internally.)
*/
font->type = GDK_FONT_FONTSET;
oldfont = SelectObject (gdk_DC, singlefont->xfont);
GetTextMetrics (gdk_DC, &textmetric);
SelectObject (gdk_DC, oldfont);
oldfont = SelectObject (gdk_display_hdc, singlefont->hfont);
GetTextMetrics (gdk_display_hdc, &textmetric);
SelectObject (gdk_display_hdc, oldfont);
font->ascent = textmetric.tmAscent;
font->descent = textmetric.tmDescent;
......@@ -1568,9 +1568,9 @@ gdk_fontset_load (const gchar *fontset_name)
if (singlefont)
{
private->fonts = g_slist_append (private->fonts, singlefont);
oldfont = SelectObject (gdk_DC, singlefont->xfont);
GetTextMetrics (gdk_DC, &textmetric);
SelectObject (gdk_DC, oldfont);
oldfont = SelectObject (gdk_display_hdc, singlefont->hfont);
GetTextMetrics (gdk_display_hdc, &textmetric);
SelectObject (gdk_display_hdc, oldfont);
font->ascent = MAX (font->ascent, textmetric.tmAscent);
font->descent = MAX (font->descent, textmetric.tmDescent);
}
......@@ -1602,14 +1602,14 @@ _gdk_font_destroy (GdkFont *font)
singlefont = (GdkWin32SingleFont *) private->fonts->data;
GDK_NOTE (MISC, g_print ("_gdk_font_destroy %#x\n",
singlefont->xfont));
singlefont->hfont));
gdk_font_hash_remove (font->type, font);
switch (font->type)
{
case GDK_FONT_FONT:
DeleteObject (singlefont->xfont);
DeleteObject (singlefont->hfont);
break;
case GDK_FONT_FONTSET:
......@@ -1617,7 +1617,7 @@ _gdk_font_destroy (GdkFont *font)
while (list)
{
singlefont = (GdkWin32SingleFont *) list->data;
DeleteObject (singlefont->xfont);
DeleteObject (singlefont->hfont);
list = list->next;
}
......@@ -1647,7 +1647,7 @@ gdk_font_id (const GdkFont *font)
private = (const GdkFontPrivateWin32 *) font;
if (font->type == GDK_FONT_FONT)
return (gint) ((GdkWin32SingleFont *) private->fonts->data)->xfont;
return (gint) ((GdkWin32SingleFont *) private->fonts->data)->hfont;
else
return 0;
}
......@@ -1666,8 +1666,8 @@ gdk_font_equal (const GdkFont *fonta,
privateb = (const GdkFontPrivateWin32 *) fontb;
if (fonta->type == GDK_FONT_FONT && fontb->type == GDK_FONT_FONT)
return (((GdkWin32SingleFont *) privatea->fonts->data)->xfont
== ((GdkWin32SingleFont *) privateb->fonts->data)->xfont);
return (((GdkWin32SingleFont *) privatea->fonts->data)->hfont
== ((GdkWin32SingleFont *) privateb->fonts->data)->hfont);
else if (fonta->type == GDK_FONT_FONTSET && fontb->type == GDK_FONT_FONTSET)
{
GSList *lista = privatea->fonts;
......@@ -1675,8 +1675,8 @@ gdk_font_equal (const GdkFont *fonta,
while (lista && listb)
{
if (((GdkWin32SingleFont *) lista->data)->xfont
!= ((GdkWin32SingleFont *) listb->data)->xfont)
if (((GdkWin32SingleFont *) lista->data)->hfont
!= ((GdkWin32SingleFont *) listb->data)->hfont)
return 0;
lista = lista->next;
listb = listb->next;
......@@ -1762,7 +1762,7 @@ gdk_wchar_text_handle (GdkFont *font,
GDK_NOTE (MISC, g_print ("%d:%d:%d:%#x ",
start-wcstr, wcp-wcstr, block,
(singlefont ? singlefont->xfont : 0)));
(singlefont ? singlefont->hfont : 0)));
/* Call the callback function */
(*handler) (singlefont, start, wcp+1 - start, arg);
......@@ -1789,13 +1789,13 @@ gdk_text_size_handler (GdkWin32SingleFont *singlefont,
if (!singlefont)
return;
if ((oldfont = SelectObject (gdk_DC, singlefont->xfont)) == NULL)
if ((oldfont = SelectObject (gdk_display_hdc, singlefont->hfont)) == NULL)
{
WIN32_GDI_FAILED ("SelectObject");
return;
}
GetTextExtentPoint32W (gdk_DC, wcstr, wclen, &this_size);
SelectObject (gdk_DC, oldfont);
GetTextExtentPoint32W (gdk_display_hdc, wcstr, wclen, &this_size);
SelectObject (gdk_display_hdc, oldfont);
arg->total.cx += this_size.cx;
arg->total.cy = MAX (arg->total.cy, this_size.cy);
......
This diff is collapsed.
......@@ -29,9 +29,9 @@
HWND gdk_root_window = NULL;
gint gdk_event_func_from_window_proc = FALSE;
HDC gdk_DC;
HINSTANCE gdk_DLLInstance;
HINSTANCE gdk_ProgInstance;
HDC gdk_display_hdc;
HINSTANCE gdk_dll_hinstance;
HINSTANCE gdk_app_hmodule; /* Works as a HMODULE, too? */
UINT gdk_selection_notify_msg;
UINT gdk_selection_request_msg;
UINT gdk_selection_clear_msg;
......@@ -40,5 +40,4 @@ GdkAtom gdk_win32_dropfiles_atom;
GdkAtom gdk_ole2_dnd_atom;
ATOM gdk_selection_property;
gint gdk_null_window_warnings = TRUE;
DWORD windows_version = 0;
......@@ -107,7 +107,10 @@ gdk_image_exit (void)
}
GdkImage *
gdk_image_new_bitmap (GdkVisual *visual, gpointer data, gint w, gint h)
gdk_image_new_bitmap (GdkVisual *visual,
gpointer data,
gint w,
gint h)
/*
* Desc: create a new bitmap image
*/
......@@ -162,7 +165,7 @@ gdk_image_new_bitmap (GdkVisual *visual, gpointer data, gint w, gint h)
bmi.u.bmiColors[1].rgbRed = 0xFF;
bmi.u.bmiColors[1].rgbReserved = 0x00;
private->ximage = CreateDIBSection (gdk_DC, (BITMAPINFO *) &bmi,
private->ximage = CreateDIBSection (gdk_display_hdc, (BITMAPINFO *) &bmi,
DIB_RGB_COLORS, &bits, NULL, 0);
if (bpl != bpl32)
{
......@@ -284,7 +287,7 @@ gdk_image_new_with_depth (GdkImageType type,
}
private->ximage =
CreateDIBSection (gdk_DC, (BITMAPINFO *) &bmi, iUsage,
CreateDIBSection (gdk_display_hdc, (BITMAPINFO *) &bmi, iUsage,
&image->mem, NULL, 0);
if (private->ximage == NULL)
......@@ -587,8 +590,8 @@ gdk_image_get (GdkWindow *window,
guint32
gdk_image_get_pixel (GdkImage *image,
gint x,
gint y)
gint x,
gint y)
{
guint32 pixel;
......@@ -629,9 +632,9 @@ gdk_image_get_pixel (GdkImage *image,
void
gdk_image_put_pixel (GdkImage *image,
gint x,
gint y,
guint32 pixel)
gint x,
gint y,
guint32 pixel)
{
g_return_if_fail (image != NULL);
......@@ -701,107 +704,3 @@ gdk_win32_image_destroy (GdkImage *image)
g_free (private);
}
static void
gdk_image_put (GdkImage *image,
GdkDrawable *drawable,
GdkGC *gc,
gint xsrc,
gint ysrc,
gint xdest,
gint ydest,
gint width,
gint height)
{
GdkDrawablePrivate *drawable_private;
GdkImagePrivateWin32 *image_private;
GdkGCPrivate *gc_private;
HDC hdc;
GdkColormapPrivateWin32 *colormap_private;
g_return_if_fail (drawable != NULL);
g_return_if_fail (image != NULL);
g_return_if_fail (gc != NULL);
if (GDK_DRAWABLE_DESTROYED (drawable))
return;
image_private = (GdkImagePrivateWin32 *) image;
drawable_private = (GdkDrawablePrivate *) drawable;
gc_private = (GdkGCPrivate *) gc;
hdc = gdk_gc_predraw (drawable, gc_private, 0);
colormap_private = (GdkColormapPrivateWin32 *) drawable_private->colormap;
if (colormap_private && colormap_private->xcolormap->rc_palette)
{
DIBSECTION ds;
static struct {
BITMAPINFOHEADER bmiHeader;
WORD bmiIndices[256];
} bmi;
static gboolean bmi_inited = FALSE;
int i;
if (!bmi_inited)
{
for (i = 0; i < 256; i++)
bmi.bmiIndices[i] = i;
bmi_inited = TRUE;
}
if (GetObject (image_private->ximage, sizeof (DIBSECTION),
&ds) != sizeof (DIBSECTION))
{
WIN32_GDI_FAILED ("GetObject");
}
#if 0
g_print("xdest = %d, ydest = %d, xsrc = %d, ysrc = %d, width = %d, height = %d\n",
xdest, ydest, xsrc, ysrc, width, height);
g_print("bmWidth = %d, bmHeight = %d, bmBitsPixel = %d, bmBits = %p\n",
ds.dsBm.bmWidth, ds.dsBm.bmHeight, ds.dsBm.bmBitsPixel, ds.dsBm.bmBits);
g_print("biWidth = %d, biHeight = %d, biBitCount = %d, biClrUsed = %d\n",
ds.dsBmih.biWidth, ds.dsBmih.biHeight, ds.dsBmih.biBitCount, ds.dsBmih.biClrUsed);
#endif
bmi.bmiHeader = ds.dsBmih;
/* I have spent hours on getting the parameters to
* SetDIBitsToDevice right. I wonder what drugs the guys in
* Redmond were on when they designed this API.
*/
if (SetDIBitsToDevice (hdc,
xdest, ydest,
width, height,
xsrc, (-ds.dsBmih.biHeight)-height-ysrc,
0, -ds.dsBmih.biHeight,
ds.dsBm.bmBits,
(CONST BITMAPINFO *) &bmi,
DIB_PAL_COLORS) == 0)
WIN32_GDI_FAILED ("SetDIBitsToDevice");
}
else
{
HDC memdc;
HGDIOBJ oldbitmap;
if ((memdc = CreateCompatibleDC (hdc)) == NULL)
{
WIN32_GDI_FAILED ("CreateCompatibleDC");
gdk_gc_postdraw (drawable, gc_private, 0);
return;
}
if ((oldbitmap = SelectObject (memdc, image_private->ximage)) == NULL)
{
WIN32_GDI_FAILED ("SelectObject");
gdk_gc_postdraw (drawable, gc_private, 0);
return;
}
if (!BitBlt (hdc, xdest, ydest, width, height,
memdc, xsrc, ysrc, SRCCOPY))
WIN32_GDI_FAILED ("BitBlt");
if (SelectObject (memdc, oldbitmap) == NULL)
WIN32_GDI_FAILED ("SelectObject");
if (!DeleteDC (memdc))
WIN32_GDI_FAILED ("DeleteDC");
}
gdk_gc_postdraw (drawable, gc_private, 0);
}
......@@ -57,10 +57,10 @@ GdkArgDesc _gdk_windowing_args[] = {
int __stdcall
DllMain(HINSTANCE hinstDLL,
DWORD dwReason,
LPVOID reserved)
DWORD dwReason,
LPVOID reserved)
{
gdk_DLLInstance = hinstDLL;
gdk_dll_hinstance = hinstDLL;
return TRUE;
}
......@@ -80,8 +80,8 @@ _gdk_windowing_init_check (int argc,
if (gdk_synchronize)
GdiSetBatchLimit (1);
gdk_ProgInstance = GetModuleHandle (NULL);
gdk_DC = CreateDC ("DISPLAY", NULL, NULL, NULL);
gdk_app_hmodule = GetModuleHandle (NULL);
gdk_display_hdc = CreateDC ("DISPLAY", NULL, NULL, NULL);
gdk_root_window = GetDesktopWindow ();
windows_version = GetVersion ();
......@@ -205,7 +205,7 @@ gdk_screen_height (void)
gint
gdk_screen_width_mm (void)
{
return GetDeviceCaps (gdk_DC, HORZSIZE);
return GetDeviceCaps (gdk_display_hdc, HORZSIZE);
}
/*
......@@ -226,7 +226,7 @@ gdk_screen_width_mm (void)
gint
gdk_screen_height_mm (void)
{
return GetDeviceCaps (gdk_DC, VERTSIZE);
return GetDeviceCaps (gdk_display_hdc, VERTSIZE);
}
void
......@@ -258,8 +258,8 @@ gdk_windowing_exit (void)
{
gdk_win32_dnd_exit ();
CoUninitialize ();
DeleteDC (gdk_DC);
gdk_DC = NULL;
DeleteDC (gdk_display_hdc);
gdk_display_hdc = NULL;
}
gchar *
......
......@@ -93,7 +93,7 @@ void gdk_win32_api_failed (const gchar *where,
#define OTHER_API_FAILED(api) gdk_other_api_failed (__FILE__, __LINE__, api)
#endif
extern LRESULT CALLBACK gdk_WindowProc (HWND, UINT, WPARAM, LPARAM);
extern LRESULT CALLBACK gdk_window_procedure (HWND, UINT, WPARAM, LPARAM);
extern GdkDrawableClass _gdk_win32_drawable_class;
extern HWND gdk_root_window;
......@@ -101,7 +101,7 @@ extern gboolean gdk_event_func_from_window_proc;
extern HDC gdk_display_hdc;
extern HINSTANCE gdk_dll_hinstance;
extern HINSTANCE gdk_app_hinstance;
extern HINSTANCE gdk_app_hmodule;
extern UINT gdk_selection_notify_msg;
extern UINT gdk_selection_request_msg;
......
......@@ -39,20 +39,6 @@ static gint available_depths[1];
static GdkVisualType available_types[1];
#ifdef G_ENABLE_DEBUG
static const gchar* visual_names[] =
{
"static gray",
"grayscale",
"static color",
"pseudo color",
"true color",
"direct color",
};
#endif /* G_ENABLE_DEBUG */
void
gdk_visual_init (void)
{
......@@ -71,8 +57,8 @@ gdk_visual_init (void)
system_visual = g_new (GdkVisualPrivate, 1);
bitspixel = GetDeviceCaps (gdk_DC, BITSPIXEL);
rastercaps = GetDeviceCaps (gdk_DC, RASTERCAPS);
bitspixel = GetDeviceCaps (gdk_display_hdc, BITSPIXEL);
rastercaps = GetDeviceCaps (gdk_display_hdc, RASTERCAPS);
system_visual->xvisual = g_new (Visual, 1);
system_visual->xvisual->visualid = 0;
system_visual->xvisual->bitspixel = bitspixel;
......@@ -80,8 +66,8 @@ gdk_visual_init (void)
if (rastercaps & RC_PALETTE)
{
system_visual->visual.type = GDK_VISUAL_PSEUDO_COLOR;
numcolors = GetDeviceCaps (gdk_DC, NUMCOLORS);
sizepalette = GetDeviceCaps (gdk_DC, SIZEPALETTE);
numcolors = GetDeviceCaps (gdk_display_hdc, NUMCOLORS);
sizepalette = GetDeviceCaps (gdk_display_hdc, SIZEPALETTE);
system_visual->xvisual->map_entries = sizepalette;
}
else if (bitspixel == 1)
......@@ -109,10 +95,10 @@ gdk_visual_init (void)
memset (&bmi, 0, sizeof (bmi));
bmi.bi.biSize = sizeof (bmi.bi);
hbm = CreateCompatibleBitmap (gdk_DC, 1, 1);
GetDIBits (gdk_DC, hbm, 0, 1, NULL,
hbm = CreateCompatibleBitmap (gdk_display_hdc, 1, 1);
GetDIBits (gdk_display_hdc, hbm, 0, 1, NULL,
(BITMAPINFO *) &bmi, DIB_RGB_COLORS);
GetDIBits (gdk_DC, hbm, 0, 1, NULL,
GetDIBits (gdk_display_hdc, hbm, 0, 1, NULL,
(BITMAPINFO *) &bmi, DIB_RGB_COLORS);
DeleteObject (hbm);
......
......@@ -235,7 +235,7 @@ struct _GdkColormapPrivateWin32
struct _GdkImagePrivateWin32
{
HBITMAP ximage;
HBITMAP hbitmap;
};
typedef struct _GdkGCWin32 GdkGCWin32;
......@@ -260,7 +260,7 @@ struct _GdkGCWin32
* window or pixmap. We thus keep all the necessary values in the
* GdkGCWin32 object.
*/
HDC xgc;
HDC hdc;
GdkRegion *clip_region;
HRGN hcliprgn;
......@@ -295,9 +295,9 @@ GType gdk_gc_win32_get_type (void);
#define GDK_ROOT_WINDOW() ((guint32) HWND_DESKTOP)
#define GDK_ROOT_PARENT() ((GdkWindow *) gdk_parent_root)
#define GDK_DISPLAY() NULL
#define GDK_WINDOW_HWND(win) (GDK_DRAWABLE_IMPL_WIN32(((GdkWindowObject *)win)->impl)->handle)
#define GDK_PIXMAP_HBM(win) (GDK_DRAWABLE_IMPL_WIN32(((GdkPixmapObject *)win)->impl)->handle)
#define GDK_DRAWABLE_HANDLE(win) (GDK_IS_WINDOW (win) ? GDK_WINDOW_HWND (win) : GDK_PIXMAP_HBM (win))
#define GDK_WINDOW_HWND(win) (HWND) (GDK_DRAWABLE_IMPL_WIN32(((GdkWindowObject *)win)->impl)->handle)
#define GDK_PIXMAP_HBITMAP(win) (HBITMAP) (GDK_DRAWABLE_IMPL_WIN32(((GdkPixmapObject *)win)->impl)->handle)
#define GDK_DRAWABLE_HANDLE(win) (GDK_IS_WINDOW (win) ? ((HGDIOBJ) GDK_WINDOW_HWND (win)) : ((HGDIOBJ) GDK_PIXMAP_HBITMAP (win)))
#define GDK_IMAGE_HBM(image) (((GdkImagePrivateWin32 *) GDK_IMAGE (image)->windowing_data)->hbm)
#define GDK_COLORMAP_WIN32COLORMAP(cmap) (((GdkColormapPrivateWin32 *)GDK_COLORMAP (cmap)->windowing_data)->xcolormap)
#define GDK_VISUAL_XVISUAL(vis) (((GdkVisualPrivate *) vis)->xvisual)
......@@ -310,23 +310,23 @@ GdkPixmap *gdk_pixmap_foreign_new (guint32 anid);
GdkWindow *gdk_window_foreign_new (guint32 anid);
/* Return the Gdk* for a particular HANDLE */
gpointer gdk_xid_table_lookup (HANDLE handle);
gpointer gdk_xid_table_lookup (HANDLE handle);
/* Return a device context to draw in a drawable, given a GDK GC,
* and a mask indicating which GC values might be used (for efficiency,
* no need to muck around with text-related stuff if we aren't going
* to output text, for instance).
*/
HDC gdk_win32_hdc_get (GdkDrawable *drawable,
GdkGC *gc,
GdkGCValuesMask usage);
HDC gdk_win32_hdc_get (GdkDrawable *drawable,
GdkGC *gc,
GdkGCValuesMask usage);
/* Each HDC returned from gdk_win32_hdc_get must be released with
* this function
*/
void gdk_win32_hdc_release (GdkDrawable *drawable,
GdkGC *gc,
GdkGCValuesMask usage);
void gdk_win32_hdc_release (GdkDrawable *drawable,
GdkGC *gc,
GdkGCValuesMask usage);
#ifdef __cplusplus
}
......
......@@ -178,24 +178,24 @@ RegisterGdkClass (GdkDrawableType wtype)
wcl.style = 0; /* DON'T set CS_<H,V>REDRAW. It causes total redraw
* on WM_SIZE and WM_MOVE. Flicker, Performance!
*/
wcl.lpfnWndProc = gdk_WindowProc;
wcl.lpfnWndProc = gdk_window_procedure;
wcl.cbClsExtra = 0;
wcl.cbWndExtra = 0;
wcl.hInstance = gdk_ProgInstance;
wcl.hInstance = gdk_app_hmodule;
wcl.hIcon = 0;
/* initialize once! */
if (0 == hAppIcon)
{
gchar sLoc [_MAX_PATH+1];
if (0 != GetModuleFileName(gdk_ProgInstance, sLoc, _MAX_PATH))
if (0 != GetModuleFileName (gdk_app_hmodule, sLoc, _MAX_PATH))
{
hAppIcon = ExtractIcon(gdk_ProgInstance, sLoc, 0);
hAppIcon = ExtractIcon (gdk_app_hmodule, sLoc, 0);
if (0 == hAppIcon)
{
char *gdklibname = g_strdup_printf ("gdk-%s.dll", GDK_VERSION);
hAppIcon = ExtractIcon(gdk_ProgInstance, gdklibname, 0);
hAppIcon = ExtractIcon (gdk_app_hmodule, gdklibname, 0);
g_free (gdklibname);
}
......@@ -211,7 +211,7 @@ RegisterGdkClass (GdkDrawableType wtype)
#define ONCE_PER_CLASS() \
wcl.hIcon = CopyIcon (hAppIcon); \
wcl.hIconSm = CopyIcon (hAppIcon); \
wcl.hbrBackground = CreateSolidBrush( RGB(0,0,0)); \
wcl.hbrBackground = CreateSolidBrush (RGB (0,0,0)); \
wcl.hCursor = LoadCursor (NULL, IDC_ARROW);
switch (wtype)
......@@ -222,7 +222,7 @@ RegisterGdkClass (GdkDrawableType wtype)
wcl.lpszClassName = "gdkWindowToplevel";
ONCE_PER_CLASS();
klassTOPLEVEL = RegisterClassEx(&wcl);
klassTOPLEVEL = RegisterClassEx (&wcl);
}
klass = klassTOPLEVEL;
break;
......@@ -233,7 +233,7 @@ RegisterGdkClass (GdkDrawableType wtype)
wcl.style |= CS_PARENTDC; /* MSDN: ... enhances system performance. */
ONCE_PER_CLASS();
klassCHILD = RegisterClassEx(&wcl);
klassCHILD = RegisterClassEx (&wcl);
}
klass = klassCHILD;
break;
......@@ -243,7 +243,7 @@ RegisterGdkClass (GdkDrawableType wtype)
wcl.lpszClassName = "gdkWindowDialog";
wcl.style |= CS_SAVEBITS;
ONCE_PER_CLASS();
klassDIALOG = RegisterClassEx(&wcl);
klassDIALOG = RegisterClassEx (&wcl);
}
klass = klassDIALOG;
break;
......@@ -253,7 +253,7 @@ RegisterGdkClass (GdkDrawableType wtype)
wcl.lpszClassName = "gdkWindowTemp";
wcl.style |= CS_SAVEBITS;
ONCE_PER_CLASS();
klassTEMP = RegisterClassEx(&wcl);
klassTEMP = RegisterClassEx (&wcl);
}
klass = klassTEMP;
break;
......@@ -449,7 +449,7 @@ gdk_window_new (GdkWindow *parent,
width, height,
xparent,
NULL,
gdk_ProgInstance,
gdk_app_hmodule,
NULL);
GDK_NOTE (MISC,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment