Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/skype4pidgin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEion Robb <eion@robbmob.com>2007-11-20 08:01:28 +0300
committerEion Robb <eion@robbmob.com>2007-11-20 08:01:28 +0300
commitbf7b6a9c90236aaad59e040f88af9c12693f7fad (patch)
treee2599c9079179d35003b408de4ff078d9a902581 /skype_messaging_carbon.c
parent78d238001c902be339d3bf03d95cad7ef6640197 (diff)
Added hide_skype() function in to hide skype windows
Diffstat (limited to 'skype_messaging_carbon.c')
-rw-r--r--skype_messaging_carbon.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/skype_messaging_carbon.c b/skype_messaging_carbon.c
index bcce962..696b14b 100644
--- a/skype_messaging_carbon.c
+++ b/skype_messaging_carbon.c
@@ -137,3 +137,34 @@ send_message(char* message)
#endif
destroyAutoreleasePool(pool);
}
+
+static void
+hide_skype()
+{
+ OSStatus status = noErr;
+ ProcessSerialNumber psn = {kNoProcess, kNoProcess};
+ unsigned int procNameLength = 32;
+ unsigned char procName[procNameLength];
+ unsigned int i = 0;
+ ProcessInfoRec info;
+ info.processInfoLength = sizeof(ProcessInfoRec);
+ info.processName = procName;
+ info.processAppSpec = NULL;
+
+ while(status == noErr)
+ {
+ for(i = 0; i < procNameLength; i++)
+ procName[i] = '\0';
+
+ status = GetNextProcess(&psn);
+ if (status == noErr)
+ if (GetProcessInformation(&psn, &info) == noErr)
+ //for some reason first character is poisioned
+ if (strcmp((char *)&procName[1], "Skype") == 0)
+ {
+ ShowHideProcess(&psn, FALSE);
+ return;
+ }
+ }
+}
+