GrafX2 2.9.3227
The ultimate 256-color painting program
|
Screen update (refresh) system. More...
Macros | |
#define | GFX2_MB_INFO 1 |
#define | GFX2_MB_ERROR 2 |
#define | GFX2_MB_WARNING 3 |
Functions | |
void | GFX2_Set_mode (int *width, int *height, int fullscreen) |
Sets the new screen/window dimensions. More... | |
byte | Get_Screen_pixel (int x, int y) |
void | Set_Screen_pixel (int x, int y, byte value) |
byte * | Get_Screen_pixel_ptr (int x, int y) |
void | Screen_FillRect (int x, int y, int w, int h, byte color) |
void | Update_rect (short x, short y, unsigned short width, unsigned short height) |
void | Flush_update (void) |
void | Update_status_line (short char_pos, short width) |
int | GFX2_SetPalette (const T_Components *colors, int firstcolor, int ncolors) |
void | Clear_border (byte color) |
Clears the parts of screen that are outside of the editing area. More... | |
void | Allow_drag_and_drop (int flag) |
Activates or desactivates file drag-dropping in program window. More... | |
void | Define_icon (void) |
Set application icon(s) More... | |
void | Set_mouse_position (void) |
set (system) mouse cursor position More... | |
int | GFX2_GetScreenSize (int *width, int *height) |
Get Screen dimensions. More... | |
int | GFX2_MessageBox (const char *text, const char *caption, unsigned int type) |
Display a modal message. More... | |
Variables | |
volatile int | Allow_colorcycling |
Screen update (refresh) system.
#define GFX2_MB_INFO 1 |
#define GFX2_MB_ERROR 2 |
#define GFX2_MB_WARNING 3 |
void GFX2_Set_mode | ( | int * | width, |
int * | height, | ||
int | fullscreen | ||
) |
Sets the new screen/window dimensions.
width * 4
width * 4
References Config, FALSE, GFX2_DEBUG, GFX2_ERROR, GFX2_Log(), GFX2_WARNING, T_GFX2_Surface::h, icon, New_GFX2_Surface(), NULL, T_GFX2_Surface::palette, Pixel_height, Pixel_width, T_GFX2_Surface::pixels, render_dstrect, render_scale_x, render_scale_y, screen, Screen_height, Screen_SDL, Screen_width, Video_AllocateDib(), T_GFX2_Surface::w, Win32_CreateWindow(), Win32_hwnd, Win32_Is_Fullscreen, T_Config::Window_pos_x, T_Config::Window_pos_y, windowName, X11_display, X11_gc, X11_image, and X11_window.
Referenced by Init_mode_video().
byte Get_Screen_pixel | ( | int | x, |
int | y | ||
) |
References GFX2_Log(), GFX2_WARNING, NULL, T_GFX2_Surface::pixels, screen, Screen_SDL, T_GFX2_Surface::w, Windows_DIB_width, and Windows_Screen.
Referenced by Count_used_colors_screen_area(), Horizontal_grid_line(), Horizontal_XOR_line_double(), Horizontal_XOR_line_quad(), Horizontal_XOR_line_tall2(), Horizontal_XOR_line_tall3(), Horizontal_XOR_line_triple(), Horizontal_XOR_line_wide2(), Read_pixel_double(), Read_pixel_quad(), Read_pixel_simple(), Read_pixel_tall(), Read_pixel_tall2(), Read_pixel_tall3(), Read_pixel_triple(), Read_pixel_wide(), Read_pixel_wide2(), Update_rect(), Vertical_grid_line(), Vertical_XOR_line_double(), Vertical_XOR_line_quad(), Vertical_XOR_line_simple(), Vertical_XOR_line_tall(), Vertical_XOR_line_tall2(), Vertical_XOR_line_tall3(), Vertical_XOR_line_triple(), Vertical_XOR_line_wide(), and Vertical_XOR_line_wide2().
void Set_Screen_pixel | ( | int | x, |
int | y, | ||
byte | value | ||
) |
References GFX2_Log(), GFX2_WARNING, NULL, T_GFX2_Surface::pixels, screen, Screen_SDL, T_GFX2_Surface::w, Windows_DIB_width, and Windows_Screen.
Referenced by Display_line_on_screen_double(), Horizontal_XOR_line_double(), Horizontal_XOR_line_quad(), Horizontal_XOR_line_tall2(), Horizontal_XOR_line_tall3(), Horizontal_XOR_line_triple(), Horizontal_XOR_line_wide2(), Pixel_double(), Pixel_quad(), Pixel_simple(), Pixel_tall(), Pixel_tall2(), Pixel_tall3(), Pixel_triple(), Pixel_wide(), Pixel_wide2(), Vertical_XOR_line_double(), Vertical_XOR_line_quad(), Vertical_XOR_line_simple(), Vertical_XOR_line_tall(), Vertical_XOR_line_tall2(), Vertical_XOR_line_tall3(), Vertical_XOR_line_triple(), Vertical_XOR_line_wide(), and Vertical_XOR_line_wide2().
byte * Get_Screen_pixel_ptr | ( | int | x, |
int | y | ||
) |
References GFX2_Log(), GFX2_WARNING, NULL, T_GFX2_Surface::pixels, screen, Screen_SDL, T_GFX2_Surface::w, Windows_DIB_width, and Windows_Screen.
Referenced by Clear_brush_double(), Clear_brush_quad(), Clear_brush_simple(), Clear_brush_tall(), Clear_brush_tall2(), Clear_brush_tall3(), Clear_brush_triple(), Clear_brush_wide(), Clear_brush_wide2(), Display_brush_color_double(), Display_brush_color_quad(), Display_brush_color_simple(), Display_brush_color_tall(), Display_brush_color_tall2(), Display_brush_color_tall3(), Display_brush_color_triple(), Display_brush_color_wide(), Display_brush_color_wide2(), Display_brush_color_zoom_double(), Display_brush_color_zoom_quad(), Display_brush_color_zoom_tall(), Display_brush_color_zoom_tall2(), Display_brush_color_zoom_tall3(), Display_brush_color_zoom_triple(), Display_brush_color_zoom_wide2(), Display_brush_double(), Display_brush_mono_double(), Display_brush_mono_quad(), Display_brush_mono_simple(), Display_brush_mono_tall(), Display_brush_mono_tall2(), Display_brush_mono_tall3(), Display_brush_mono_triple(), Display_brush_mono_wide(), Display_brush_mono_wide2(), Display_brush_quad(), Display_brush_simple(), Display_brush_tall(), Display_brush_tall2(), Display_brush_tall3(), Display_brush_triple(), Display_brush_wide(), Display_brush_wide2(), Display_line_on_screen_fast_double(), Display_line_on_screen_fast_quad(), Display_line_on_screen_fast_tall2(), Display_line_on_screen_fast_tall3(), Display_line_on_screen_fast_triple(), Display_line_on_screen_fast_wide(), Display_line_on_screen_fast_wide2(), Display_line_on_screen_quad(), Display_line_on_screen_simple(), Display_line_on_screen_tall(), Display_line_on_screen_tall2(), Display_line_on_screen_tall3(), Display_line_on_screen_triple(), Display_line_on_screen_wide(), Display_line_on_screen_wide2(), Display_part_of_screen_double(), Display_part_of_screen_quad(), Display_part_of_screen_simple(), Display_part_of_screen_tall(), Display_part_of_screen_tall2(), Display_part_of_screen_tall3(), Display_part_of_screen_triple(), Display_part_of_screen_wide(), Display_part_of_screen_wide2(), Display_transparent_line_on_screen_simple(), Display_transparent_line_on_screen_wide(), Display_transparent_mono_line_on_screen_double(), Display_transparent_mono_line_on_screen_quad(), Display_transparent_mono_line_on_screen_simple(), Display_transparent_mono_line_on_screen_tall2(), Display_transparent_mono_line_on_screen_tall3(), Display_transparent_mono_line_on_screen_triple(), Display_transparent_mono_line_on_screen_wide(), Display_transparent_mono_line_on_screen_wide2(), Horizontal_XOR_line_simple(), Horizontal_XOR_line_tall(), Horizontal_XOR_line_wide(), Read_line_screen_double(), Read_line_screen_quad(), Read_line_screen_simple(), Read_line_screen_tall(), Read_line_screen_tall2(), Read_line_screen_tall3(), Read_line_screen_triple(), Read_line_screen_wide(), Read_line_screen_wide2(), Remap_screen_double(), Remap_screen_quad(), Remap_screen_simple(), Remap_screen_tall(), Remap_screen_tall2(), Remap_screen_tall3(), Remap_screen_triple(), Remap_screen_wide(), Remap_screen_wide2(), Screen_FillRect(), and Update_rect().
void Screen_FillRect | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
byte | color | ||
) |
References Get_Screen_pixel_ptr(), T_GFX2_Surface::h, screen, Screen_SDL, T_GFX2_Surface::w, Windows_DIB_height, and Windows_DIB_width.
Referenced by Block_double(), Block_quad(), Block_simple(), Block_tall(), Block_tall2(), Block_tall3(), Block_triple(), Block_wide(), Block_wide2(), and Readline_ex_unicode().
void Update_rect | ( | short | x, |
short | y, | ||
unsigned short | width, | ||
unsigned short | height | ||
) |
References FALSE, Get_Screen_pixel(), Get_Screen_pixel_ptr(), T_GFX2_Surface::h, Max_X, Max_Y, Min_X, Min_Y, NULL, T_GFX2_Surface::palette, Pixel_height, Pixel_width, screen, Screen_SDL, T_GFX2_Surface::w, Win32_hwnd, and X11_image.
Referenced by Button_Magnify(), Button_Magnify_menu(), Button_Palette(), Button_Sieve_menu(), Clear_brush_double(), Clear_brush_quad(), Clear_brush_scaled_double(), Clear_brush_scaled_quad(), Clear_brush_scaled_simple(), Clear_brush_scaled_tall(), Clear_brush_scaled_tall2(), Clear_brush_scaled_tall3(), Clear_brush_scaled_triple(), Clear_brush_scaled_wide(), Clear_brush_scaled_wide2(), Clear_brush_simple(), Clear_brush_tall(), Clear_brush_tall2(), Clear_brush_tall3(), Clear_brush_triple(), Clear_brush_wide(), Clear_brush_wide2(), Display_all_screen(), Display_brush_color_double(), Display_brush_color_quad(), Display_brush_color_simple(), Display_brush_color_tall(), Display_brush_color_tall2(), Display_brush_color_tall3(), Display_brush_color_triple(), Display_brush_color_wide(), Display_brush_color_wide2(), Display_brush_mono_double(), Display_brush_mono_quad(), Display_brush_mono_simple(), Display_brush_mono_tall(), Display_brush_mono_tall2(), Display_brush_mono_tall3(), Display_brush_mono_triple(), Display_brush_mono_wide(), Display_brush_mono_wide2(), Display_brush_mono_zoom_double(), Display_brush_mono_zoom_quad(), Display_brush_mono_zoom_simple(), Display_brush_mono_zoom_tall(), Display_brush_mono_zoom_tall2(), Display_brush_mono_zoom_tall3(), Display_brush_mono_zoom_triple(), Display_brush_mono_zoom_wide(), Display_brush_mono_zoom_wide2(), Display_cursor(), Display_effect_sprite(), Display_foreback(), Display_grad_block_in_window(), Display_image_limits(), Display_layerbar(), Display_menu(), Display_menu_palette(), Display_menu_palette_avoiding_window(), Display_paintbrush_in_window(), Display_part_of_screen_scaled_double(), Display_part_of_screen_scaled_quad(), Display_part_of_screen_scaled_simple(), Display_part_of_screen_scaled_tall(), Display_part_of_screen_scaled_tall2(), Display_part_of_screen_scaled_tall3(), Display_part_of_screen_scaled_triple(), Display_part_of_screen_scaled_wide(), Display_part_of_screen_scaled_wide2(), Display_separator(), Distort_brush_1_9(), Draw_gradient_preview(), Draw_menu_button(), Draw_preset_sieve_patterns(), Draw_sieve_scaled(), Draw_xor_rect(), Fill_general(), Frame_menu_color(), Get_input(), GFX2_SetPalette(), Hide_cursor(), Horizontal_XOR_line_zoom(), Main_handler(), Move_separator(), Move_window(), Readline_ex_unicode(), Remap_screen_double(), Remap_screen_quad(), Remap_screen_simple(), Remap_screen_tall(), Remap_screen_tall2(), Remap_screen_tall3(), Remap_screen_triple(), Remap_screen_wide(), Remap_screen_wide2(), Scroll_picture(), Tilemap_draw(), Update_part_of_screen(), Update_sieve_area(), Update_status_line(), Vertical_XOR_line_zoom(), and Window_display_icon_sprite().
void Flush_update | ( | void | ) |
References Max_X, Max_Y, Menu_factor_X, Menu_factor_Y, Menu_status_Y, Min(), Min_X, Min_Y, NULL, Pixel_height, Pixel_width, Screen_height, Screen_SDL, Screen_width, Status_line_dirty_begin, Status_line_dirty_end, and X11_display.
Referenced by Get_input(), Load_image(), Pixel_figure_permanent(), and Readline_ex_unicode().
void Update_status_line | ( | short | char_pos, |
short | width | ||
) |
References Menu_factor_X, Menu_factor_Y, Menu_status_Y, Pixel_height, Pixel_width, Screen_SDL, Status_line_dirty_begin, Status_line_dirty_end, and Update_rect().
Referenced by Print_coordinates(), and Print_in_menu().
int GFX2_SetPalette | ( | const T_Components * | colors, |
int | firstcolor, | ||
int | ncolors | ||
) |
References T_Components::B, FALSE, T_Components::G, T_GFX2_Surface::h, NULL, T_GFX2_Surface::palette, T_Components::R, screen, Screen_SDL, Update_rect(), T_GFX2_Surface::w, Win32_hwnd, and Windows_DIB.
Referenced by Color_cycling(), Set_color(), and Set_palette().
void Clear_border | ( | byte | color | ) |
Clears the parts of screen that are outside of the editing area.
There is such area only if the screen mode is not a multiple of the pixel size, eg: 3x3 pixels in 1024x768 leaves 1 column on the right, 0 rows on bottom.
References Pixel_height, Pixel_width, Screen_height, Screen_SDL, and Screen_width.
Referenced by Init_mode_video(), Remap_menu_sprites(), and Remap_screen_after_menu_colors_change().
void Allow_drag_and_drop | ( | int | flag | ) |
Activates or desactivates file drag-dropping in program window.
References FALSE, GFX2_Get_Window_Handle(), GFX2_Log(), GFX2_WARNING, NULL, TRUE, X11_display, and X11_window.
Referenced by Close_window(), Init_program(), and Open_window().
void Define_icon | ( | void | ) |
Set application icon(s)
References Data_directory, icon, Load_surface(), and NULL.
void Set_mouse_position | ( | void | ) |
set (system) mouse cursor position
References GFX2_Log(), GFX2_WARNING, Mouse_X, Mouse_Y, NULL, Pixel_height, Pixel_width, render_scale_x, render_scale_y, Win32_hwnd, X11_display, and X11_window.
Referenced by Init_mode_video(), and Move_cursor_with_constraints().
int GFX2_GetScreenSize | ( | int * | width, |
int * | height | ||
) |
int GFX2_MessageBox | ( | const char * | text, |
const char * | caption, | ||
unsigned int | type | ||
) |
Display a modal message.
text | body of the modal message |
caption | title of the message |
type | one of GFX2_MB_INFO, GFX2_MB_ERROR, GFX2_MB_WARNING |
References GFX2_DEBUG, GFX2_ERROR, GFX2_Get_Window_Handle(), GFX2_Log(), NULL, X11_display, and X11_window.
Referenced by Display_syntax(), and Error_function().
|
extern |
Referenced by Button_Gradients(), Close_window(), Color_cycling(), and Open_window().