Back to index

texmacs  1.0.7.15
Classes | Defines | Functions | Variables
mac_utilities.mm File Reference
#include "url.hpp"
#include "mac_utilities.h"
#include "timer.hpp"
#include "gui.hpp"
#include "Cocoa/mac_cocoa.h"
#include <Carbon/Carbon.h>
#include "HIDRemote.h"

Go to the source code of this file.

Classes

class  TMRemoteDelegate

Defines

#define extend   CARBON_extends

Functions

bool mac_alternate_startup ()
void mac_fix_paths ()
void mac_begin_remote ()
void mac_end_remote ()
void mac_remote_button (string button, bool pressed)

Variables

TMRemoteDelegateremote_delegate = nil

Define Documentation

#define extend   CARBON_extends

Definition at line 16 of file mac_utilities.mm.


Function Documentation

Definition at line 29 of file mac_utilities.mm.

                         {
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
  NSUInteger nsmods = [NSEvent modifierFlags];
  return (nsmods &  NSAlternateKeyMask);
#else
  return ((CGEventSourceFlagsState(kCGEventSourceStateCombinedSessionState) 
           & NSDeviceIndependentModifierFlagsMask) == kCGEventFlagMaskAlternate);
#endif
}

Here is the caller graph for this function:

void mac_begin_remote ( )

Definition at line 386 of file mac_utilities.mm.

                        {
    remote_delegate = [[TMRemoteDelegate alloc] init];
  }
  [remote_delegate setupRemote];
  [remote_delegate startStopRemote:true];
  [pool release];
}

Here is the caller graph for this function:

void mac_end_remote ( )

Definition at line 397 of file mac_utilities.mm.

                                  :false];
  [remote_delegate cleanupRemote];
  [pool release];
}

Here is the call graph for this function:

Here is the caller graph for this function:

void mac_fix_paths ( )

Definition at line 41 of file mac_utilities.mm.

                 {
  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
  /* add appropriate TEXMACS_PATH to the current environment */
#if 0
  setenv("TEXMACS_PATH",
         [[[[NSBundle mainBundle] resourcePath] 
           stringByAppendingPathComponent:@"share/TeXmacs"] 
          cStringUsingEncoding:NSUTF8StringEncoding],
         1);
#endif
  /* add TeX directory */
  /* FIXME: make this user-defined */
  // FIXME: encoding here is not quite correct!!!
  setenv("PATH",
         [[[NSString stringWithCString:getenv("PATH") encoding:NSASCIIStringEncoding] 
           stringByAppendingString:@":/usr/texbin"]
          cStringUsingEncoding:NSUTF8StringEncoding],
         1); 
  setenv("GUILE_LOAD_PATH","/opt/local/share/guile/1.8",1);
  system("printenv");
  [pool release];  
}

Here is the call graph for this function:

void mac_remote_button ( string  button,
bool  pressed 
)

Definition at line 405 of file mac_utilities.mm.

Here is the caller graph for this function:


Variable Documentation

Definition at line 383 of file mac_utilities.mm.