X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=support%2Fsupportw.c;h=48f1a29d2826156a47dea91e1e0f0f1e4cccdeb6;hb=831403d104705c81d2fdb98473855da2e3076311;hp=158fce068be1a60a773f894bcc2ec6e5f66ffb12;hpb=0e3361865d53648229b8700c8d76e6af93f1e062;p=mono.git diff --git a/support/supportw.c b/support/supportw.c index 158fce068be..48f1a29d282 100644 --- a/support/supportw.c +++ b/support/supportw.c @@ -1,3 +1,14 @@ +/* + * Helper routines for some of the common methods that people P/Invoke + * on their applications. + * + * Authors: + * Gonzalo Paniagua (gonzalo@ximian.com) + * Miguel de Icaza (miguel@novell.com) + * + * (C) 2005 Novell, Inc. + * + */ #include #include #include @@ -14,24 +25,10 @@ typedef struct { void *fnptr; } FnPtr; -gpointer FindWindowExW (gpointer hwndParent, gpointer hwndChildAfter, - const char *classw, const char *window); +gpointer FindWindowExW (gpointer hwndParent, gpointer hwndChildAfter, + const char *classw, const char *window); -gpointer HeapAlloc (gpointer unused1, gint32 unused2, gint32 nbytes); -gpointer HeapCreate (gint32 flags, gint32 initial_size, gint32 max_size); -gboolean HeapSetInformation (gpointer handle, gpointer heap_info_class, - gpointer heap_info, gint32 head_info_length); - -gboolean HeapQueryInformation (gpointer handle, gpointer heap_info_class, - gpointer heap_info, gint32 head_info_length, gint32 *ret_length); - -gpointer HeapAlloc (gpointer handle, gint32 flags, gint32 nbytes); -gpointer HeapReAlloc (gpointer handle, gint32 flags, gpointer mem, gint32 nbytes); -gint32 HeapSize (gpointer handle, gint32 flags, gpointer mem); -gboolean HeapFree (gpointer handle, gint32 flags, gpointer mem); -gboolean HeapValidate (gpointer handle, gpointer mem); -gboolean HeapDestroy (gpointer handle); -gpointer GetProcessHeap (void); +gpointer GetProcessHeap (void); static FnPtr functions [] = { { "FindWindowExW", NULL }, /* user32 */ @@ -161,70 +158,22 @@ FindWindowExW (gpointer hwndParent, gpointer hwndChildAfter, const char *classw, return func (hwndParent, hwndChildAfter, classw, window); } -/* begin Heap* functions */ -gpointer -HeapCreate (gint32 flags, gint32 initial_size, gint32 max_size) -{ - return (gpointer) 0xDEADBEEF; -} - -gboolean -HeapSetInformation (gpointer handle, gpointer heap_info_class, gpointer heap_info, - gint32 head_info_length) -{ - return TRUE; -} - -gboolean -HeapQueryInformation (gpointer handle, gpointer heap_info_class, gpointer heap_info, - gint32 head_info_length, gint32 *ret_length) -{ - *ret_length = 0; - return TRUE; -} - -gpointer -HeapAlloc (gpointer handle, gint32 flags, gint32 nbytes) +int +SetWindowPos (gpointer hwnd, gpointer hwndInsertAfter, int x, int y, int cx, int cy, uint flags) { - return g_malloc0 (nbytes); + fprintf (stderr, "SetWindowPos 0x%x 0x%x to [%d,%dx%d,%d] %d\n", hwnd, hwndInsertAfter, x, y, cx, cy, flags); + return 1; } -gpointer -HeapReAlloc (gpointer handle, gint32 flags, gpointer mem, gint32 nbytes) -{ - return g_realloc (mem, nbytes); -} - -gint32 -HeapSize (gpointer handle, gint32 flags, gpointer mem) +int +SendMessageA (gpointer hwnd, uint msg, gpointer wparam, gpointer lparam) { + fprintf (stderr, "SendMessage (%d, 0x%x, 0x%x, 0x%x)\n", hwnd, msg, wparam, lparam); return 0; } -gboolean -HeapFree (gpointer handle, gint32 flags, gpointer mem) -{ - g_free (mem); - return TRUE; -} - -gboolean -HeapValidate (gpointer handle, gpointer mem) +int +GetWindowLongA (gpointer hwnd, int a) { - return TRUE; -} - -gboolean -HeapDestroy (gpointer handle) -{ - return TRUE; -} - - -gpointer -GetProcessHeap () -{ - return (gpointer) 0xDEADBEEF; + return 0; } -/* end Heap* functions */ -