#include "array.h"
#include <unistd.h>
Include dependency graph for portable.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Namespaces | |
| namespace | portable |
Classes | |
| class | char_star_array |
| a simple wrapper of an array of char *, used by break_line(). More... | |
Defines | |
| #define | LONGINT_SIZE 4 |
| #define | LoadBitmap(a, b) (a) |
| #define | __stdcall |
| #define | afx_msg |
| #define | DEFINE_INSTANCE_HANDLE application_instance portable::_i_handle = 0 |
| some applications may need this to use rc_string and others. | |
| #define | SET_INSTANCE_HANDLE(value) portable::_i_handle = value |
| use this to change the instance handle for this dll or exe. | |
| #define | GET_INSTANCE_HANDLE() portable::_i_handle |
| a handy macro that frees one from knowing the name of the handle. | |
| #define | RGB(r, g, b) (b + (g << 8) + (r << 16)) |
| no idea if that's even approximately right. | |
Typedefs | |
| typedef void * | application_instance |
| typedef unsigned long | DWORD |
| typedef void * | HANDLE |
| typedef void * | ATOM |
| typedef void * | BITMAPINFO |
| typedef void * | HBITMAP |
| typedef void * | HDC |
| typedef void * | RGBQUAD |
| typedef void * | window_handle |
Enumerations | |
| enum | portable::process_launch_flags { portable::HIDE_APP_WINDOW = 0x1, portable::AWAIT_APP_EXIT = 0x2, portable::RETURN_IMMEDIATELY = 0x4, portable::AWAIT_VIA_POLLING = 0x8, portable::SHELL_EXECUTE = 0x10 } |
Functions | |
| version | portable::get_OS_version () |
| returns the operating system's version information. | |
| u_int | portable::process_id () |
| returns the process id for this task, if that's relevant on the OS. | |
| istring | portable::current_directory () |
| returns the current directory as reported by the operating system. | |
| istring | portable::application_name () |
| returns the full name of the current application. | |
| istring | portable::module_name (const void *module_handle=NIL) |
| returns the name of the module for the "module_handle" where supported. | |
| u_int | portable::system_uptime () |
| the length of time (in milliseconds) since this computer booted. | |
| double | portable::rolling_uptime () |
| like system_uptime(), but tracks rollovers to provide continuity. | |
| void | portable::sleep_ms (u_int msec) |
| a system independent name for a forced snooze measured in milliseconds. | |
| istring | portable::env_string (const istring &variable_name) |
| looks up the "variable_name" in the current environment variables. | |
| bool | portable::set_environ (const istring &variable_name, const istring &value) |
| adds or creates "variable_name" in the environment. | |
| u_int | portable::system_error () |
| gets the most recent system error reported on this thread. | |
| istring | portable::system_error_text (u_int error_to_show) |
| returns the OS's string form of the "error_to_show". | |
| istring | portable::null_device () |
| returns the name of the system's NULL device. | |
| char_star_array | portable::break_line (istring &app, const istring ¶meters) |
| prepares an "app" to launch with the "parameters" (via exec). | |
| u_int | portable::launch_process (const istring &app_name, const istring &command_line, int flag, u_int &child_id) |
| starts an application using the "app_name" as the executable to run. | |
| timeval | portable::fill_timeval_ms (int milliseconds) |
| returns a timeval system object that represents the "milliseconds". | |
| istring | portable::get_cmdline_from_proc () |
| returns the command line that /proc has recorded for our process. | |
| char * | portable::itoa (int to_convert, char *buffer, int radix) |
| turns the integer "to_convert" into a string stored in the "buffer". | |
Variables | |
| application_instance | portable::_i_handle |
| dll_root.cpp defines this for all dlls. | |
Definition in file portable.h.
| #define __stdcall |
Definition at line 106 of file portable.h.
| #define afx_msg |
Definition at line 107 of file portable.h.
some applications may need this to use rc_string and others.
if this macro is used, then the code is impervious to future changes in how the instance handle works.
Definition at line 243 of file portable.h.
| #define GET_INSTANCE_HANDLE | ( | ) | portable::_i_handle |
a handy macro that frees one from knowing the name of the handle.
Definition at line 251 of file portable.h.
Referenced by version_checker::complain_wrong_version(), debugging_frame::Create(), debugging_console_view::OnCreate(), portable::rc_string(), and run_test_18().
| #define LoadBitmap | ( | a, | |||
| b | ) | (a) |
Definition at line 105 of file portable.h.
Referenced by bitmap_tree::SetNormalImages(), bitmap_tree::SetOverlayImages(), and bitmap_tree::SetStateImages().
| #define LONGINT_SIZE 4 |
Definition at line 87 of file portable.h.
| #define RGB | ( | r, | |||
| g, | |||||
| b | ) | (b + (g << 8) + (r << 16)) |
| #define SET_INSTANCE_HANDLE | ( | value | ) | portable::_i_handle = value |
use this to change the instance handle for this dll or exe.
note that this should be done only once and by the main thread.
Definition at line 247 of file portable.h.
| typedef void* application_instance |
Definition at line 65 of file portable.h.
| typedef void* ATOM |
Definition at line 100 of file portable.h.
| typedef void* BITMAPINFO |
Definition at line 101 of file portable.h.
| typedef unsigned long DWORD |
Definition at line 92 of file portable.h.
| typedef void* HANDLE |
Definition at line 97 of file portable.h.
| typedef void* HBITMAP |
Definition at line 102 of file portable.h.
| typedef void* HDC |
Definition at line 103 of file portable.h.
| typedef void* RGBQUAD |
Definition at line 104 of file portable.h.
| typedef void* window_handle |
Definition at line 129 of file portable.h.
1.5.1