Ticket #5978: app_server-wim-1.patch
File app_server-wim-1.patch, 3.3 KB (added by , 14 years ago) |
---|
-
src/servers/app/ServerApp.cpp
11 11 * Jérôme Duval, jerome.duval@free.fr 12 12 * Andrej Spielmann, <andrej.spielmann@seh.ox.ac.uk> 13 13 * Philippe Saint-Pierre, stpere@gmail.com 14 * Wim van der Meer, <WPJvanderMeer@gmail.com> 14 15 */ 15 16 16 17 … … 1165 1166 1166 1167 break; 1167 1168 } 1168 1169 case AS_GET_CURSOR_POSITION: 1170 { 1171 STRACE(("ServerApp %s: Get Cursor position\n", Signature())); 1172 // Returns 1173 // 1) BPoint mouse location 1174 // 2) int32 button state 1175 BPoint where; 1176 int32 buttons; 1177 fDesktop->GetLastMouseState(&where, &buttons); 1178 fLink.StartMessage(B_OK); 1179 fLink.Attach<BPoint>(where); 1180 fLink.Attach<int32>(buttons); 1181 fLink.Flush(); 1182 break; 1183 } 1169 1184 case AS_GET_SCROLLBAR_INFO: 1170 1185 { 1171 1186 STRACE(("ServerApp %s: Get ScrollBar info\n", Signature())); -
src/servers/app/ProfileMessageSupport.cpp
61 61 62 62 CODE(AS_BEGIN_RECT_TRACKING); 63 63 CODE(AS_END_RECT_TRACKING); 64 65 CODE(AS_GET_CURSOR_POSITION); 64 66 65 67 // Window definitions 66 68 CODE(AS_SHOW_WINDOW); -
src/kits/interface/InterfaceDefs.cpp
7 7 * Caz <turok2@currantbun.com> 8 8 * Axel Dörfler, axeld@pinc-software.de 9 9 * Michael Lotz <mmlr@mlotz.ch> 10 * Wim van der Meer <WPJvanderMeer@gmail.com> 10 11 */ 11 12 12 13 … … 23 24 #include <ControlLook.h> 24 25 #include <Font.h> 25 26 #include <Menu.h> 27 #include <Point.h> 26 28 #include <Roster.h> 29 #include <Screen.h> 27 30 #include <ScrollBar.h> 28 #include <Screen.h>29 31 #include <String.h> 30 32 #include <TextView.h> 31 33 … … 926 928 927 929 928 930 void 931 get_mouse(BPoint* screenWhere, uint32* buttons) 932 { 933 BPrivate::AppServerLink link; 934 link.StartMessage(AS_GET_CURSOR_POSITION); 935 936 int32 code; 937 if (link.FlushWithReply(code) == B_OK && code == B_OK) { 938 link.Read<BPoint>(screenWhere); 939 link.Read<uint32>(buttons); 940 } 941 } 942 943 944 void 929 945 set_accept_first_click(bool acceptFirstClick) 930 946 { 931 947 BPrivate::AppServerLink link; -
headers/os/interface/InterfaceDefs.h
10 10 #include <OS.h> 11 11 12 12 class BRect; 13 class BPoint; 13 14 14 15 15 16 // some handy UTF-8 characters … … 380 381 void set_focus_follows_mouse_mode(mode_focus_follows_mouse mode); 381 382 mode_focus_follows_mouse focus_follows_mouse_mode(); 382 383 384 void get_mouse(BPoint* screenWhere, uint32* buttons); 385 383 386 void set_accept_first_click(bool acceptFirstClick); 384 387 bool accept_first_click(); 385 388 -
headers/private/app/ServerProtocol.h
81 81 82 82 AS_BEGIN_RECT_TRACKING, 83 83 AS_END_RECT_TRACKING, 84 85 AS_GET_CURSOR_POSITION, 84 86 85 87 // Window definitions 86 88 AS_SHOW_WINDOW,