Page 1 of 1

gdk_window_get_pointer_() - "Invalid Memory Access"

Posted: Sun Nov 27, 2005 6:50 pm
by DarkDragon
Good afternoon,

Whatever I do with gdk_window_get_pointer_() I get an "Invalid Memory Access" Error thrown again my head. Here is a testcode:

Code: Select all

hWnd = OpenWindow(0, 0, 0, 640, 480, #PB_Window_SystemMenu, "Test")

x.l = 0 : y.l = 0
mask.l = 0

Repeat
  Event = WindowEvent()
 
  If gdk_window_get_pointer_(hWnd, @x, @y, @mask)
   
    If (mask & #GDK_BUTTON1_MASK)
      Debug "OK"
    EndIf
   
  EndIf
 
  Delay(15)
Until Event = #PB_Event_CloseWindow
End
Now I need your help.

Posted: Sun Nov 27, 2005 7:58 pm
by Fred
GdkWindow <> GtkWindow. You have to get the gdkwindow field of the GtkWidget structure (OpenWindow returns a GtkWindow*).

Posted: Sun Nov 27, 2005 8:24 pm
by DarkDragon
OMG, I'm so stupid! Thanks for the help :roll: . It doesn't work yet, but I'll work on it(missing Structures)

Posted: Sun Nov 27, 2005 11:52 pm
by Fred
all gtk/gdk structures should be build-in in PB 3.94 for linux, just walk using the IDE's structure viewer.

Posted: Mon Nov 28, 2005 2:10 pm
by DarkDragon
Fred wrote:all gtk/gdk structures should be build-in in PB 3.94 for linux, just walk using the IDE's structure viewer.
I have PB 3.92, I'll go and get it, thanks.

Posted: Mon Nov 28, 2005 2:13 pm
by Trond
DarkDragon wrote:
Fred wrote:all gtk/gdk structures should be build-in in PB 3.94 for linux, just walk using the IDE's structure viewer.
I have PB 3.92, I'll go and get it, thanks.
You better edit that out before netmaestro sees it! :wink:

Posted: Mon Nov 28, 2005 2:27 pm
by DarkDragon
Trond wrote:
DarkDragon wrote:
Fred wrote:all gtk/gdk structures should be build-in in PB 3.94 for linux, just walk using the IDE's structure viewer.
I have PB 3.92, I'll go and get it, thanks.
You better edit that out before netmaestro sees it! :wink:
Why? I have no network on Linux, so it is hard for me to get updates, and I missed the last.
[EDIT]
Damnit, PB 3.94 doesn't work anymore(I mean the IDE)
[EDIT]
OK now it works O_o damn chmods.
[EDIT]
Structure GDKWindow still doesn't exist
[EDIT]
It works!!!