Back to index

plt-scheme  4.2.1
Classes | Defines | Functions | Variables
Frame.cc File Reference
#include "wx.h"
#include "widgets.h"
#include "../../contrib/xpm/lib/xpm.h"
#include <X11/Xatom.h>
#include "wx_visual.h"
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>

Go to the source code of this file.

Classes

struct  wxMWM_Hints

Defines

#define Uses_XtIntrinsic
#define Uses_wxApp
#define Uses_wxFrame
#define Uses_wxGDI
#define Uses_wxLayout
#define Uses_wxList
#define Uses_wxMenuBar
#define Uses_wxMessage
#define Uses_wxTypeTree
#define Uses_wxMemoryDC
#define Uses_ShellWidget
#define Uses_BoardWidget
#define plt_width   16
#define plt_height   16
#define MWM_DECOR_ALL   (1L << 0)
#define MWM_DECOR_BORDER   (1L << 1)
#define MWM_DECOR_RESIZEH   (1L << 2)
#define MWM_DECOR_TITLE   (1L << 3)
#define MWM_DECOR_MENU   (1L << 4)
#define MWM_DECOR_MINIMIZE   (1L << 5)
#define MWM_DECOR_MAXIMIZE   (1L << 6)
#define MWM_HINTS_DECORATIONS   (1L << 1)

Functions

static void wxFrameMapProc (Widget w, XtPointer clientData, XCrossingEvent *event)
static void ForceFocus (Widget frame)
long scheme_get_milliseconds (void)

Variables

static char * plt_xpm []
static char plt_xbm []
Pixmap plt_icon
Pixmap plt_mask
voidscheme_current_process

Class Documentation

struct wxMWM_Hints

Definition at line 151 of file Frame.cc.

Class Members
long decorations
long flags
long functions
long inputMode
long unknown

Define Documentation

#define MWM_DECOR_ALL   (1L << 0)

Definition at line 160 of file Frame.cc.

#define MWM_DECOR_BORDER   (1L << 1)

Definition at line 161 of file Frame.cc.

#define MWM_DECOR_MAXIMIZE   (1L << 6)

Definition at line 166 of file Frame.cc.

#define MWM_DECOR_MENU   (1L << 4)

Definition at line 164 of file Frame.cc.

#define MWM_DECOR_MINIMIZE   (1L << 5)

Definition at line 165 of file Frame.cc.

#define MWM_DECOR_RESIZEH   (1L << 2)

Definition at line 162 of file Frame.cc.

#define MWM_DECOR_TITLE   (1L << 3)

Definition at line 163 of file Frame.cc.

#define MWM_HINTS_DECORATIONS   (1L << 1)
#define plt_height   16

Definition at line 79 of file Frame.cc.

#define plt_width   16

Definition at line 78 of file Frame.cc.

Definition at line 43 of file Frame.cc.

Definition at line 42 of file Frame.cc.

#define Uses_wxApp

Definition at line 32 of file Frame.cc.

#define Uses_wxFrame

Definition at line 33 of file Frame.cc.

#define Uses_wxGDI

Definition at line 34 of file Frame.cc.

#define Uses_wxLayout

Definition at line 35 of file Frame.cc.

#define Uses_wxList

Definition at line 36 of file Frame.cc.

#define Uses_wxMemoryDC

Definition at line 40 of file Frame.cc.

#define Uses_wxMenuBar

Definition at line 37 of file Frame.cc.

#define Uses_wxMessage

Definition at line 38 of file Frame.cc.

#define Uses_wxTypeTree

Definition at line 39 of file Frame.cc.

Definition at line 31 of file Frame.cc.


Function Documentation

static void ForceFocus ( Widget  frame) [static]

Definition at line 689 of file Frame.cc.

{
  static int force_focus = 0;

  if (!force_focus) {
    if (!wxGetBoolPreference("forceFocus", &force_focus))
      force_focus = 0;
    force_focus = !force_focus ? -1 : 1;
  }

  if (force_focus > 0) {
    Window current;
    int old_revert;
    XGetInputFocus(XtDisplay(frame), &current, &old_revert);
    if (current != PointerRoot) {
      XWindowAttributes attrib;

      XFlush(XtDisplay(frame));
      XGrabServer(XtDisplay(frame));
      
      /* Sleep for corce_focus usecs: */
      {
       struct timeval time;
       if (force_focus > 1000)
         force_focus = 999;

       time.tv_sec = 0;
       time.tv_usec = force_focus;
       select(0, NULL, NULL, NULL, &time);
      }

      XGetWindowAttributes(XtDisplay(frame), XtWindow(frame), &attrib);
      if (attrib.map_state == IsViewable)
       XSetInputFocus(XtDisplay(frame), XtWindow(frame),
                     RevertToNone, CurrentTime);
    }
    XUngrabServer(XtDisplay(frame));
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void wxFrameMapProc ( Widget  w,
XtPointer  clientData,
XCrossingEvent *  event 
) [static]

Definition at line 131 of file Frame.cc.

{
  wxFrame *frame = (wxFrame *)GET_SAFEREF(clientData);

  if (frame) {
    XEvent *e = (XEvent *)event;

    if (e->xany.type == MapNotify && e->xmap.window == XtWindow(w)) {
      if (!frame->IsShown()) {
       /* We really wanted this to be hidden! */
       XtUnmapWidget(w);
      }
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Pixmap plt_icon

Definition at line 85 of file Frame.cc.

Pixmap plt_mask

Definition at line 85 of file Frame.cc.

char plt_xbm[] [static]
Initial value:
 {
 0xe0,0x07,0xf8,0x1f,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0xff,0xff,0xff,0xff,0xff,
 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x7f,0xfe,0x7f,0xfc,0x3f,0xf8,0x1f,
 0xe0,0x07}

Definition at line 80 of file Frame.cc.

char* plt_xpm[] [static]
Initial value:
 {
"16 16 5 1",
"      c None",
".     c #000000",
"-     c #FF0000",
",     c #0000FF",
"!     c #FFFFFF",
"................",
".....,,,,,,.....",
"...--!!,,,,,,...",
"..-----!,,,,,,..",
"..-----!!,,,,,..",
".-------!,,,,,,.",
".-------!!,,,,,.",
".------!!!,,,,,.",
".-----!!-!!,,,,.",
".-----!---!,,,,.",
".----!!---!!,,,.",
"..---!-----!,,..",
"..--!!-----!!,..",
"...-!-------!...",
".....------.....",
"................"}

Definition at line 54 of file Frame.cc.

Definition at line 148 of file Frame.cc.