From 5b49ad98d010fa01966415aa263a7a841613b0f4 Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Sun, 16 Jan 2005 01:51:00 +0000 Subject: [PATCH] Tweaks to make synchronous replies less work git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10770 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Font.cpp | 46 +++++++++++++------------------------ 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/src/kits/interface/Font.cpp b/src/kits/interface/Font.cpp index e01783fcb1..dfa6eaf2e3 100644 --- a/src/kits/interface/Font.cpp +++ b/src/kits/interface/Font.cpp @@ -69,8 +69,7 @@ _font_control_(BFont *font, int32 cmd, void *data) BPrivate::BAppServerLink link; link.StartMessage(cmd); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) { @@ -105,8 +104,7 @@ count_font_families(void) BPrivate::BAppServerLink link; link.StartMessage(AS_COUNT_FONT_FAMILIES); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return -1; @@ -128,8 +126,7 @@ count_font_styles(font_family name) BPrivate::BAppServerLink link; link.StartMessage(AS_COUNT_FONT_STYLES); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return -1; @@ -158,8 +155,8 @@ get_font_family(int32 index, font_family *name, uint32 *flags) BPrivate::BAppServerLink link; link.StartMessage(AS_GET_FAMILY_NAME); - link.Flush(); - link.GetNextReply(&code); + link.Attach(index); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return B_ERROR; @@ -194,8 +191,7 @@ get_font_style(font_family family, int32 index, font_style *name, link.StartMessage(AS_GET_STYLE_NAME); link.Attach(family,sizeof(font_family)); link.Attach(index); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return B_ERROR; @@ -236,8 +232,7 @@ get_font_style(font_family family, int32 index, font_style *name, link.StartMessage(AS_GET_STYLE_NAME); link.Attach(family,sizeof(font_family)); link.Attach(index); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return B_ERROR; @@ -266,8 +261,7 @@ update_font_families(bool check_only) link.StartMessage(AS_QUERY_FONTS_CHANGED); link.Attach(check_only); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return false; @@ -386,8 +380,7 @@ BFont::SetFamilyAndStyle(const font_family family, const font_style style) link.StartMessage(AS_SET_FAMILY_AND_STYLE); link.Attach(family,sizeof(font_family)); link.Attach(style,sizeof(font_style)); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return B_ERROR; @@ -442,8 +435,7 @@ BFont::SetFamilyAndFace(const font_family family, uint16 face) link.StartMessage(AS_SET_FAMILY_AND_FACE); link.Attach(family,sizeof(font_family)); link.Attach(face); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return B_ERROR; @@ -516,8 +508,7 @@ BFont::GetFamilyAndStyle(font_family *family, font_style *style) const link.StartMessage(AS_GET_FAMILY_AND_STYLE); link.Attach(fFamilyID); link.Attach(fStyleID); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return; @@ -593,8 +584,7 @@ BFont::Direction(void) const link.StartMessage(AS_GET_FONT_DIRECTION); link.Attach(fFamilyID); link.Attach(fStyleID); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return B_FONT_LEFT_TO_RIGHT; @@ -614,8 +604,7 @@ BFont::IsFixed(void) const link.StartMessage(AS_QUERY_FONT_FIXED); link.Attach(fFamilyID); link.Attach(fStyleID); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return false; @@ -649,8 +638,7 @@ BFont::BoundingBox(void) const link.StartMessage(AS_GET_FONT_BOUNDING_BOX); link.Attach(fFamilyID); link.Attach(fStyleID); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return BRect(0,0,0,0); @@ -686,8 +674,7 @@ BFont::CountTuned(void) const link.StartMessage(AS_GET_TUNED_COUNT); link.Attach(fFamilyID); link.Attach(fStyleID); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return -1; @@ -711,8 +698,7 @@ BFont::GetTunedInfo(int32 index, tuned_font_info *info) const link.Attach(fFamilyID); link.Attach(fStyleID); link.Attach(index); - link.Flush(); - link.GetNextReply(&code); + link.FlushWithReply(&code); if(code!=SERVER_TRUE) return;