source: trunk/src/user32/oslibutil.cpp

Last change on this file was 7620, checked in by sandervl, 24 years ago

SendInput fix + handle Alt-F4 in default window handler

File size: 1.9 KB
RevLine 
[7620]1/* $Id: oslibutil.cpp,v 1.7 2001-12-12 16:40:44 sandervl Exp $ */
[2469]2/*
3 * Window API utility functions for OS/2
4 *
5 *
6 * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12#include <os2win.h>
13#include <misc.h>
14#include <wprocess.h>
15#include "oslibutil.h"
16
[2804]17#define DBG_LOCALLOG DBG_oslibutil
18#include "dbglocal.h"
19
[2469]20//******************************************************************************
21//******************************************************************************
22HAB GetThreadHAB()
23{
[4658]24 TEB *teb;
[2469]25
[4658]26 teb = GetThreadTEB();
27 if(teb)
[2469]28 {
[4658]29 return (HAB)teb->o.odin.hab;
[2469]30 }
31
[4658]32 dprintf(("GetThreadHAB: teb == NULL!!"));
[2469]33 return 0;
34}
35//******************************************************************************
36//******************************************************************************
37void SetThreadHAB(HAB hab)
38{
[4658]39 TEB *teb;
[2469]40
[4658]41 teb = GetThreadTEB();
42 if(teb)
[2469]43 {
[4658]44 teb->o.odin.hab = (ULONG)hab;
[2469]45 }
[4658]46 else dprintf(("SetThreadHAB: teb == NULL!!"));
[2469]47}
48//******************************************************************************
49//******************************************************************************
50HMQ GetThreadMessageQueue()
51{
[4658]52 TEB *teb;
[2469]53
[4658]54 teb = GetThreadTEB();
55 if(teb)
[2469]56 {
[4658]57 return (HMQ)teb->o.odin.hmq;
[2469]58 }
59
[4658]60 dprintf(("GetThreadMessageQueue: teb == NULL!!"));
[2469]61 return 0;
62}
63//******************************************************************************
64//******************************************************************************
65void SetThreadMessageQueue(HMQ hmq)
66{
[4658]67 TEB *teb;
[2469]68
[4658]69 teb = GetThreadTEB();
70 if(teb)
[2469]71 {
[4658]72 teb->o.odin.hmq = (ULONG)hmq;
[2469]73 }
[4658]74 else dprintf(("SetThreadMessageQueue: teb == NULL!!"));
[2469]75}
76//******************************************************************************
77//******************************************************************************
Note: See TracBrowser for help on using the repository browser.